Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
1db5fb4f
Commit
1db5fb4f
authored
Jul 26, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
51e5b892
27388812
Changes
66
Hide whitespace changes
Inline
Side-by-side
Showing
66 changed files
with
2109 additions
and
597 deletions
+2109
-597
application.yml
ace-auth/ace-auth-server/src/main/resources/application.yml
+7
-112
logback.xml
ace-auth/ace-auth-server/src/main/resources/logback.xml
+121
-0
application.yml
ace-gate/src/main/resources/application.yml
+7
-123
logback.xml
ace-gate/src/main/resources/logback.xml
+121
-0
AppUserManageDTO.java
...m/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
+2
-2
AppUserAlipay.java
...m/github/wxiaoqi/security/admin/entity/AppUserAlipay.java
+43
-0
MyWallet.java
...va/com/github/wxiaoqi/security/admin/entity/MyWallet.java
+16
-8
AppUserLoginBiz.java
...om/github/wxiaoqi/security/admin/biz/AppUserLoginBiz.java
+10
-0
AppUserManageBiz.java
...m/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
+2
-1
AppUserRelationBiz.java
...github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
+21
-0
AppUserRelationController.java
...xiaoqi/security/admin/rest/AppUserRelationController.java
+17
-1
AppUsersManageController.java
...wxiaoqi/security/admin/rest/AppUsersManageController.java
+21
-10
GroupController.java
...m/github/wxiaoqi/security/admin/rest/GroupController.java
+5
-0
application.yml
ace-modules/ace-admin/src/main/resources/application.yml
+7
-134
logback.xml
ace-modules/ace-admin/src/main/resources/logback.xml
+120
-3
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+11
-7
ActivityList.java
.../java/com/xxfc/platform/activity/entity/ActivityList.java
+3
-0
ActivityManagement.java
...com/xxfc/platform/activity/entity/ActivityManagement.java
+10
-2
ActivityPopup.java
...java/com/xxfc/platform/activity/entity/ActivityPopup.java
+3
-1
HomeActivities.java
...ava/com/xxfc/platform/activity/entity/HomeActivities.java
+102
-0
ActivitiesQuery.java
...n/java/com/xxfc/platform/activity/vo/ActivitiesQuery.java
+11
-0
ActivityManagementQuery.java
...om/xxfc/platform/activity/vo/ActivityManagementQuery.java
+7
-0
PopupQuery.java
...c/main/java/com/xxfc/platform/activity/vo/PopupQuery.java
+14
-0
Query.java
...pi/src/main/java/com/xxfc/platform/activity/vo/Query.java
+13
-0
ActivityListBiz.java
.../java/com/xxfc/platform/activity/biz/ActivityListBiz.java
+0
-1
ActivityManagementBiz.java
...com/xxfc/platform/activity/biz/ActivityManagementBiz.java
+8
-6
ActivityPopupBiz.java
...java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
+24
-5
HomeActivitiesBiz.java
...ava/com/xxfc/platform/activity/biz/HomeActivitiesBiz.java
+59
-0
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+13
-5
HomeActivitiesMapper.java
...m/xxfc/platform/activity/mapper/HomeActivitiesMapper.java
+10
-0
ActivityListController.java
...m/xxfc/platform/activity/rest/ActivityListController.java
+0
-2
ActivityManagementController.java
.../platform/activity/rest/ActivityManagementController.java
+6
-5
ActivityPopupController.java
.../xxfc/platform/activity/rest/ActivityPopupController.java
+3
-0
ActivityPopupManageController.java
...platform/activity/rest/ActivityPopupManageController.java
+74
-0
DateController.java
.../java/com/xxfc/platform/activity/rest/DateController.java
+7
-1
HomeActivitiesController.java
...xxfc/platform/activity/rest/HomeActivitiesController.java
+79
-0
application.yml
...ity/xx-activity-server/src/main/resources/application.yml
+7
-0
logback.xml
...ctivity/xx-activity-server/src/main/resources/logback.xml
+121
-0
Cofig.java
...api/src/main/java/com/xxfc/platform/app/entity/Cofig.java
+1
-0
WithDrawRuleVo.java
.../java/com/xxfc/platform/app/entity/vo/WithDrawRuleVo.java
+29
-4
application.yml
xx-app/xx-app-server/src/main/resources/application.yml
+7
-0
logback.xml
xx-app/xx-app-server/src/main/resources/logback.xml
+121
-0
application.yml
...ite/xx-campsite-server/src/main/resources/application.yml
+7
-0
logback.xml
...ampsite/xx-campsite-server/src/main/resources/logback.xml
+121
-0
ImQuestionBiz.java
...src/main/java/com/xxfc/platform/im/biz/ImQuestionBiz.java
+1
-1
application.yml
xx-im/xx-im-server/src/main/resources/application.yml
+7
-0
logback.xml
xx-im/xx-im-server/src/main/resources/logback.xml
+121
-0
ImCommentMapper.xml
...x-im-server/src/main/resources/mapper/ImCommentMapper.xml
+1
-0
ImPraiseMapper.xml
...xx-im-server/src/main/resources/mapper/ImPraiseMapper.xml
+1
-0
DailyOrderStatistics.java
.../com/xxfc/platform/order/entity/DailyOrderStatistics.java
+14
-0
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+6
-0
BaseOrderMapper.java
.../java/com/xxfc/platform/order/mapper/BaseOrderMapper.java
+2
-0
application.yml
xx-order/xx-order-server/src/main/resources/application.yml
+7
-0
logback.xml
xx-order/xx-order-server/src/main/resources/logback.xml
+121
-0
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+69
-45
application.yml
xx-tour/xx-tour-server/src/main/resources/application.yml
+7
-0
logback.xml
xx-tour/xx-tour-server/src/main/resources/logback.xml
+121
-0
AcceptFilter.java
...java/com/xxfc/platform/universal/filter/AcceptFilter.java
+0
-12
DenyFilter.java
...n/java/com/xxfc/platform/universal/filter/DenyFilter.java
+0
-12
log.2019-07-17.log
xx-universal/xx-universal-server/logs/log.2019-07-17.log
+0
-0
sys.2019-07-17.log
xx-universal/xx-universal-server/logs/sys.2019-07-17.log
+0
-0
application.yml
...al/xx-universal-server/src/main/resources/application.yml
+2
-2
logback.xml
...versal/xx-universal-server/src/main/resources/logback.xml
+110
-24
VehicleWarningMsgController.java
...fc/platform/vehicle/rest/VehicleWarningMsgController.java
+0
-3
application.yml
...icle/xx-vehicle-server/src/main/resources/application.yml
+7
-65
logback.xml
xx-vehicle/xx-vehicle-server/src/main/resources/logback.xml
+121
-0
No files found.
ace-auth/ace-auth-server/src/main/resources/application.yml
View file @
1db5fb4f
#
logging
:
#spring:
config
:
classpath:logback.xml
# application:
level
:
# name: ace-auth
com.github.wxiaoqi
:
# jackson:
debug
# date-format: yyyy-MM-dd HH:mm:ss
com.xxfc.platform
:
# time-zone: GMT+8
debug
# default-property-inclusion: non_null
\ No newline at end of file
# redis:
# database: 2
# host: ${REDIS_HOST:localhost}
# port: ${REDIS_PORT:6379}
# pool:
# max-active: 20
# datasource:
# name: test
# url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/ag_auth_v1?useUnicode=true&characterEncoding=UTF8
# username: root
# password: 123456
# # 使用druid数据源
# type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name: com.mysql.jdbc.Driver
# filters: stat
# maxActive: 20
# initialSize: 1
# maxWait: 60000
# minIdle: 1
# timeBetweenEvictionRunsMillis: 60000
# minEvictableIdleTimeMillis: 300000
# validationQuery: select 'x'
# testWhileIdle: true
# testOnBorrow: false
# testOnReturn: false
# poolPreparedStatements: true
# maxOpenPreparedStatements: 20
# rabbitmq:
# host: ${RABBIT_MQ_HOST:localhost}
# port: ${RABBIT_MQ_PORT:5672}
# username: guest
# password: guest
# sleuth:
# enabled: true
# http:
# legacy:
# enabled: true
# cloud:
# nacos:
# discovery:
# server-addr: 127.0.0.1:8848
# sentinel:
# transport:
# dashboard: localhost:8080
#mybatis:
# basepackage: com.github.wxiaoqi.security.auth.mapper
# xmlLocation: classpath:mapper/**/*.xml
# mapper-locations: "classpath*:mapper/*.xml"
#
#server:
# port: 9777 #启动端口
#
#feign:
# httpclient:
# enabled: false
# okhttp:
# enabled: true
#
#ribbon:
# eureka:
# enabled: true
# ReadTimeout: 60000
# ConnectTimeout: 60000
# MaxAutoRetries: 0
# MaxAutoRetriesNextServer: 1
# OkToRetryOnAllOperations: false
#
#hystrix:
# threadpool:
# default:
# coreSize: 1000 ##并发执行的最大线程数,默认10
# maxQueueSize: 1000 ##BlockingQueue的最大队列数
# queueSizeRejectionThreshold: 500 ##即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
# command:
# default:
# execution:
# isolation:
# thread:
# timeoutInMilliseconds: 10000
#
#jwt:
# token-header: Authorization
# expire: 14400
# rsa-secret: xx1WET12^%3^(WE45
#
#client:
# id: ace-auth
# secret: 123456
# token-header: x-client-token
# expire: 14400
# rsa-secret: x2318^^(*WRYQWR(QW&T
#
#logging:
# level:
## tk.mybatis: DEBUG
# com.github.wxiaoqi.security.auth: DEBUG
#
#management:
# endpoints:
# web:
# exposure:
# include: '*'
# security:
# enabled: false
ace-auth/ace-auth-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
ace-gate/src/main/resources/application.yml
View file @
1db5fb4f
#server:
logging
:
# port: 8765
config
:
classpath:logback.xml
#
level
:
##请求和响应GZIP压缩支持
com.github.wxiaoqi
:
#feign:
debug
# httpclient:
com.xxfc.platform
:
# enabled: false
debug
# okhttp:
\ No newline at end of file
# enabled: true
# compression:
# request:
# enabled: true
# mime-types: text/xml,application/xml,application/json
# min-request-size: 2048
# response:
# enabled: true
#
#spring:
# application:
# name: ace-gateway
# redis:
# database: 2
# host: 127.0.0.1
# jedis:
# pool:
# max-active: 20
# rabbitmq:
# host: ${RABBIT_MQ_HOST:localhost}
# port: ${RABBIT_MQ_PORT:5672}
# username: guest
# password: guest
# sleuth:
# enabled: true
# http:
# legacy:
# enabled: true
# cloud:
# gateway:
# discovery:
# locator:
# lowerCaseServiceId: true
# enabled: true
# routes:
# # =====================================
# - id: ace-auth
# uri: lb://ace-auth
# order: 8000
# predicates:
# - Path=/api/auth/**
# filters:
# - StripPrefix=2
# - id: ace-admin
# uri: lb://ace-admin
# order: 8001
# predicates:
# - Path=/api/admin/**
# filters:
# - StripPrefix=2
# nacos:
# discovery:
# server-addr: 127.0.0.1:8848
# sentinel:
# transport:
# dashboard: localhost:8080
#logging:
# level:
# com.github.wxiaoqi.security.gate.v2: info
#
#management:
# endpoints:
# web:
# exposure:
# include: '*'
# security:
# enabled: false
#
#
#gate:
# ignore:
# startWith: /auth/jwt
#
#
auth
:
serviceId
:
ace-auth
user
:
token-header
:
Authorization
client
:
token-header
:
x-client-token
id
:
ace-gate
#不填则默认读取spring.application.name
secret
:
123456
servlet
:
multipart
:
# 启用上传处理,默认是true
enabled
:
true
# 当上传文件达到20MB的时候进行磁盘写入
file-size-threshold
:
20MB
# 设置最大的请求文件的大小
max-request-size
:
50MB
# 设置单个文件的最大长度
max-file-size
:
50MB
#
#
#ribbon:
# eureka:
# enabled: true
# ReadTimeout: 60000
# ConnectTimeout: 60000
# MaxAutoRetries: 0
# MaxAutoRetriesNextServer: 1
# OkToRetryOnAllOperations: false
#
#hystrix:
# threadpool:
# default:
# coreSize: 1000 ##并发执行的最大线程数,默认10
# maxQueueSize: 1000 ##BlockingQueue的最大队列数
# queueSizeRejectionThreshold: 500 ##即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
# command:
# default:
# execution:
# isolation:
# thread:
# timeoutInMilliseconds: 10000
\ No newline at end of file
ace-gate/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
View file @
1db5fb4f
...
@@ -24,7 +24,7 @@ public class AppUserManageDTO {
...
@@ -24,7 +24,7 @@ public class AppUserManageDTO {
/**
/**
* 手机号
* 手机号
*/
*/
private
Integer
mobile
;
private
String
mobile
;
/**
/**
* 注册终端
* 注册终端
...
@@ -32,7 +32,7 @@ public class AppUserManageDTO {
...
@@ -32,7 +32,7 @@ public class AppUserManageDTO {
private
Integer
channel
;
private
Integer
channel
;
/**
/**
* 会员等级
* 会员等级
(-1为全不会员)
*/
*/
private
Integer
memberLevel
;
private
Integer
memberLevel
;
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserAlipay.java
0 → 100644
View file @
1db5fb4f
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
/**
* 支付宝账号表
*/
@Table
(
name
=
"app_user_alipay"
)
@Data
public
class
AppUserAlipay
{
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
//此处加上注解
private
Integer
id
;
@ApiModelProperty
(
"用户id"
)
@Column
(
name
=
"user_id"
)
private
Integer
userId
;
@ApiModelProperty
(
"支付宝账号"
)
@Column
(
name
=
"tx_alipay"
)
private
String
txAlipay
;
@ApiModelProperty
(
"0-否;1-是"
)
@Column
(
name
=
"is_default"
)
private
Integer
isDefault
;
@ApiModelProperty
(
"创建时间"
)
@Column
(
name
=
"crt_time"
)
private
Long
crtTime
;
@ApiModelProperty
(
"是否删除;0-正常;1-删除"
)
@Column
(
name
=
"is_del"
)
private
Integer
isDel
;
}
\ No newline at end of file
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/MyWallet.java
View file @
1db5fb4f
...
@@ -19,8 +19,8 @@ import lombok.Data;
...
@@ -19,8 +19,8 @@ import lombok.Data;
@Table
(
name
=
"my_wallet"
)
@Table
(
name
=
"my_wallet"
)
public
class
MyWallet
implements
Serializable
{
public
class
MyWallet
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* id
* id
*/
*/
@Column
(
name
=
"id"
)
@Column
(
name
=
"id"
)
...
@@ -34,15 +34,23 @@ public class MyWallet implements Serializable {
...
@@ -34,15 +34,23 @@ public class MyWallet implements Serializable {
@GeneratedValue
(
generator
=
"JDBC"
)
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"用户ID"
)
@ApiModelProperty
(
"用户ID"
)
private
Integer
userId
;
private
Integer
userId
;
/**
* 余额(分)
*/
@Column
(
name
=
"balance"
)
@ApiModelProperty
(
value
=
"余额(元)"
)
private
BigDecimal
balance
;
/**
/**
*
余额(分)
*
支付密码
*/
*/
@Column
(
name
=
"
balance
"
)
@Column
(
name
=
"
pay_password
"
)
@ApiModelProperty
(
value
=
"
余额(元)
"
)
@ApiModelProperty
(
value
=
"
支付密码
"
)
private
BigDecimal
balance
;
private
String
payPassword
;
/**
/**
* 已提现金额
* 已提现金额
*/
*/
@Column
(
name
=
"withdrawals"
)
@Column
(
name
=
"withdrawals"
)
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserLoginBiz.java
View file @
1db5fb4f
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.time.Instant
;
import
java.time.Instant
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -205,4 +206,13 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
...
@@ -205,4 +206,13 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
criteria
.
andIn
(
"username"
,
phons
);
criteria
.
andIn
(
"username"
,
phons
);
mapper
.
deleteByExample
(
example
);
mapper
.
deleteByExample
(
example
);
}
}
// @CacheClear(pre = "appUser{1}")
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteAppUserById
(
Integer
id
)
{
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
appUserLogin
.
setId
(
id
);
appUserLogin
.
setIsdel
(
0
);
mapper
.
updateByPrimaryKeySelective
(
appUserLogin
);
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
View file @
1db5fb4f
...
@@ -80,6 +80,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
...
@@ -80,6 +80,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
* 禁用账户
* 禁用账户
* @param id
* @param id
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteAppUser
(
Integer
id
,
Integer
isDel
)
{
public
void
deleteAppUser
(
Integer
id
,
Integer
isDel
)
{
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
...
@@ -111,7 +112,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
...
@@ -111,7 +112,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
}
}
/**
/**
*
*
保存
* @param appUserVo
* @param appUserVo
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
View file @
1db5fb4f
...
@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...
@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.aop.framework.AopContext
;
import
org.springframework.aop.framework.AopContext
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -46,6 +47,9 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
...
@@ -46,6 +47,9 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
@Value
(
"${temamember.failureTime:60}"
)
@Value
(
"${temamember.failureTime:60}"
)
private
Long
failureTime
;
private
Long
failureTime
;
@Autowired
private
AppUserDetailBiz
appUserDetailBiz
;
/**
/**
* 关系绑定
* 关系绑定
* @param userId
* @param userId
...
@@ -76,6 +80,23 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
...
@@ -76,6 +80,23 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
}
}
}
}
}
}
//首页关系绑定
public
ObjectRestResponse
appBindRelation
(
Integer
userId
,
String
code
){
Integer
parentId
=
0
;
if
(
StringUtils
.
isNotBlank
(
code
)){
//判断处理活动关键字
String
[]
codes
=
code
.
split
(
"_"
);
if
(
codes
.
length
>
1
)
{
code
=
codes
[
0
];
}
parentId
=
appUserDetailBiz
.
getUserByCode
(
code
);
}
if
(
parentId
!=
null
&&
parentId
>
0
&&
userId
!=
null
&&
userId
>
0
){
getMyBiz
().
bindRelation
(
userId
,
parentId
,
1
);
}
return
ObjectRestResponse
.
succ
();
}
//永久稳定关系
//永久稳定关系
public
void
foreverBind
(
Integer
user_id
){
public
void
foreverBind
(
Integer
user_id
){
AppUserRelation
relation
=
getMyBiz
().
getRelationByUserId
(
user_id
);
AppUserRelation
relation
=
getMyBiz
().
getRelationByUserId
(
user_id
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserRelationController.java
View file @
1db5fb4f
...
@@ -9,12 +9,14 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...
@@ -9,12 +9,14 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelation
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelation
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashSet
;
@RestController
@RestController
@RequestMapping
(
"relation"
)
@RequestMapping
(
"relation"
)
...
@@ -37,7 +39,21 @@ public class AppUserRelationController extends BaseController<AppUserRelationBiz
...
@@ -37,7 +39,21 @@ public class AppUserRelationController extends BaseController<AppUserRelationBiz
return
baseBiz
.
shareParentByUserId
(
userid
,
pid
,
platform_userid
);
return
baseBiz
.
shareParentByUserId
(
userid
,
pid
,
platform_userid
);
}
}
@ApiOperation
(
"查询邀请的成员"
)
@RequestMapping
(
value
=
"/bind"
,
method
=
RequestMethod
.
POST
)
@ApiModelProperty
(
"app分享绑定"
)
public
ObjectRestResponse
bind
(
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
HttpServletRequest
request
){
try
{
Integer
userid
=
Integer
.
parseInt
(
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
());
return
baseBiz
.
appBindRelation
(
userid
,
code
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
BaseException
(
e
);
}
}
@ApiOperation
(
"查询邀请的成员"
)
@GetMapping
(
"/pages"
)
@GetMapping
(
"/pages"
)
public
ObjectRestResponse
<
InviteMemberVo
>
findInviteMemberByActivitState
(
@RequestParam
(
value
=
"state"
,
required
=
false
)
Integer
state
,
public
ObjectRestResponse
<
InviteMemberVo
>
findInviteMemberByActivitState
(
@RequestParam
(
value
=
"state"
,
required
=
false
)
Integer
state
,
@RequestParam
(
"page"
)
Integer
page
,
@RequestParam
(
"page"
)
Integer
page
,
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUsersManageController.java
View file @
1db5fb4f
...
@@ -34,16 +34,16 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -34,16 +34,16 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
return
ObjectRestResponse
.
succ
(
baseBiz
.
findAllByQuery
(
appUserManageDTO
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
findAllByQuery
(
appUserManageDTO
));
}
}
/**
//
/**
* 禁用
//
* 禁用
* @param id
//
* @param id
* @return
//
* @return
*/
//
*/
@DeleteMapping
(
"/deleteById/{id}/{isDel}"
)
//
@DeleteMapping("/deleteById/{id}/{isDel}")
public
ObjectRestResponse
deleteById
(
@PathVariable
Integer
id
,
@PathVariable
Integer
isDel
){
//
public ObjectRestResponse deleteById(@PathVariable Integer id,@PathVariable Integer isDel){
baseBiz
.
deleteAppUser
(
id
,
isDel
);
//
baseBiz.deleteAppUser(id,isDel);
return
ObjectRestResponse
.
succ
();
//
return ObjectRestResponse.succ();
}
//
}
/**
/**
* 查询一条
* 查询一条
...
@@ -94,6 +94,17 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -94,6 +94,17 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
/**
* 删除用户
* @param id
* @return
*/
@DeleteMapping
(
"/deleteById/{id}"
)
public
ObjectRestResponse
deleteById
(
@PathVariable
Integer
id
){
appUserLoginBiz
.
deleteAppUserById
(
id
);
return
ObjectRestResponse
.
succ
();
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/GroupController.java
View file @
1db5fb4f
...
@@ -103,6 +103,11 @@ public class GroupController extends BaseController<GroupBiz, Group> {
...
@@ -103,6 +103,11 @@ public class GroupController extends BaseController<GroupBiz, Group> {
return
new
ObjectRestResponse
().
data
(
baseBiz
.
getAuthorityElement
(
id
)).
rel
(
true
);
return
new
ObjectRestResponse
().
data
(
baseBiz
.
getAuthorityElement
(
id
)).
rel
(
true
);
}
}
@RequestMapping
(
value
=
"/getGroups"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
GroupUsers
>
getGroups
(){
return
new
ObjectRestResponse
<
GroupUsers
>().
rel
(
true
).
data
(
baseBiz
.
selectListAll
());
}
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
...
...
ace-modules/ace-admin/src/main/resources/application.yml
View file @
1db5fb4f
#logging:
logging
:
# level:
config
:
classpath:logback.xml
## tk.mybatis: DEBUG
level
:
# com.github.wxiaoqi.security.admin: DEBUG
com.github.wxiaoqi
:
#spring:
debug
# application:
com.xxfc.platform
:
# name: ace-admin
debug
# jackson:
\ No newline at end of file
# date-format: yyyy-MM-dd HH:mm:ss
# time-zone: GMT+8
# default-property-inclusion: non_null
# datasource:
# name: test
# url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/ag_admin_v1?useUnicode=true&characterEncoding=UTF8
# username: root
# password: 123456
# # 使用druid数据源
# type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name: com.mysql.jdbc.Driver
# filters: stat
# maxActive: 20
# initialSize: 1
# maxWait: 60000
# minIdle: 1
# timeBetweenEvictionRunsMillis: 60000
# minEvictableIdleTimeMillis: 300000
# validationQuery: select 'x'
# testWhileIdle: true
# testOnBorrow: false
# testOnReturn: false
# poolPreparedStatements: true
# maxOpenPreparedStatements: 20
# rabbitmq:
# host: ${RABBIT_MQ_HOST:localhost}
# port: ${RABBIT_MQ_PORT:5672}
# username: guest
# password: guest
# sleuth:
# enabled: true
# http:
# legacy:
# enabled: true
# cloud:
# nacos:
# discovery:
# server-addr: 127.0.0.1:8848
# sentinel:
# transport:
# dashboard: localhost:8080
#sample:
# zipkin:
# # When enabled=false, traces log to the console. Comment to send to zipkin
# enabled: false
#
#mybatis:
# basepackage: com.github.wxiaoqi.security.admin.mapper
# xmlLocation: classpath:mapper/**/*.xml
# mapper-locations: "classpath*:mapper/*.xml"
#
#server:
# port: 8762
#
## 必须配置
#feign:
# httpclient:
# enabled: false
# okhttp:
# enabled: true
#
#ribbon:
# eureka:
# enabled: true
# ReadTimeout: 100000
# ConnectTimeout: 100000
# MaxAutoRetries: 0
# MaxAutoRetriesNextServer: 1
# OkToRetryOnAllOperations: false
#
#hystrix:
# threadpool:
# default:
# coreSize: 1000 ##并发执行的最大线程数,默认10
# maxQueueSize: 1000 ##BlockingQueue的最大队列数
# queueSizeRejectionThreshold: 500 ##即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
# command:
# default:
# execution:
# isolation:
# thread:
# timeoutInMilliseconds: 110000
#
#
## 配置swagger
#swagger:
# enabled: true
# base-package: com.github.wxiaoqi.security.admin
# title: ace-admin
# version: 1.0.0.SNAPSHOT
# description: 管理后端服务
# contact:
# name: admin
#
#auth:
# serviceId: ace-auth
# user:
# token-header: Authorization
# client:
# id: ace-admin
# secret: 123456
# token-header: x-client-token
#
##redis-cache 相关
#redis:
# pool:
# maxActive: 300
# maxIdle: 100
# maxWait: 1000
# host: ${REDIS_HOST:localhost}
# port: ${REDIS_PORT:6379}
# password:
# timeout: 2000
# # 服务或应用名
# sysName: ace-admin
# enable: true
# database: 0
#
#management:
# endpoints:
# web:
# exposure:
# include: '*'
# security:
# enabled: false
#
ace-modules/ace-admin/src/main/resources/logback.xml
View file @
1db5fb4f
<configuration>
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<jmxConfigurator/>
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
</configuration>
\ No newline at end of file
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
1db5fb4f
...
@@ -95,23 +95,27 @@
...
@@ -95,23 +95,27 @@
) m
) m
on
on
l.id = m.user_id
l.id = m.user_id
where
1=1
where
l.isdel = 0
<if
test=
"mobile !=null"
>
<if
test=
"mobile !=null
and mobile !=''
"
>
and l.username like CONCAT('%',#{mobile},'%')
and l.username like CONCAT('%',#{mobile},'%')
</if>
</if>
<if
test=
"channel !=null"
>
<if
test=
"channel !=null
"
>
and d.channel=#{channel}
and d.channel=#{channel}
</if>
</if>
<if
test=
"memberLevel !=null"
>
<if
test=
"memberLevel !=null
and memberLevel != -1
"
>
and m.member_level = #{memberLevel}
and m.member_level = #{memberLevel}
</if>
</if>
<if
test=
"registrationTimeBegin !=null"
>
<if
test=
"memberLevel == -1"
>
and m.member_level in (select level from base_user_member_level)
</if>
<if
test=
"registrationTimeBegin !=null "
>
and l.createtime
>
= #{registrationTimeBegin}
and l.createtime
>
= #{registrationTimeBegin}
</if>
</if>
<if
test=
"registrationTimeEnd !=null"
>
<if
test=
"registrationTimeEnd !=null
"
>
and l.createtime
<
= #{registrationTimeEnd}
and l.createtime
<
= #{registrationTimeEnd}
</if>
</if>
<if
test=
"source !=null"
>
<if
test=
"source !=null
"
>
and d.source = #{source}
and d.source = #{source}
</if>
</if>
order by l.id ASC
order by l.id ASC
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/ActivityList.java
View file @
1db5fb4f
...
@@ -115,4 +115,7 @@ public class ActivityList implements Serializable {
...
@@ -115,4 +115,7 @@ public class ActivityList implements Serializable {
@ApiModelProperty
(
"活动时期类型:0-永久,1-有期限"
)
@ApiModelProperty
(
"活动时期类型:0-永久,1-有期限"
)
private
Integer
timeType
;
private
Integer
timeType
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/ActivityManagement.java
View file @
1db5fb4f
...
@@ -57,10 +57,10 @@ public class ActivityManagement {
...
@@ -57,10 +57,10 @@ public class ActivityManagement {
private
Integer
hasJoinNum
;
private
Integer
hasJoinNum
;
/**
/**
* 当前状态 1--
显示在活动页 2--隐藏
* 当前状态 1--
上架 2--下架
*/
*/
@Column
(
name
=
"status"
)
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"当前状态 1--
显示在活动页 2--隐藏
"
)
@ApiModelProperty
(
value
=
"当前状态 1--
上架 2--下架
"
)
private
Integer
status
;
private
Integer
status
;
/**
/**
...
@@ -90,4 +90,12 @@ public class ActivityManagement {
...
@@ -90,4 +90,12 @@ public class ActivityManagement {
@Column
(
name
=
"url"
)
@Column
(
name
=
"url"
)
@ApiModelProperty
(
value
=
"活动页面链接"
)
@ApiModelProperty
(
value
=
"活动页面链接"
)
private
String
url
;
private
String
url
;
/**
* 活动时期类型:0-永久,1-有期限
*/
@Column
(
name
=
"time_type"
)
@ApiModelProperty
(
value
=
"活动页面链接"
)
private
String
timeType
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/ActivityPopup.java
View file @
1db5fb4f
...
@@ -36,7 +36,6 @@ public class ActivityPopup {
...
@@ -36,7 +36,6 @@ public class ActivityPopup {
private
String
background
;
private
String
background
;
@Column
(
name
=
"start_time"
)
@Column
(
name
=
"start_time"
)
private
BigInteger
startTime
;
private
BigInteger
startTime
;
...
@@ -56,6 +55,9 @@ public class ActivityPopup {
...
@@ -56,6 +55,9 @@ public class ActivityPopup {
private
BigInteger
updTime
;
private
BigInteger
updTime
;
@Column
(
name
=
"is_del"
)
private
Integer
isDel
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/HomeActivities.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 精彩活动
* @author Administrator
*/
@Data
@Table
(
name
=
"home_activities"
)
public
class
HomeActivities
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键"
)
private
Integer
id
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 活动名称
*/
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"精彩活动名称"
)
private
String
name
;
/**
* 精彩活动开始时间
*/
@Column
(
name
=
"start_time"
)
@ApiModelProperty
(
value
=
"活动开始时间"
)
private
Long
startTime
;
/**
* 精彩活动结束时间
*/
@Column
(
name
=
"end_time"
)
@ApiModelProperty
(
value
=
"活动结束时间"
)
private
Long
endTime
;
/**
* 当前状态 1--显示在活动页 2--隐藏
*/
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"当前状态 1--显示在活动页 2--隐藏"
)
private
Integer
status
;
/**
* 排序
*/
@Column
(
name
=
"sort"
)
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
/**
* 活动图片
*/
@Column
(
name
=
"picture"
)
@ApiModelProperty
(
value
=
"活动图片"
)
private
String
picture
;
/**
* 活动页面链接
*/
@Column
(
name
=
"url"
)
@ApiModelProperty
(
value
=
"活动页面链接"
)
private
String
url
;
/**
* 是否删除:0-否,1-是
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除"
)
private
Integer
isDel
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/ActivitiesQuery.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
/**
* @author Administrator
*/
@Data
public
class
ActivitiesQuery
extends
Query
{
private
String
activitiesName
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/ActivityManagementQuery.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
@Data
public
class
ActivityManagementQuery
extends
Query
{
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/PopupQuery.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
net.bytebuddy.implementation.bytecode.assign.TypeCasting
;
/**
* 弹窗搜索条件
* @author Administrator
*/
@Data
public
class
PopupQuery
extends
Query
{
private
String
popupName
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/Query.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
/**
* @author Administrator
*/
@Data
public
class
Query
{
private
Integer
page
;
private
Integer
limit
;
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityListBiz.java
View file @
1db5fb4f
...
@@ -28,7 +28,6 @@ public class ActivityListBiz extends BaseBiz<ActivityListMapper,ActivityList> {
...
@@ -28,7 +28,6 @@ public class ActivityListBiz extends BaseBiz<ActivityListMapper,ActivityList> {
.
andEqualTo
(
ActivityList:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityList:
:
getStatus
,
1
)
).
orderByAsc
(
"sort"
).
build
();
).
orderByAsc
(
"sort"
).
build
();
List
<
ActivityList
>
activityLists
=
selectByExample
(
exa
);
List
<
ActivityList
>
activityLists
=
selectByExample
(
exa
);
return
activityLists
;
return
activityLists
;
}
}
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityManagementBiz.java
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
biz
;
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.ActivityManagement
;
import
com.xxfc.platform.activity.entity.ActivityManagement
;
import
com.xxfc.platform.activity.mapper.ActivityManagementMapper
;
import
com.xxfc.platform.activity.mapper.ActivityManagementMapper
;
import
com.xxfc.platform.activity.vo.ActivityManagementQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.jexl2.UnifiedJEXL
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -32,10 +31,13 @@ public class ActivityManagementBiz extends BaseBiz<ActivityManagementMapper, Act
...
@@ -32,10 +31,13 @@ public class ActivityManagementBiz extends BaseBiz<ActivityManagementMapper, Act
* @return
* @return
* @throws InvocationTargetException
* @throws InvocationTargetException
* @throws IllegalAccessException
* @throws IllegalAccessException
* @param query
*/
*/
public
List
<
ActivityList
>
selectedActivityManagement
()
throws
InvocationTargetException
,
IllegalAccessException
{
public
PageInfo
<
ActivityList
>
selectedActivityManagement
(
ActivityManagementQuery
query
)
throws
InvocationTargetException
,
IllegalAccessException
{
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
ActivityList
>
activityLists
=
activityListBiz
.
selectListAll
();
List
<
ActivityList
>
activityLists
=
activityListBiz
.
selectListAll
();
return
activityLists
;
return
PageInfo
.
of
(
activityLists
)
;
}
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
View file @
1db5fb4f
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.biz;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.biz;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.entity.ActivityPopupUser
;
import
com.xxfc.platform.activity.entity.ActivityPopupUser
;
import
com.xxfc.platform.activity.mapper.ActivityPopupMapper
;
import
com.xxfc.platform.activity.mapper.ActivityPopupMapper
;
...
@@ -49,14 +50,15 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
...
@@ -49,14 +50,15 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
return
activityPopups
;
return
activityPopups
;
}
}
List
<
Integer
>
collect
=
activityPopups
.
parallelStream
().
map
(
ActivityPopup:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
collect
=
activityPopups
.
parallelStream
().
map
(
ActivityPopup:
:
getId
).
collect
(
Collectors
.
toList
());
Example
exaple
=
Example
.
builder
(
ActivityPopupUser
.
class
).
where
(
Example
exaple
=
Example
.
builder
(
ActivityPopupUser
.
class
)
WeekendSqls
.<
ActivityPopupUser
>
custom
().
andIn
(
ActivityPopupUser:
:
getPopupId
,
collect
)
.
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
()
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
.
andIn
(
ActivityPopupUser:
:
getPopupId
,
collect
)
).
build
();
).
build
();
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exaple
);
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exaple
);
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
return
activityPopups
;
return
activityPopups
;
}
}
Set
<
Integer
>
popupIdSet
=
activityPopupUsers
.
parallelStream
().
map
(
ActivityPopupUser:
:
getPopupId
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
popupIdSet
=
activityPopupUsers
.
parallelStream
().
map
(
ActivityPopupUser:
:
getPopupId
).
collect
(
Collectors
.
toSet
());
List
<
ActivityPopup
>
result
=
new
ArrayList
<>();
List
<
ActivityPopup
>
result
=
new
ArrayList
<>();
for
(
ActivityPopup
activityPopup
:
activityPopups
)
{
for
(
ActivityPopup
activityPopup
:
activityPopups
)
{
...
@@ -87,21 +89,27 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
...
@@ -87,21 +89,27 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
.
andLessThanOrEqualTo
(
ActivityPopup:
:
getStartTime
,
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()))
.
andLessThanOrEqualTo
(
ActivityPopup:
:
getStartTime
,
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()))
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
Types
.
split
(
","
)))
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
Types
.
split
(
","
)))
.
andEqualTo
(
ActivityPopup:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityPopup:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityPopup:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
).
orderByAsc
(
"sort"
).
build
();
List
<
ActivityPopup
>
activityPopups
=
mapper
.
selectByExample
(
exa
);
List
<
ActivityPopup
>
activityPopups
=
mapper
.
selectByExample
(
exa
);
long
l
=
System
.
currentTimeMillis
();
long
l
=
System
.
currentTimeMillis
();
return
activityPopups
;
return
activityPopups
;
}
}
/**
* 判断是否重复弹窗
* @param userInfo
* @param id
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
setActivityPopup
(
AppUserDTO
userInfo
,
Integer
id
){
public
void
setActivityPopup
(
AppUserDTO
userInfo
,
Integer
id
){
if
(
userInfo
!=
null
)
{
if
(
userInfo
!=
null
)
{
Example
exa
=
Example
.
builder
(
ActivityPopupUser
.
class
).
where
(
Example
exa
=
Example
.
builder
(
ActivityPopupUser
.
class
).
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
()
WeekendSqls
.<
ActivityPopupUser
>
custom
()
.
andEqualTo
(
ActivityPopupUser:
:
getPopupId
,
id
)
.
andEqualTo
(
ActivityPopupUser:
:
getPopupId
,
id
)
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
).
build
();
).
build
();
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exa
);
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exa
);
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
ActivityPopupUser
activityPopupUser
=
new
ActivityPopupUser
();
ActivityPopupUser
activityPopupUser
=
new
ActivityPopupUser
();
...
@@ -114,4 +122,15 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
...
@@ -114,4 +122,15 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
}
}
}
}
public
void
deleteOne
(
Integer
id
)
{
ActivityPopup
activityPopup
=
selectById
(
id
);
if
(
activityPopup
.
getStatus
()==
1
)
{
throw
new
BaseException
(
"Please take it off the shelves first"
);
}
else
{
activityPopup
.
setIsDel
(
1
);
}
updateById
(
activityPopup
);
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/HomeActivitiesBiz.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.HomeActivities
;
import
com.xxfc.platform.activity.mapper.HomeActivitiesMapper
;
import
com.xxfc.platform.activity.vo.ActivitiesQuery
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.util.List
;
/**
* @author Administrator
*/
@Service
public
class
HomeActivitiesBiz
extends
BaseBiz
<
HomeActivitiesMapper
,
HomeActivities
>
{
public
List
<
HomeActivities
>
activities
()
{
long
currentTime
=
System
.
currentTimeMillis
();
Example
exa
=
Example
.
builder
(
HomeActivities
.
class
).
where
(
WeekendSqls
.<
HomeActivities
>
custom
()
.
andGreaterThanOrEqualTo
(
HomeActivities:
:
getEndTime
,
currentTime
)
.
andLessThanOrEqualTo
(
HomeActivities:
:
getStartTime
,
currentTime
)
.
andEqualTo
(
HomeActivities:
:
getStatus
,
1
)
.
andEqualTo
(
HomeActivities:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
return
activityLists
;
}
public
PageInfo
<
HomeActivities
>
getPage
(
ActivitiesQuery
query
)
{
Example
exa
=
new
Example
(
HomeActivities
.
class
);
if
(
StringUtils
.
isNotBlank
(
query
.
getActivitiesName
())){
exa
.
createCriteria
().
andLike
(
"name"
,
"%"
+
query
.
getActivitiesName
()+
"%"
);
}
exa
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
);
exa
.
orderBy
(
"sort"
).
asc
();
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
return
PageInfo
.
of
(
activityLists
);
}
public
void
deleteOne
(
Integer
id
)
{
HomeActivities
homeActivities
=
selectById
(
id
);
if
(
homeActivities
.
getStatus
()==
1
)
{
throw
new
BaseException
(
"Please take it off the shelves first"
);
}
else
{
homeActivities
.
setIsDel
(
1
);
}
updateById
(
homeActivities
);
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
1db5fb4f
...
@@ -269,9 +269,10 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -269,9 +269,10 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if
(
CollectionUtils
.
isEmpty
(
data
))
{
if
(
CollectionUtils
.
isEmpty
(
data
))
{
return
userCouponPag
;
return
userCouponPag
;
}
}
Map
<
Integer
,
AppUserLogin
>
userIdAndAppuserLoginMap
=
null
;
Map
<
Integer
,
AppUserLogin
>
userIdAndAppuserLoginMap
=
new
HashMap
<>();
if
(
Objects
.
nonNull
(
userCouponFindDTO
.
getPhone
()))
{
List
<
Integer
>
userIds
=
data
.
stream
().
map
(
UserCouponDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
userCouponFindDTO
.
getPhone
()))
{
List
<
Integer
>
userIds
=
data
.
stream
().
map
(
UserCouponDTO:
:
getUserId
).
distinct
().
collect
(
Collectors
.
toList
());
userIdAndAppuserLoginMap
=
userFeign
.
findAppUsersByUserIds
(
userIds
);
userIdAndAppuserLoginMap
=
userFeign
.
findAppUsersByUserIds
(
userIds
);
}
}
List
<
UserCouponPageVo
>
userCouponPageVos
=
new
ArrayList
<>();
List
<
UserCouponPageVo
>
userCouponPageVos
=
new
ArrayList
<>();
...
@@ -279,10 +280,10 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -279,10 +280,10 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
for
(
UserCouponDTO
userCouponDTO
:
data
)
{
for
(
UserCouponDTO
userCouponDTO
:
data
)
{
userCouponPageVo
=
new
UserCouponPageVo
();
userCouponPageVo
=
new
UserCouponPageVo
();
BeanUtils
.
copyProperties
(
userCouponDTO
,
userCouponPageVo
);
BeanUtils
.
copyProperties
(
userCouponDTO
,
userCouponPageVo
);
if
(
Objects
.
nonNull
(
userCouponFindDTO
.
getPhone
()))
{
if
(
StringUtils
.
isNotEmpty
(
userCouponFindDTO
.
getPhone
()))
{
userCouponPageVo
.
setPhone
(
userCouponFindDTO
.
getPhone
());
userCouponPageVo
.
setPhone
(
userCouponFindDTO
.
getPhone
());
}
else
{
}
else
{
userCouponPageVo
.
setPhone
(
userIdAndAppuserLoginMap
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
())
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
()).
getUsername
());
userCouponPageVo
.
setPhone
(
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
())
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
()).
getUsername
());
}
}
userCouponPageVos
.
add
(
userCouponPageVo
);
userCouponPageVos
.
add
(
userCouponPageVo
);
}
}
...
@@ -347,4 +348,11 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -347,4 +348,11 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
userInfoDTO
.
setCouponNumber
(
couponNumber
);
userInfoDTO
.
setCouponNumber
(
couponNumber
);
return
userInfoDTO
;
return
userInfoDTO
;
}
}
public
void
deleteByUserIds
(
List
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
UserCoupon
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example
);
}
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/mapper/HomeActivitiesMapper.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
mapper
;
import
com.xxfc.platform.activity.entity.HomeActivities
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* @author Administrator
*/
public
interface
HomeActivitiesMapper
extends
Mapper
<
HomeActivities
>
{
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityListController.java
View file @
1db5fb4f
...
@@ -27,6 +27,4 @@ public class ActivityListController extends BaseController<ActivityListBiz,Activ
...
@@ -27,6 +27,4 @@ public class ActivityListController extends BaseController<ActivityListBiz,Activ
List
<
ActivityList
>
list
=
baseBiz
.
activities
();
List
<
ActivityList
>
list
=
baseBiz
.
activities
();
return
ObjectRestResponse
.
succ
(
list
);
return
ObjectRestResponse
.
succ
(
list
);
}
}
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityManagementController.java
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
rest
;
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.ActivityManagementBiz
;
import
com.xxfc.platform.activity.biz.ActivityManagementBiz
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.ActivityManagement
;
import
com.xxfc.platform.activity.entity.ActivityManagement
;
import
com.xxfc.platform.activity.vo.ActivityManagementQuery
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.InvocationTargetException
;
...
@@ -24,11 +26,10 @@ public class ActivityManagementController extends BaseController<ActivityManagem
...
@@ -24,11 +26,10 @@ public class ActivityManagementController extends BaseController<ActivityManagem
* @throws InvocationTargetException
* @throws InvocationTargetException
* @throws IllegalAccessException
* @throws IllegalAccessException
*/
*/
@RequestMapping
(
"/activity/findAll"
)
@PostMapping
(
"/activity/findAll"
)
public
ObjectRestResponse
<
List
<
ActivityManagement
>>
findAll
()
throws
InvocationTargetException
,
IllegalAccessException
{
public
ObjectRestResponse
findAll
(
@RequestBody
ActivityManagementQuery
query
)
throws
InvocationTargetException
,
IllegalAccessException
{
PageInfo
<
ActivityList
>
pageInfo
=
baseBiz
.
selectedActivityManagement
(
query
);
List
<
ActivityList
>
list
=
baseBiz
.
selectedActivityManagement
();
return
ObjectRestResponse
.
succ
(
pageInfo
);
return
ObjectRestResponse
.
succ
(
list
);
}
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityPopupController.java
View file @
1db5fb4f
...
@@ -38,4 +38,7 @@ public class ActivityPopupController extends ActivityBaseController<ActivityPopu
...
@@ -38,4 +38,7 @@ public class ActivityPopupController extends ActivityBaseController<ActivityPopu
}
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityPopupManageController.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.ActivityPopupBiz
;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.vo.PopupQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
/**
* 弹窗后台
*
* @author Administrator
*/
@RestController
@RequestMapping
(
"activityPopupManage"
)
@Slf4j
public
class
ActivityPopupManageController
extends
BaseController
<
ActivityPopupBiz
,
ActivityPopup
>
{
/**
* 后台列表
* @param query
* @return
*/
@PostMapping
(
value
=
"/manage/findAllByQuery"
)
public
ObjectRestResponse
findAllByQuery
(
@RequestBody
PopupQuery
query
)
{
Example
example
=
new
Example
(
ActivityPopup
.
class
);
if
(
StringUtils
.
isNotBlank
(
query
.
getPopupName
()))
{
example
.
createCriteria
().
andLike
(
"name"
,
"%"
+
query
.
getPopupName
()
+
"%"
);
}
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
ActivityPopup
>
activityPopups
=
baseBiz
.
selectByExample
(
example
);
return
ObjectRestResponse
.
succ
(
PageInfo
.
of
(
activityPopups
));
}
/**
* 查询一条
* @param id
* @return
*/
@PostMapping
(
value
=
"/manage/getOne/{id}"
)
public
ObjectRestResponse
<
ActivityPopup
>
getOne
(
@PathVariable
Integer
id
)
{
Example
exa
=
new
Example
(
ActivityPopup
.
class
);
exa
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
);
exa
.
createCriteria
().
andEqualTo
(
"id"
,
id
);
List
<
ActivityPopup
>
activityPopups
=
baseBiz
.
selectByExample
(
exa
);
if
(
activityPopups
==
null
||
activityPopups
.
size
()==
0
)
{
return
ObjectRestResponse
.
succ
(
new
ActivityPopup
());
}
if
(
activityPopups
.
size
()>
1
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
return
ObjectRestResponse
.
succ
(
activityPopups
.
get
(
0
));
}
/**
* 删除
* @param id
* @return
*/
@DeleteMapping
(
"manage/activity/deleteOne/{id}"
)
public
ObjectRestResponse
deleteOne
(
@PathVariable
Integer
id
){
baseBiz
.
deleteOne
(
id
);
return
ObjectRestResponse
.
succ
();
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/DateController.java
View file @
1db5fb4f
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.rest;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.rest;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.biz.ActivityPopularizeUserBiz
;
import
com.xxfc.platform.activity.biz.ActivityPopularizeUserBiz
;
import
com.xxfc.platform.activity.biz.UserCouponBiz
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -20,12 +21,17 @@ import java.util.List;
...
@@ -20,12 +21,17 @@ import java.util.List;
@RequestMapping
(
"/activity_data"
)
@RequestMapping
(
"/activity_data"
)
public
class
DateController
{
public
class
DateController
{
@Autowired
@Autowired
private
ActivityPopularizeUserBiz
activityPopularizeUserBiz
;
private
ActivityPopularizeUserBiz
activityPopularizeUserBiz
;
@Autowired
private
UserCouponBiz
userCouponBiz
;
@GetMapping
(
"/clear"
)
@GetMapping
(
"/clear"
)
public
ObjectRestResponse
<
Void
>
clearDate
(
@RequestParam
(
value
=
"userIds"
)
List
<
Integer
>
userIds
){
public
ObjectRestResponse
<
Void
>
clearDate
(
@RequestParam
(
value
=
"userIds"
)
List
<
Integer
>
userIds
){
activityPopularizeUserBiz
.
deleteByUserIds
(
userIds
);
activityPopularizeUserBiz
.
deleteByUserIds
(
userIds
);
userCouponBiz
.
deleteByUserIds
(
userIds
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/HomeActivitiesController.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.ActivityListBiz
;
import
com.xxfc.platform.activity.biz.HomeActivitiesBiz
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.HomeActivities
;
import
com.xxfc.platform.activity.vo.ActivitiesQuery
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.web.bind.annotation.*
;
import
tk.mybatis.mapper.entity.Example
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.List
;
/**
* 精彩活动
* @author Administrator
*/
@RestController
@RequestMapping
(
"homeActivities"
)
public
class
HomeActivitiesController
extends
BaseController
<
HomeActivitiesBiz
,
HomeActivities
>
{
/**
* app精彩活动列表
* @return
* @throws InvocationTargetException
* @throws IllegalAccessException
*/
@GetMapping
(
"/app/unauth/activity/findAll"
)
public
ObjectRestResponse
<
List
<
HomeActivities
>>
appFindAll
()
throws
InvocationTargetException
,
IllegalAccessException
{
List
<
HomeActivities
>
list
=
baseBiz
.
activities
();
return
ObjectRestResponse
.
succ
(
list
);
}
/**
* 后台精彩活动列表
* @param query
* @return
*/
@PostMapping
(
"manage/activity/findAll"
)
public
ObjectRestResponse
findAll
(
@RequestBody
ActivitiesQuery
query
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
getPage
(
query
));
}
/**
* 获取一条精彩活动
* @param id
* @return
*/
@PostMapping
(
value
=
"/manage/activity/getOne/{id}"
)
public
ObjectRestResponse
<
HomeActivities
>
getOne
(
@PathVariable
Integer
id
)
{
Example
exa
=
new
Example
(
HomeActivities
.
class
);
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
);
criteria
.
andEqualTo
(
"id"
,
id
);
List
<
HomeActivities
>
homeActivities
=
baseBiz
.
selectByExample
(
exa
);
if
(
homeActivities
==
null
||
homeActivities
.
size
()==
0
)
{
return
ObjectRestResponse
.
succ
(
new
HomeActivities
());
}
if
(
homeActivities
.
size
()>
1
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
return
ObjectRestResponse
.
succ
(
homeActivities
.
get
(
0
));
}
/**
* 删除
* @param id
* @return
*/
@DeleteMapping
(
"manage/activity/deleteOne/{id}"
)
public
ObjectRestResponse
deleteOne
(
@PathVariable
Integer
id
){
baseBiz
.
deleteOne
(
id
);
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/resources/application.yml
0 → 100644
View file @
1db5fb4f
logging
:
config
:
classpath:logback.xml
level
:
com.github.wxiaoqi
:
debug
com.xxfc.platform
:
debug
\ No newline at end of file
xx-activity/xx-activity-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/entity/Cofig.java
View file @
1db5fb4f
...
@@ -65,5 +65,6 @@ public class Cofig implements Serializable {
...
@@ -65,5 +65,6 @@ public class Cofig implements Serializable {
@ApiModelProperty
(
value
=
"标题"
)
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
private
String
title
;
@Column
(
name
=
"params"
)
private
String
params
;
private
String
params
;
}
}
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/entity/vo/WithDrawRuleVo.java
View file @
1db5fb4f
...
@@ -14,14 +14,39 @@ import java.math.BigDecimal;
...
@@ -14,14 +14,39 @@ import java.math.BigDecimal;
public
class
WithDrawRuleVo
{
public
class
WithDrawRuleVo
{
/**
/**
* 提现金额
*
最低
提现金额
*/
*/
private
BigDecimal
a
mount
;
private
BigDecimal
minA
mount
;
/**
/**
* 手续费率
*
提现
手续费率
*/
*/
private
double
proceduReates
;
private
BigDecimal
proceduReates
;
/**
* 月额度
*/
private
BigDecimal
amountOfMonth
;
/**
* 日额度
*/
private
BigDecimal
amountOfDay
;
/**
* 最多提现次数(月)
*/
private
Integer
maxNumberOfMonth
;
/**
* 最多提现次数(日)
*/
private
Integer
maxNumberOfDay
;
/**
* 1. 线上 2.线下
*/
private
Integer
withdrawWay
;
/**
/**
* 规则说明
* 规则说明
...
...
xx-app/xx-app-server/src/main/resources/application.yml
View file @
1db5fb4f
logging
:
config
:
classpath:logback.xml
level
:
com.github.wxiaoqi
:
debug
com.xxfc.platform
:
debug
servlet
:
servlet
:
multipart
:
multipart
:
# 启用上传处理,默认是true
# 启用上传处理,默认是true
...
...
xx-app/xx-app-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
xx-campsite/xx-campsite-server/src/main/resources/application.yml
0 → 100644
View file @
1db5fb4f
logging
:
config
:
classpath:logback.xml
level
:
com.github.wxiaoqi
:
debug
com.xxfc.platform
:
debug
\ No newline at end of file
xx-campsite/xx-campsite-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/ImQuestionBiz.java
View file @
1db5fb4f
...
@@ -42,7 +42,7 @@ public class ImQuestionBiz extends BaseBiz<ImQuestionMapper, ImQuestion> {
...
@@ -42,7 +42,7 @@ public class ImQuestionBiz extends BaseBiz<ImQuestionMapper, ImQuestion> {
PageDataVO
<
QuestionListVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getQuestionList
(
query
.
getSuper
()));
PageDataVO
<
QuestionListVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getQuestionList
(
query
.
getSuper
()));
AppUserDTO
appUserDTO
=
userBiz
.
getUserInfo
();
AppUserDTO
appUserDTO
=
userBiz
.
getUserInfo
();
if
(
appUserDTO
!=
null
)
{
if
(
appUserDTO
!=
null
)
{
pageDataVO
.
getData
().
forEach
((
a
)
->
a
.
setPraise
(
imPraiseBiz
.
isExist
(
appUserDTO
.
getUserid
(),
a
.
getId
())));
pageDataVO
.
getData
().
forEach
((
a
)
->
a
.
setPraise
(
imPraiseBiz
.
isExist
(
appUserDTO
.
get
Im
Userid
(),
a
.
getId
())));
}
}
return
new
ObjectRestResponse
<>().
data
(
pageDataVO
);
return
new
ObjectRestResponse
<>().
data
(
pageDataVO
);
...
...
xx-im/xx-im-server/src/main/resources/application.yml
0 → 100644
View file @
1db5fb4f
logging
:
config
:
classpath:logback.xml
level
:
com.github.wxiaoqi
:
debug
com.xxfc.platform
:
debug
\ No newline at end of file
xx-im/xx-im-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
xx-im/xx-im-server/src/main/resources/mapper/ImCommentMapper.xml
View file @
1db5fb4f
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<select
id=
"selectByQuestionId"
resultType=
"com.xxfc.platform.im.entity.ImComment"
parameterType=
"java.lang.Long"
>
<select
id=
"selectByQuestionId"
resultType=
"com.xxfc.platform.im.entity.ImComment"
parameterType=
"java.lang.Long"
>
select * from im_comment
select * from im_comment
where question_id = #{questionId} and is_del = 0
where question_id = #{questionId} and is_del = 0
order by upd_time
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-im/xx-im-server/src/main/resources/mapper/ImPraiseMapper.xml
View file @
1db5fb4f
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<select
id=
"selectByQuestionId"
resultType=
"com.xxfc.platform.im.entity.ImPraise"
parameterType=
"java.lang.Long"
>
<select
id=
"selectByQuestionId"
resultType=
"com.xxfc.platform.im.entity.ImPraise"
parameterType=
"java.lang.Long"
>
select * from im_praise
select * from im_praise
where question_id = #{questionId} and is_del = 0 and visible = 1
where question_id = #{questionId} and is_del = 0 and visible = 1
order by upd_time
</select>
</select>
<select
id=
"selectByQuestionIdAndTime"
resultType=
"com.xxfc.platform.im.entity.ImPraise"
parameterType=
"com.xxfc.platform.im.dto.ImPraiseDto"
>
<select
id=
"selectByQuestionIdAndTime"
resultType=
"com.xxfc.platform.im.entity.ImPraise"
parameterType=
"com.xxfc.platform.im.dto.ImPraiseDto"
>
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/DailyOrderStatistics.java
0 → 100644
View file @
1db5fb4f
package
com
.
xxfc
.
platform
.
order
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.util.Date
;
@Data
public
class
DailyOrderStatistics
{
@Column
()
private
Date
oneDay
;
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
1db5fb4f
...
@@ -36,6 +36,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -36,6 +36,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.jexl2.MapContext
;
import
org.apache.commons.jexl2.MapContext
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -598,5 +599,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
...
@@ -598,5 +599,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
}
}
}
// @Scheduled(cron = "0 0 2 * * ? ")
// private void countDailyOrdersRegularly(){
// DailyOrderStatistics dailyOrderStatistics= mapper.getTotalOrder();
// }
//
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/BaseOrderMapper.java
View file @
1db5fb4f
...
@@ -26,4 +26,6 @@ public interface BaseOrderMapper extends Mapper<BaseOrder> {
...
@@ -26,4 +26,6 @@ public interface BaseOrderMapper extends Mapper<BaseOrder> {
public
List
<
OrderPageVO
>
getTourList
(
Map
<
String
,
Object
>
paramMap
);
public
List
<
OrderPageVO
>
getTourList
(
Map
<
String
,
Object
>
paramMap
);
public
OrderPageVO
getOrderDetail
(
String
no
);
public
OrderPageVO
getOrderDetail
(
String
no
);
Integer
getTotalOrder
();
}
}
xx-order/xx-order-server/src/main/resources/application.yml
0 → 100644
View file @
1db5fb4f
logging
:
config
:
classpath:logback.xml
level
:
com.github.wxiaoqi
:
debug
com.xxfc.platform
:
debug
\ No newline at end of file
xx-order/xx-order-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
1db5fb4f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.xxfc.platform.order.mapper.BaseOrderMapper"
>
<mapper
namespace=
"com.xxfc.platform.order.mapper.BaseOrderMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.xxfc.platform.order.entity.BaseOrder"
id=
"baseOrderMap"
>
<resultMap
type=
"com.xxfc.platform.order.entity.BaseOrder"
id=
"baseOrderMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"no"
column=
"no"
/>
<result
property=
"no"
column=
"no"
/>
...
@@ -29,13 +29,19 @@
...
@@ -29,13 +29,19 @@
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<discriminator
javaType=
"Integer"
column=
"type"
>
<discriminator
javaType=
"Integer"
column=
"type"
>
<case
value=
"1"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<case
value=
"1"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
</case>
</case>
<case
value=
"2"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<case
value=
"2"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
</case>
</case>
<case
value=
"3"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<case
value=
"3"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
</case>
</case>
</discriminator>
</discriminator>
</resultMap>
</resultMap>
...
@@ -45,20 +51,26 @@
...
@@ -45,20 +51,26 @@
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<discriminator
javaType=
"Integer"
column=
"type"
>
<discriminator
javaType=
"Integer"
column=
"type"
>
<case
value=
"1"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<case
value=
"1"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
</case>
</case>
<case
value=
"2"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<case
value=
"2"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
</case>
</case>
<case
value=
"3"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<case
value=
"3"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
</case>
</case>
</discriminator>
</discriminator>
</resultMap>
</resultMap>
<select
id=
"pageByParm"
parameterType=
"Map"
resultMap=
"orderPageMap"
>
<select
id=
"pageByParm"
parameterType=
"Map"
resultMap=
"orderPageMap"
>
select *
select *
from base_order
from base_order
<where>
<where>
<if
test=
"crtUser != null"
>
<if
test=
"crtUser != null"
>
and crt_user = #{crtUser}
and crt_user = #{crtUser}
...
@@ -82,7 +94,7 @@
...
@@ -82,7 +94,7 @@
and
and
(
(
<foreach
collection=
"multiStatus.split(',')"
index=
"sIndex"
item=
"statusEntity"
separator=
" or "
>
<foreach
collection=
"multiStatus.split(',')"
index=
"sIndex"
item=
"statusEntity"
separator=
" or "
>
status = #{statusEntity}
status = #{statusEntity}
</foreach>
</foreach>
)
)
</if>
</if>
...
@@ -113,7 +125,7 @@
...
@@ -113,7 +125,7 @@
<if
test=
"status != null"
>
<if
test=
"status != null"
>
and b.status = #{status}
and b.status = #{status}
</if>
</if>
<if
test=
"type != null"
>
<if
test=
"type != null"
>
and b.type = #{type}
and b.type = #{type}
</if>
</if>
<if
test=
"no != null"
>
<if
test=
"no != null"
>
...
@@ -123,8 +135,8 @@
...
@@ -123,8 +135,8 @@
and b.name like CONCAT ("%", #{name}, "%")
and b.name like CONCAT ("%", #{name}, "%")
</if>
</if>
<if
test=
"startTime != null"
>
<if
test=
"startTime != null"
>
and r.start_time between
#{startTime} and
#{endTime}
and r.start_time between
#{startTime} and
#{endTime}
or t.start_time between
#{startTime} and
#{endTime}
or t.start_time between
#{startTime} and
#{endTime}
</if>
</if>
<if
test=
"startCompanyId != null"
>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
and r.start_company_id = #{startCompanyId}
...
@@ -143,24 +155,24 @@
...
@@ -143,24 +155,24 @@
from base_order b
from base_order b
LEFT JOIN order_rent_vehicle_detail r on r.order_id = b.id
LEFT JOIN order_rent_vehicle_detail r on r.order_id = b.id
where b.type = 1
where b.type = 1
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
and b.user_id = #{userId}
and b.user_id = #{userId}
</if>
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
and b.status = #{status}
and b.status = #{status}
</if>
</if>
<if
test=
"no != null"
>
<if
test=
"no != null"
>
and no like CONCAT ("%", #{no}, "%")
and no like CONCAT ("%", #{no}, "%")
</if>
</if>
<if
test=
"startTime != null and status == 4"
>
<if
test=
"startTime != null and status == 4"
>
and r.start_time between #{startTime} and
#{endTime}
and r.start_time between #{startTime} and
#{endTime}
</if>
</if>
<if
test=
"startTime != null and status == 5"
>
<if
test=
"startTime != null and status == 5"
>
and r.start_time between #{startTime} and
#{endTime}
and r.start_time between #{startTime} and
#{endTime}
</if>
</if>
<if
test=
"startCompanyId != null"
>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
and r.start_company_id = #{startCompanyId}
</if>
</if>
order by b.crt_time desc
order by b.crt_time desc
</select>
</select>
...
@@ -169,21 +181,21 @@
...
@@ -169,21 +181,21 @@
from base_order b
from base_order b
LEFT JOIN order_tour_detail r on r.order_id = b.id
LEFT JOIN order_tour_detail r on r.order_id = b.id
where b.type = 2
where b.type = 2
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
and b.user_id = #{userId}
and b.user_id = #{userId}
</if>
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
and b.status = #{status}
and b.status = #{status}
</if>
</if>
<if
test=
"no != null"
>
<if
test=
"no != null"
>
and no like CONCAT ("%", #{no}, "%")
and no like CONCAT ("%", #{no}, "%")
</if>
</if>
<if
test=
"startTime != null"
>
<if
test=
"startTime != null"
>
and r.start_time between #{startTime} and
#{endTime}
and r.start_time between #{startTime} and
#{endTime}
</if>
</if>
<if
test=
"startCompanyId != null"
>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
and r.start_company_id = #{startCompanyId}
</if>
</if>
order by b.crt_time desc
order by b.crt_time desc
</select>
</select>
...
@@ -193,4 +205,16 @@
...
@@ -193,4 +205,16 @@
where no = #{no}
where no = #{no}
</select>
</select>
<select
id=
"getTotalOrder"
resultType=
"com.xxfc.platform.order.entity.DailyOrderStatistics"
>
select
date_format(crt_time,'%Y-%c-%d') as oneDay,
SUM(1)
from
base_order
where
date(crt_time)=date(now())-1
group by
date_format(crt_time,'%d')
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-tour/xx-tour-server/src/main/resources/application.yml
0 → 100644
View file @
1db5fb4f
logging
:
config
:
classpath:logback.xml
level
:
com.github.wxiaoqi
:
debug
com.xxfc.platform
:
debug
\ No newline at end of file
xx-tour/xx-tour-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/filter/AcceptFilter.java
deleted
100644 → 0
View file @
51e5b892
package
com
.
xxfc
.
platform
.
universal
.
filter
;
import
ch.qos.logback.classic.spi.ILoggingEvent
;
import
ch.qos.logback.core.filter.Filter
;
import
ch.qos.logback.core.spi.FilterReply
;
public
class
AcceptFilter
extends
Filter
<
ILoggingEvent
>
{
@Override
public
FilterReply
decide
(
ILoggingEvent
event
)
{
return
event
.
getLoggerName
().
startsWith
(
"com.xxfc.platform"
)
?
FilterReply
.
ACCEPT
:
FilterReply
.
DENY
;
}
}
\ No newline at end of file
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/filter/DenyFilter.java
deleted
100644 → 0
View file @
51e5b892
package
com
.
xxfc
.
platform
.
universal
.
filter
;
import
ch.qos.logback.classic.spi.ILoggingEvent
;
import
ch.qos.logback.core.filter.Filter
;
import
ch.qos.logback.core.spi.FilterReply
;
public
class
DenyFilter
extends
Filter
<
ILoggingEvent
>
{
@Override
public
FilterReply
decide
(
ILoggingEvent
event
)
{
return
event
.
getLoggerName
().
startsWith
(
"com.xxfc.platform"
)
?
FilterReply
.
DENY
:
FilterReply
.
ACCEPT
;
}
}
\ No newline at end of file
xx-universal/xx-universal-server/logs/log.2019-07-17.log
deleted
100644 → 0
View file @
51e5b892
xx-universal/xx-universal-server/logs/sys.2019-07-17.log
deleted
100644 → 0
View file @
51e5b892
xx-universal/xx-universal-server/src/main/resources/application.yml
View file @
1db5fb4f
logging
:
logging
:
config
:
classpath:logback.xml
config
:
classpath:logback.xml
level
:
level
:
com.
xxfc.platform.universal
:
com.
github.wxiaoqi
:
debug
debug
com.xxfc.platform
.common
:
com.xxfc.platform
:
debug
debug
servlet
:
servlet
:
multipart
:
multipart
:
...
...
xx-universal/xx-universal-server/src/main/resources/logback.xml
View file @
1db5fb4f
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<configuration
debug=
"false"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 -->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<property
name=
"LOG_HOME"
value=
"logs"
/>
<contextName>
logback
</contextName>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule
conversionWord=
"clr"
converterClass=
"org.springframework.boot.logging.logback.ColorConverter"
/>
<!--输出sql语句-->
<conversionRule
conversionWord=
"wex"
converterClass=
"org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"
/>
<logger
name=
"com.xxfc"
level=
"debug"
/>
<conversionRule
conversionWord=
"wEx"
converterClass=
"org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"
/>
<property
name=
"path"
value=
"logs"
></property>
<!-- 彩色日志格式 -->
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<!--1. 输出到控制台-->
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<encoder>
<
Pattern>
${CONSOLE_LOG_PATTERN}
</Pattern>
<
pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
<
charset>
UTF-8
</charset>
<!-- 设置字符集 --
>
<
/pattern
>
</encoder>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
</appender>
<appender
name=
"LOGSTASH"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<destination>
192.168.0.181:5044
</destination>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<encoder
charset=
"UTF-8"
class=
"net.logstash.logback.encoder.LogstashEncoder"
>
<!--"appname":"springboot21-log-elk" 的作用是指定创建索引的名字时用,并且在生成的文档中会多了这个字段
在logstashindex中引入 index => "%{[appname]}-%{+YYYY.MM.dd}"-->
<customFields>
{"appName":"elk-log-service-operate-dev"}
</customFields>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
</appender>
<root
level=
"INFO"
>
<root>
<appender-ref
ref=
"STDOUT"
/>
<level
value=
"info"
/>
<appender-ref
ref=
"LOGSTASH"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</root>
</configuration>
</configuration>
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleWarningMsgController.java
View file @
1db5fb4f
...
@@ -11,8 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -11,8 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
"/vehicleWarningMsg"
)
@RequestMapping
(
"/vehicleWarningMsg"
)
...
@@ -43,7 +41,6 @@ public class VehicleWarningMsgController{
...
@@ -43,7 +41,6 @@ public class VehicleWarningMsgController{
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
private
RestResponse
<
Integer
>
add
(
@RequestBody
AddVehicleWarningMsgVo
addVehicleWarningMsgVo
)
throws
Exception
{
private
RestResponse
<
Integer
>
add
(
@RequestBody
AddVehicleWarningMsgVo
addVehicleWarningMsgVo
)
throws
Exception
{
new
RestResponse
<
Map
>().
setData
(
new
HashMap
<
String
,
Object
>());
return
vehicleWarningMsgBiz
.
add
(
addVehicleWarningMsgVo
);
return
vehicleWarningMsgBiz
.
add
(
addVehicleWarningMsgVo
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/application.yml
View file @
1db5fb4f
#server:
logging
:
# port: 8091
config
:
classpath:logback.xml
# tomcat:
level
:
# uri-encoding: UTF-8
com.github.wxiaoqi
:
#logging:
debug
# level:
com.xxfc.platform
:
# com.xxfc.platform.vehicle.mapper: debug
debug
#spring:
\ No newline at end of file
# application:
# name: vehicle
# datasource:
# name: test
# url: jdbc:mysql://${MYSQL_HOST:10.5.52.2}:${MYSQL_PORT:3306}/vehicle?useUnicode=true&characterEncoding=UTF8
# username: root
# password: xx2019fc
# # 使用druid数据源
# type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name: com.mysql.jdbc.Driver
# filters: stat
# maxActive: 20
# initialSize: 1
# maxWait: 60000
# minIdle: 1
# timeBetweenEvictionRunsMillis: 60000
# minEvictableIdleTimeMillis: 300000
# validationQuery: select 'x'
# testWhileIdle: true
# testOnBorrow: false
# testOnReturn: false
# poolPreparedStatements: true
# maxOpenPreparedStatements: 20
# cloud:
# nacos:
# discovery:
# server-addr: 10.5.52.2:8848
# sentinel:
# transport:
# dashboard: 10.5.52.2:8080
# jackson:
# date-format: yyyy-MM-dd HH:mm:ss
# time-zone: GMT+8
# default-property-inclusion: non_null
##--------------------以下为redis相关配置----------------------
# redis:
# database: 2
# host: ${REDIS_HOST:10.5.52.3}
# port: ${REDIS_PORT:6379}
# password: xx2019fc
# jedis:
# pool:
# max-active: 20
##--------------------以下为mybatis相关配置----------------------
#mybatis:
# type-aliases-package: com.xxfc.platform.vehicle.entity
# mapper-locations: classpath*:mapper/*.xml
# basepackage: com.xxfc.platform.vehicle.mapper
# xmlLocation: classpath*:mapper/*.xml
# configuration:
# map-underscore-to-camel-case: true
#
#
#
#
#
#
xx-vehicle/xx-vehicle-server/src/main/resources/logback.xml
0 → 100644
View file @
1db5fb4f
<configuration
debug=
"false"
scan=
"true"
scanPeriod=
"10 seconds"
>
<!--<include resource="org/springframework/boot/logging/logback/base.xml"/>-->
<!--<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>-->
<contextName>
logback
</contextName>
<!--输出sql语句-->
<logger
name=
"com.xxfc"
level=
"debug"
/>
<property
name=
"path"
value=
"logs"
></property>
<property
name=
"maxHistory"
value=
"30"
/>
<property
name=
"maxFileSize"
value=
"50MB"
/>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
debug
</level>
</filter>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"debug_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_debug.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_debug.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"info_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_info.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_info.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"warn_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_warn.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_warn.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"error_file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${path}/logback_error.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 每天一归档 -->
<fileNamePattern>
${path}/logback_error.log.%d{yyyy-MM-dd}-%i.zip
</fileNamePattern>
<maxHistory>
${maxHistory}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${maxFileSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%date %level [%thread] %logger{36} [%file : %line] %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug_file"
/>
<appender-ref
ref=
"info_file"
/>
<appender-ref
ref=
"warn_file"
/>
<appender-ref
ref=
"error_file"
/>
</root>
</configuration>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment