提交 c1494636 authored 作者: liruixin's avatar liruixin

Merge remote-tracking branch 'origin/v5.5_settlement_20231011' into v5.5_settlement_20231011

...@@ -17,8 +17,8 @@ public interface OwnerAccountDao extends BaseDao<OwnerAccountMapper, OwnerAccoun ...@@ -17,8 +17,8 @@ public interface OwnerAccountDao extends BaseDao<OwnerAccountMapper, OwnerAccoun
OwnerAccount getAccountByOwnerUserNoAndAccountType(Long ownerUserNo, Integer accountType); OwnerAccount getAccountByOwnerUserNoAndAccountType(Long ownerUserNo, Integer accountType);
int updateOwnerAccountForConfirm(OwnerAccount account); Integer updateOwnerAccountForConfirm(OwnerAccount account);
int updateAccountCAS(OwnerAccount account, LocalDateTime now, boolean flag); Integer updateAccountCAS(OwnerAccount account, LocalDateTime now, boolean flag);
} }
...@@ -39,12 +39,12 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc ...@@ -39,12 +39,12 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc
@Override @Override
public int updateOwnerAccountForConfirm(OwnerAccount account) { public Integer updateOwnerAccountForConfirm(OwnerAccount account) {
return baseMapper.updateOwnerAccountForConfirm(account); return baseMapper.updateOwnerAccountForConfirm(account);
} }
@Override @Override
public int updateAccountCAS(OwnerAccount account, LocalDateTime now, boolean flag) { public Integer updateAccountCAS(OwnerAccount account, LocalDateTime now, boolean flag) {
if (flag) { if (flag) {
return baseMapper.addAccount(account, now); return baseMapper.addAccount(account, now);
} else { } else {
......
...@@ -23,11 +23,11 @@ public interface OwnerAccountMapper extends BaseMapper<OwnerAccount> { ...@@ -23,11 +23,11 @@ public interface OwnerAccountMapper extends BaseMapper<OwnerAccount> {
IPage<OwnerAccountVO> pageList(Page<OwnerAccountVO> page, PageOwnerAccountListParam param); IPage<OwnerAccountVO> pageList(Page<OwnerAccountVO> page, PageOwnerAccountListParam param);
@SelectProvider(type = OwnerAccountSqlProvider.class, method = "addAccount") @SelectProvider(type = OwnerAccountSqlProvider.class, method = "addAccount")
int addAccount(OwnerAccount account, LocalDateTime now); Integer addAccount(OwnerAccount account, LocalDateTime now);
@SelectProvider(type = OwnerAccountSqlProvider.class, method = "subAccount") @SelectProvider(type = OwnerAccountSqlProvider.class, method = "subAccount")
int subAccount(OwnerAccount account, LocalDateTime now); Integer subAccount(OwnerAccount account, LocalDateTime now);
@SelectProvider(type = OwnerAccountSqlProvider.class, method = "updateOwnerAccountForConfirm") @SelectProvider(type = OwnerAccountSqlProvider.class, method = "updateOwnerAccountForConfirm")
int updateOwnerAccountForConfirm(OwnerAccount account); Integer updateOwnerAccountForConfirm(OwnerAccount account);
} }
\ No newline at end of file
...@@ -148,8 +148,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -148,8 +148,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update.setAccountBalance(caseOutBalance); update.setAccountBalance(caseOutBalance);
update.setModifiedTime(account.getModifiedTime()); update.setModifiedTime(account.getModifiedTime());
update.setId(account.getId()); update.setId(account.getId());
int flag = ownerAccountDao.updateAccountCAS(update, now, false); Integer flag = ownerAccountDao.updateAccountCAS(update, now, false);
if (flag > 0) { if (null != flag) {
break; break;
} }
} }
...@@ -194,8 +194,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -194,8 +194,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update.setFrozenBalance(caseOutBalance); update.setFrozenBalance(caseOutBalance);
update.setModifiedTime(account.getModifiedTime()); update.setModifiedTime(account.getModifiedTime());
update.setId(account.getId()); update.setId(account.getId());
int flag = ownerAccountDao.updateAccountCAS(update, now, false); Integer flag = ownerAccountDao.updateAccountCAS(update, now, false);
if (flag > 0) { if (null != flag) {
break; break;
} }
} }
...@@ -254,8 +254,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -254,8 +254,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update.setUsableBalance(topUpBalance); update.setUsableBalance(topUpBalance);
update.setId(account.getId()); update.setId(account.getId());
update.setModifiedTime(account.getModifiedTime()); update.setModifiedTime(account.getModifiedTime());
int flag = ownerAccountDao.updateAccountCAS(update, now, true); Integer flag = ownerAccountDao.updateAccountCAS(update, now, true);
if (flag > 0) { if (null != flag) {
break; break;
} }
} }
...@@ -320,7 +320,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -320,7 +320,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update.setFrozenBalance(caseOutBalance); update.setFrozenBalance(caseOutBalance);
update.setId(account.getId()); update.setId(account.getId());
update.setModifiedTime(account.getModifiedTime()); update.setModifiedTime(account.getModifiedTime());
int flag = ownerAccountDao.updateOwnerAccountForConfirm(update); Integer flag = ownerAccountDao.updateOwnerAccountForConfirm(update);
if (flag > 0) { if (flag > 0) {
break; break;
} }
...@@ -599,7 +599,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -599,7 +599,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
while (true) { while (true) {
int flag = 0; Integer flag = 0;
List<OwnerAccount> accountList = ownerAccountDao.accountInfo(userNo); List<OwnerAccount> accountList = ownerAccountDao.accountInfo(userNo);
for (OwnerAccount ownerAccount : accountList) { for (OwnerAccount ownerAccount : accountList) {
OwnerAccount entity = new OwnerAccount(); OwnerAccount entity = new OwnerAccount();
......
#server: server:
# port: 8081 port: 8081
#
#spring: spring:
# rabbitmq: rabbitmq:
# host: 39.101.187.243 host: 39.101.187.243
# port: 5672 port: 5672
# username: clxmq username: clxmq
# password: clxmq711 password: clxmq711
#
# redis: redis:
# host: 47.92.223.27 host: 47.92.223.27
# port: 6379 port: 6379
# password: clx!2022clx password: clx!2022clx
# jedis: jedis:
# pool: pool:
# max-idle: 100 max-idle: 100
# min-idle: 1 min-idle: 1
# max-active: 1000 max-active: 1000
# max-wait: -1 max-wait: -1
#
# datasource: datasource:
# driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://rm-8vb9qx47d6dh4b9s25o.mysql.zhangbei.rds.aliyuncs.com:3306/clx_performance?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT url: jdbc:mysql://rm-8vb9qx47d6dh4b9s25o.mysql.zhangbei.rds.aliyuncs.com:3306/clx_performance?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT
# username: clxdevelop username: clxdevelop
# password: CLXdevelop#20231 password: CLXdevelop#20231
#
# druid: druid:
# initial-size: 4 initial-size: 4
# min-idle: 4 min-idle: 4
# max-active: 8 max-active: 8
# max-wait: 10000 max-wait: 10000
# # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# time-between-eviction-runs-millis: 60000 time-between-eviction-runs-millis: 60000
# # 配置一个连接在池中最小生存的时间,单位是毫秒 # 配置一个连接在池中最小生存的时间,单位是毫秒
# min-evictable-idle-time-millis: 1800000 min-evictable-idle-time-millis: 1800000
# validation-query: SELECT 1 validation-query: SELECT 1
# test-while-idle: true test-while-idle: true
# test-on-borrow: false test-on-borrow: false
# test-on-return: false test-on-return: false
# # 是否缓存preparedStatement,也就是PSCache。 # 是否缓存preparedStatement,也就是PSCache。
# pool-prepared-statements: true pool-prepared-statements: true
# # 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。 # 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。
# max-pool-prepared-statement-per-connection-size: 20 max-pool-prepared-statement-per-connection-size: 20
# filters: stat,wall filters: stat,wall
# # filter相关配置 # filter相关配置
# filter: filter:
# stat: stat:
# enabled: true enabled: true
# db-type: mysql db-type: mysql
# log-slow-sql: true log-slow-sql: true
# slow-sql-millis: 500 slow-sql-millis: 500
# merge-sql: true merge-sql: true
# slf4j: slf4j:
# enabled: true enabled: true
# statement-log-error-enabled: true statement-log-error-enabled: true
# statement-create-after-log-enabled: false statement-create-after-log-enabled: false
# statement-close-after-log-enabled: false statement-close-after-log-enabled: false
# result-set-open-after-log-enabled: false result-set-open-after-log-enabled: false
# result-set-close-after-log-enabled: false result-set-close-after-log-enabled: false
#
# web-stat-filter: web-stat-filter:
# enabled: true enabled: true
# url-pattern: /* url-pattern: /*
# exclusions: "/druid/*" exclusions: "/druid/*"
# session-stat-enable: true session-stat-enable: true
# session-stat-max-count: 1000 session-stat-max-count: 1000
# # 监控页面相关配置 # 监控页面相关配置
# stat-view-servlet: stat-view-servlet:
# enabled: true enabled: true
# allow: "" allow: ""
# url-pattern: /druid/* url-pattern: /druid/*
# reset-enable: false reset-enable: false
# login-username: clx login-username: clx
# login-password: Apm!Q@Wm888 login-password: Apm!Q@Wm888
# aop-patterns: "com.msl.report.dao.*" aop-patterns: "com.msl.report.dao.*"
#
#xxl: xxl:
# job: job:
# admin: admin:
# address: http://job.devclx.cn/xxl-job address: http://job.devclx.cn/xxl-job
# executor: executor:
# access-token: default_token access-token: default_token
# app-name: clx-performance app-name: clx-performance
# log-path: ./logs/clx-performance/job/ log-path: ./logs/clx-performance/job/
# log-retention-days: 15 log-retention-days: 15
#
## Sa-Token配置 # Sa-Token配置
#sa-token: sa-token:
# # token名称 (同时也是cookie名称) # token名称 (同时也是cookie名称)
# token-name: token token-name: token
# # token有效期,单位s 默认30天, -1代表永不过期 # token有效期,单位s 默认30天, -1代表永不过期
# timeout: 2592000 timeout: 2592000
# # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒,默认-1 代表不限制 (例如可以设置为1800代表30分钟内无操作就过期) # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒,默认-1 代表不限制 (例如可以设置为1800代表30分钟内无操作就过期)
# activity-timeout: -1 activity-timeout: -1
# # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录) # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
# is-concurrent: true is-concurrent: true
# # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token) # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
# is-share: false is-share: false
# # token风格 # token风格
# token-style: simple-uuid token-style: simple-uuid
# # 是否打印操作日志 # 是否打印操作日志
# is-log: false is-log: false
# # 是否在初始化配置时打印版本字符画 # 是否在初始化配置时打印版本字符画
# is-print: false is-print: false
#
# alone-redis: alone-redis:
# # Redis数据库索引(默认为0) # Redis数据库索引(默认为0)
# database: 0 database: 0
# # Redis服务器地址 # Redis服务器地址
# host: 192.168.9.30 host: 192.168.9.30
# # Redis服务器连接端口 # Redis服务器连接端口
# port: 6379 port: 6379
# # Redis服务器连接密码(默认为空) # Redis服务器连接密码(默认为空)
# password: clx!2022clx password: clx!2022clx
# # 连接超时时间 # 连接超时时间
# timeout: 10s timeout: 10s
#
#
## 日志级别 # 日志级别
#logging: logging:
# level: level:
# root: INFO root: INFO
#mybatis-plus: mybatis-plus:
# configuration: configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#
#
##中交兴路 #中交兴路
#gps: gps:
# zhongjiao: zhongjiao:
# user: bd63d655-f5d1-4724-8086-0db2858fcd43 user: bd63d655-f5d1-4724-8086-0db2858fcd43
# pwd: iBJ5Y079u234jl985ICV81Y3j4zg37 pwd: iBJ5Y079u234jl985ICV81Y3j4zg37
# srt: 1db92c4e-8380-4436-a010-5d0fef214947 srt: 1db92c4e-8380-4436-a010-5d0fef214947
# cid: 9dae7170-476a-4a2a-8a9e-3bca075ac9da cid: 9dae7170-476a-4a2a-8a9e-3bca075ac9da
...@@ -10,10 +10,12 @@ import com.clx.performance.component.OrderGoodsStatusLazyComponent; ...@@ -10,10 +10,12 @@ import com.clx.performance.component.OrderGoodsStatusLazyComponent;
import com.clx.performance.constant.RabbitKeyConstants; import com.clx.performance.constant.RabbitKeyConstants;
import com.clx.performance.constant.RedisConstants; import com.clx.performance.constant.RedisConstants;
import com.clx.performance.dao.OrderGoodsDao; import com.clx.performance.dao.OrderGoodsDao;
import com.clx.performance.dao.OwnerAccountDao;
import com.clx.performance.enums.OrderGoodsStatusEnum; import com.clx.performance.enums.OrderGoodsStatusEnum;
import com.clx.performance.enums.OrderGoodsTruckBindEnum; import com.clx.performance.enums.OrderGoodsTruckBindEnum;
import com.clx.performance.mapper.OrderGoodsMapper; import com.clx.performance.mapper.OrderGoodsMapper;
import com.clx.performance.model.OrderGoods; import com.clx.performance.model.OrderGoods;
import com.clx.performance.model.OwnerAccount;
import com.msl.common.base.Optional; import com.msl.common.base.Optional;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
...@@ -52,10 +54,16 @@ public class JobTest { ...@@ -52,10 +54,16 @@ public class JobTest {
@Autowired @Autowired
private OrderGoodsDao orderGoodsDao; private OrderGoodsDao orderGoodsDao;
@Autowired
private OwnerAccountDao ownerAccountDao;
@Test @Test
public void test1() { public void test1() {
List<OrderOwnTruckVo> orderOwnTruckVos = orderFeign.selectTruckListFeign("PT2023092700041"); OwnerAccount account = new OwnerAccount();
List<String> collect = orderOwnTruckVos.stream().map(OrderOwnTruckVo::getTruckNo).collect(Collectors.toList()); account.setId(7);
System.out.println(collect); account.setModifiedTime(LocalDateTime.now());
Integer i = ownerAccountDao.updateAccountCAS(account, LocalDateTime.now(), false);
System.out.println(i);
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论