Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
张松
2025-01-02 10:45:01 +08:00
10 changed files with 170 additions and 86 deletions

View File

@@ -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() {
}

View File

@@ -49,22 +49,11 @@ public class ShardingConfig {
*/
private String centerTablesDataNode;
@Value("${center-tables}")
private String tableNamesAsString;
/**
* 中心表,不进行分库操作
*/
// @Value("${center-tables}")
private Set<String> centerTables;
@PostConstruct
public void init() {
// 使用换行符进行分割然后去除空白字符收集到Set集合中
centerTables = Arrays.stream(tableNamesAsString.split(","))
.map(String::trim)
.collect(Collectors.toSet());
}
private List<String> centerTables;
/**

View File

@@ -907,13 +907,17 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> 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;

View File

@@ -17,9 +17,9 @@ public class UserVipServiceImpl extends ServiceImpl<UserVipDao, UserVip> impleme
return baseMapper.selectOne(queryWrapper);
}
@Scheduled(cron="0 */1 * * * ?")
// @Scheduled(cron="0 */1 * * * ?")
public void getEndVip() {
baseMapper.updateUserVipByEndTime();
// baseMapper.updateUserVipByEndTime();
}
}

View File

@@ -217,9 +217,11 @@ public class TaskCenterServiceImpl extends ServiceImpl<TaskCenterDao, TaskCenter
}
} else if (taskCenter.getType().equals(3) && taskCenter.getId().equals(1L)) {
InviteAchievement inviteAchievement = inviteAchievementService.getByUserId(userId);
Integer sumOrderNum = 0;
if (inviteAchievement != null) {
sumOrderNum = inviteAchievement.getCount();
}
// Integer sumOrderNum = ordersService.countOrderNum(userId, null);
Integer sumOrderNum = inviteAchievement.getCount();
if (sumOrderNum != null && sumOrderNum < taskCenter.getNumber()) {
return Result.error("领取失败,未达成领取条件");
} else if (recordService.countTaskNum(userId, taskCenter.getId(), null) > 0) {

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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