Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
c1494636
提交
c1494636
authored
10月 19, 2023
作者:
liruixin
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v5.5_settlement_20231011' into v5.5_settlement_20231011
上级
0b7ebada
6f50c9f6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
162 行增加
和
153 行删除
+162
-153
OwnerAccountDao.java
...rc/main/java/com/clx/performance/dao/OwnerAccountDao.java
+2
-2
OwnerAccountDaoImpl.java
...ava/com/clx/performance/dao/impl/OwnerAccountDaoImpl.java
+2
-2
OwnerAccountMapper.java
...n/java/com/clx/performance/mapper/OwnerAccountMapper.java
+4
-3
OwnerAccountServiceImpl.java
...clx/performance/service/impl/OwnerAccountServiceImpl.java
+8
-8
application.yml
performance-web/src/main/resources/application.yml
+135
-135
JobTest.java
...rmance-web/src/test/java/com/clx/performance/JobTest.java
+11
-3
没有找到文件。
performance-web/src/main/java/com/clx/performance/dao/OwnerAccountDao.java
浏览文件 @
c1494636
...
@@ -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
);
}
}
performance-web/src/main/java/com/clx/performance/dao/impl/OwnerAccountDaoImpl.java
浏览文件 @
c1494636
...
@@ -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
{
...
...
performance-web/src/main/java/com/clx/performance/mapper/OwnerAccountMapper.java
浏览文件 @
c1494636
...
@@ -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
performance-web/src/main/java/com/clx/performance/service/impl/OwnerAccountServiceImpl.java
浏览文件 @
c1494636
...
@@ -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
();
...
...
performance-web/src/main/resources/application.yml
浏览文件 @
c1494636
#
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
performance-web/src/test/java/com/clx/performance/JobTest.java
浏览文件 @
c1494636
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论