diff --git a/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java b/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java index 22cf198d..48115bc1 100644 --- a/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java +++ b/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java @@ -23,8 +23,7 @@ import javax.servlet.http.HttpServletRequest; public class AppApiMethodAspect { @Pointcut("!execution(public * (com.sqx.modules.sys.controller.SysLoginController).*(..)) " + - "&& (execution(public * (com.sqx.modules.*.controller.*).*(..)) " + - "|| execution(public * (com.sqx.modules.app.*.controller.*).*(..)))") + "&& execution(public * (com.sqx.modules.*.controller..*).*(..)))") public void pkg() { } diff --git a/src/main/java/com/sqx/config/ShardingConfig.java b/src/main/java/com/sqx/config/ShardingConfig.java index f8efb899..297a772f 100644 --- a/src/main/java/com/sqx/config/ShardingConfig.java +++ b/src/main/java/com/sqx/config/ShardingConfig.java @@ -49,22 +49,11 @@ public class ShardingConfig { */ private String centerTablesDataNode; - @Value("${center-tables}") - private String tableNamesAsString; /** * 中心表,不进行分库操作 */ -// @Value("${center-tables}") - private Set centerTables; - - @PostConstruct - public void init() { - // 使用换行符进行分割,然后去除空白字符,收集到Set集合中 - centerTables = Arrays.stream(tableNamesAsString.split(",")) - .map(String::trim) - .collect(Collectors.toSet()); - } + private List centerTables; /** diff --git a/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java b/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java index d9b3425d..b0dab570 100644 --- a/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java +++ b/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java @@ -907,13 +907,17 @@ public class UserServiceImpl extends ServiceImpl implements if (StringUtils.isEmpty(msg)) { return Result.error("验证码不能为空!"); } - Msg msg1 = null; - if (!"prod".equals(profiles) && !"61626364".equals(msg)) { - msg1 = msgDao.findByPhoneAndCode(phone, msg); - if (msg1 == null) { - return Result.error("验证码不正确!"); - } + Msg msg1 = msgDao.findByPhoneAndCode(phone, msg); + if (msg1 == null) { + return Result.error("验证码不正确!"); } +// Msg msg1 = null; +// if (!"prod".equals(profiles) || !"61626364".equals(msg)) { +// msg1 = msgDao.findByPhoneAndCode(phone, msg); +// if (msg1 == null) { +// return Result.error("验证码不正确!"); +// } +// } userInfo = new UserEntity(); UserEntity userEntity = null; diff --git a/src/main/java/com/sqx/modules/app/service/impl/UserVipServiceImpl.java b/src/main/java/com/sqx/modules/app/service/impl/UserVipServiceImpl.java index 839dcde5..8eb4b287 100644 --- a/src/main/java/com/sqx/modules/app/service/impl/UserVipServiceImpl.java +++ b/src/main/java/com/sqx/modules/app/service/impl/UserVipServiceImpl.java @@ -17,9 +17,9 @@ public class UserVipServiceImpl extends ServiceImpl impleme return baseMapper.selectOne(queryWrapper); } - @Scheduled(cron="0 */1 * * * ?") +// @Scheduled(cron="0 */1 * * * ?") public void getEndVip() { - baseMapper.updateUserVipByEndTime(); +// baseMapper.updateUserVipByEndTime(); } } diff --git a/src/main/java/com/sqx/modules/taskCenter/service/impl/TaskCenterServiceImpl.java b/src/main/java/com/sqx/modules/taskCenter/service/impl/TaskCenterServiceImpl.java index 1317a230..638bf400 100644 --- a/src/main/java/com/sqx/modules/taskCenter/service/impl/TaskCenterServiceImpl.java +++ b/src/main/java/com/sqx/modules/taskCenter/service/impl/TaskCenterServiceImpl.java @@ -217,9 +217,11 @@ public class TaskCenterServiceImpl extends ServiceImpl 0) { diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 54eea696..cdee1a59 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,3 +1,10 @@ +swagger: + enabled: true +pay: + h5BaseUrl: https://video-h5.hnsiyao.cn/me/detail/detail?allId= + orderNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/notify + extractNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/extractNotify + # 数据源的一些配置 driver-class-name: com.mysql.cj.jdbc.Driver # 最小空闲连接,默认值10,小于0或大于maximum-pool-size,都会重置为maximum-pool-size @@ -50,10 +57,3 @@ spring: slave-data-source-names: slave-0 # - master-0 # - slave-0 - -swagger: - enabled: true -pay: - h5BaseUrl: https://video-h5.hnsiyao.cn/me/detail/detail?allId= - orderNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/notify - extractNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/extractNotify diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 54eea696..0ab4e7de 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -1,3 +1,10 @@ +swagger: + enabled: true +pay: + h5BaseUrl: https://video-h5.hnsiyao.cn/me/detail/detail?allId= + orderNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/notify + extractNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/extractNotify + # 数据源的一些配置 driver-class-name: com.mysql.cj.jdbc.Driver # 最小空闲连接,默认值10,小于0或大于maximum-pool-size,都会重置为maximum-pool-size @@ -47,13 +54,5 @@ spring: #数据源 duanju: master-data-source-name: master-0 - slave-data-source-names: slave-0 -# - master-0 -# - slave-0 - -swagger: - enabled: true -pay: - h5BaseUrl: https://video-h5.hnsiyao.cn/me/detail/detail?allId= - orderNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/notify - extractNotifyUrl: https://video.hnsiyao.cn/czg/app/wuyou/extractNotify + slave-data-source-names: + - slave-0 \ No newline at end of file diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 89747895..12880fb9 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -1,3 +1,10 @@ +swagger: + enabled: false +pay: + h5BaseUrl: https://dj-h5.hnsiyao.cn/me/detail/detail?allId= + orderNotifyUrl: https://pay.hnsiyao.cn/czg/app/wuyou/notify + extractNotifyUrl: https://pay.hnsiyao.cn/czg/app/wuyou/extractNotify + # 数据源的一些配置 driver-class-name: com.mysql.cj.jdbc.Driver # 最小空闲连接,默认值10,小于0或大于maximum-pool-size,都会重置为maximum-pool-size @@ -40,6 +47,26 @@ spring: idle-timeout: ${idle-timeout} max-lifetime: ${max-lifetime} connection-timeout: ${connection-timeout} + slave-1: + driver-class-name: ${driver-class-name} + jdbc-url: jdbc:mysql://172.18.96.9:3306/duanju?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT + username: root + password: VideoUser1@ + minimum-idle: ${minimum-idle} + maximum-pool-size: ${maximum-pool-size} + idle-timeout: ${idle-timeout} + max-lifetime: ${max-lifetime} + connection-timeout: ${connection-timeout} + slave-2: + driver-class-name: ${driver-class-name} + jdbc-url: jdbc:mysql://172.18.96.8:3306/duanju?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT + username: root + password: VideoUser1@ + minimum-idle: ${minimum-idle} + maximum-pool-size: ${maximum-pool-size} + idle-timeout: ${idle-timeout} + max-lifetime: ${max-lifetime} + connection-timeout: ${connection-timeout} # 数据源配置end # 读写分离配置begin @@ -47,13 +74,7 @@ spring: #数据源 duanju: master-data-source-name: master-0 - slave-data-source-names: slave-0 -# - master-0 + slave-data-source-names: slave-0,slave-1,slave-2 # - slave-0 - -swagger: - enabled: false -pay: - h5BaseUrl: https://dj-h5.hnsiyao.cn/me/detail/detail?allId= - orderNotifyUrl: https://pay.hnsiyao.cn/czg/app/wuyou/notify - extractNotifyUrl: https://pay.hnsiyao.cn/czg/app/wuyou/extractNotify +# - slave-1 +# - slave-2 diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 80305245..00000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -center-tables=activity,app,banner,cash_out,comment_good,common_info,complet_award,coupon,coupon_user,course,course_classification,course_collect,course_comment,course_details,course_user,disc_spinning,disc_spinning_amount,disc_spinning_record,help_classify,help_word,invite,invite_award,invite_money,message_info,msg,orders,pay_classify,pay_details,qrtz_blob_triggers,qrtz_calendars,qrtz_cron_triggers,qrtz_fired_triggers,qrtz_job_details,qrtz_locks,qrtz_paused_trigger_grps,qrtz_scheduler_state,qrtz_simple_triggers,qrtz_simprop_triggers,qrtz_triggers,schedule_job,schedule_job_log,sdk_info,sdk_type,search,sys_captcha,sys_config,sys_dict,sys_log,sys_menu,sys_oss,sys_role,sys_role_menu,sys_user,sys_user_role,sys_user_token,task_center,task_center_record,task_center_reward,tb_user,uni_ad_callback_record,url_address,user_integral,user_integral_details,user_money,user_money_details,user_prize_exchange,user_sign_record,user_vip,vip_details,invite_achievement \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 508a1738..8ba8123c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -14,41 +14,6 @@ server: servlet: context-path: /czg -spring: - main: - allow-circular-references: true - allow-bean-definition-overriding: true - # 环境 dev|test|prod - profiles: - active: dev - # jackson时间格式化 - jackson: - time-zone: GMT+8 - date-format: yyyy-MM-dd HH:mm:ss - servlet: - multipart: - max-file-size: 10240MB - max-request-size: 10240MB - enabled: true - redis: - open: true # 是否开启redis缓存 true开启 false关闭 - database: 0 - host: localhost - port: 6379 - password: 111111 # 密码(默认为空) - timeout: 6000ms # 连接超时时长(毫秒) - jedis: - pool: - max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) - max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制) - max-idle: 10 # 连接池中的最大空闲连接 - min-idle: 5 # 连接池中的最小空闲连接 - mvc: - throw-exception-if-no-handler-found: true -# pathmatch: -# matching-strategy: ant_path_matcher - - management: health: db: @@ -93,3 +58,109 @@ sqx: limit: urlRate: 10 # 同一用户单url每秒限制次数 ipJumpLimit: 4 # 同一ip每分钟跳动次数 + +spring: + main: + allow-circular-references: true + allow-bean-definition-overriding: true + # 环境 dev|test|prod + profiles: + active: local + # jackson时间格式化 + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + servlet: + multipart: + max-file-size: 10240MB + max-request-size: 10240MB + enabled: true + redis: + open: true # 是否开启redis缓存 true开启 false关闭 + database: 0 + host: localhost + port: 6379 + password: 111111 # 密码(默认为空) + timeout: 6000ms # 连接超时时长(毫秒) + jedis: + pool: + max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) + max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制) + max-idle: 10 # 连接池中的最大空闲连接 + min-idle: 5 # 连接池中的最小空闲连接 + mvc: + throw-exception-if-no-handler-found: true +# pathmatch: +# matching-strategy: ant_path_matcher + shardingsphere: + center-tables: + - activity + - app + - banner + - cash_out + - comment_good + - common_info + - complet_award + - coupon + - coupon_user + - course + - course_classification + - course_collect + - course_comment + - course_details + - course_user + - disc_spinning + - disc_spinning_amount + - disc_spinning_record + - help_classify + - help_word + - invite + - invite_award + - invite_money + - message_info + - msg + - orders + - pay_classify + - pay_details + - qrtz_blob_triggers + - qrtz_calendars + - qrtz_cron_triggers + - qrtz_fired_triggers + - qrtz_job_details + - qrtz_locks + - qrtz_paused_trigger_grps + - qrtz_scheduler_state + - qrtz_simple_triggers + - qrtz_simprop_triggers + - qrtz_triggers + - schedule_job + - schedule_job_log + - sdk_info + - sdk_type + - search + - sys_captcha + - sys_config + - sys_dict + - sys_log + - sys_menu + - sys_oss + - sys_role + - sys_role_menu + - sys_user + - sys_user_role + - sys_user_token + - task_center + - task_center_record + - task_center_reward + - tb_user + - uni_ad_callback_record + - url_address + - user_integral + - user_integral_details + - user_money + - user_money_details + - user_prize_exchange + - user_sign_record + - user_vip + - vip_details + - invite_achievement \ No newline at end of file