Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
97b53c63
提交
97b53c63
authored
10月 19, 2023
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
冻结资金相关
上级
b3a459cb
隐藏空白字符变更
内嵌
并排
正在显示
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
浏览文件 @
97b53c63
...
...
@@ -17,8 +17,8 @@ public interface OwnerAccountDao extends BaseDao<OwnerAccountMapper, OwnerAccoun
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
浏览文件 @
97b53c63
...
...
@@ -39,12 +39,12 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc
@Override
public
int
updateOwnerAccountForConfirm
(
OwnerAccount
account
)
{
public
Integer
updateOwnerAccountForConfirm
(
OwnerAccount
account
)
{
return
baseMapper
.
updateOwnerAccountForConfirm
(
account
);
}
@Override
public
int
updateAccountCAS
(
OwnerAccount
account
,
LocalDateTime
now
,
boolean
flag
)
{
public
Integer
updateAccountCAS
(
OwnerAccount
account
,
LocalDateTime
now
,
boolean
flag
)
{
if
(
flag
)
{
return
baseMapper
.
addAccount
(
account
,
now
);
}
else
{
...
...
performance-web/src/main/java/com/clx/performance/mapper/OwnerAccountMapper.java
浏览文件 @
97b53c63
...
...
@@ -23,11 +23,11 @@ public interface OwnerAccountMapper extends BaseMapper<OwnerAccount> {
IPage
<
OwnerAccountVO
>
pageList
(
Page
<
OwnerAccountVO
>
page
,
PageOwnerAccountListParam
param
);
@SelectProvider
(
type
=
OwnerAccountSqlProvider
.
class
,
method
=
"addAccount"
)
int
addAccount
(
OwnerAccount
account
,
LocalDateTime
now
);
Integer
addAccount
(
OwnerAccount
account
,
LocalDateTime
now
);
@SelectProvider
(
type
=
OwnerAccountSqlProvider
.
class
,
method
=
"subAccount"
)
int
subAccount
(
OwnerAccount
account
,
LocalDateTime
now
);
Integer
subAccount
(
OwnerAccount
account
,
LocalDateTime
now
);
@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
浏览文件 @
97b53c63
...
...
@@ -148,8 +148,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update
.
setAccountBalance
(
caseOutBalance
);
update
.
setModifiedTime
(
account
.
getModifiedTime
());
update
.
setId
(
account
.
getId
());
int
flag
=
ownerAccountDao
.
updateAccountCAS
(
update
,
now
,
false
);
if
(
flag
>
0
)
{
Integer
flag
=
ownerAccountDao
.
updateAccountCAS
(
update
,
now
,
false
);
if
(
null
!=
flag
)
{
break
;
}
}
...
...
@@ -194,8 +194,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update
.
setFrozenBalance
(
caseOutBalance
);
update
.
setModifiedTime
(
account
.
getModifiedTime
());
update
.
setId
(
account
.
getId
());
int
flag
=
ownerAccountDao
.
updateAccountCAS
(
update
,
now
,
false
);
if
(
flag
>
0
)
{
Integer
flag
=
ownerAccountDao
.
updateAccountCAS
(
update
,
now
,
false
);
if
(
null
!=
flag
)
{
break
;
}
}
...
...
@@ -254,8 +254,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update
.
setUsableBalance
(
topUpBalance
);
update
.
setId
(
account
.
getId
());
update
.
setModifiedTime
(
account
.
getModifiedTime
());
int
flag
=
ownerAccountDao
.
updateAccountCAS
(
update
,
now
,
true
);
if
(
flag
>
0
)
{
Integer
flag
=
ownerAccountDao
.
updateAccountCAS
(
update
,
now
,
true
);
if
(
null
!=
flag
)
{
break
;
}
}
...
...
@@ -320,7 +320,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update
.
setFrozenBalance
(
caseOutBalance
);
update
.
setId
(
account
.
getId
());
update
.
setModifiedTime
(
account
.
getModifiedTime
());
int
flag
=
ownerAccountDao
.
updateOwnerAccountForConfirm
(
update
);
Integer
flag
=
ownerAccountDao
.
updateOwnerAccountForConfirm
(
update
);
if
(
flag
>
0
)
{
break
;
}
...
...
@@ -599,7 +599,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
LocalDateTime
now
=
LocalDateTime
.
now
();
while
(
true
)
{
int
flag
=
0
;
Integer
flag
=
0
;
List
<
OwnerAccount
>
accountList
=
ownerAccountDao
.
accountInfo
(
userNo
);
for
(
OwnerAccount
ownerAccount
:
accountList
)
{
OwnerAccount
entity
=
new
OwnerAccount
();
...
...
performance-web/src/main/resources/application.yml
浏览文件 @
97b53c63
#
server:
#
port: 8081
#
#
spring:
#
rabbitmq:
#
host: 39.101.187.243
#
port: 5672
#
username: clxmq
#
password: clxmq711
#
#
redis:
#
host: 47.92.223.27
#
port: 6379
#
password: clx!2022clx
#
jedis:
#
pool:
#
max-idle: 100
#
min-idle: 1
#
max-active: 1000
#
max-wait: -1
#
#
datasource:
#
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
#
username: clxdevelop
#
password: CLXdevelop#20231
#
#
druid:
#
initial-size: 4
#
min-idle: 4
#
max-active: 8
#
max-wait: 10000
#
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
#
time-between-eviction-runs-millis: 60000
#
# 配置一个连接在池中最小生存的时间,单位是毫秒
#
min-evictable-idle-time-millis: 1800000
#
validation-query: SELECT 1
#
test-while-idle: true
#
test-on-borrow: false
#
test-on-return: false
#
# 是否缓存preparedStatement,也就是PSCache。
#
pool-prepared-statements: true
#
# 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。
#
max-pool-prepared-statement-per-connection-size: 20
#
filters: stat,wall
#
# filter相关配置
#
filter:
#
stat:
#
enabled: true
#
db-type: mysql
#
log-slow-sql: true
#
slow-sql-millis: 500
#
merge-sql: true
#
slf4j:
#
enabled: true
#
statement-log-error-enabled: true
#
statement-create-after-log-enabled: false
#
statement-close-after-log-enabled: false
#
result-set-open-after-log-enabled: false
#
result-set-close-after-log-enabled: false
#
#
web-stat-filter:
#
enabled: true
#
url-pattern: /*
#
exclusions: "/druid/*"
#
session-stat-enable: true
#
session-stat-max-count: 1000
#
# 监控页面相关配置
#
stat-view-servlet:
#
enabled: true
#
allow: ""
#
url-pattern: /druid/*
#
reset-enable: false
#
login-username: clx
#
login-password: Apm!Q@Wm888
#
aop-patterns: "com.msl.report.dao.*"
#
#
xxl:
#
job:
#
admin:
#
address: http://job.devclx.cn/xxl-job
#
executor:
#
access-token: default_token
#
app-name: clx-performance
#
log-path: ./logs/clx-performance/job/
#
log-retention-days: 15
#
#
#
Sa-Token配置
#
sa-token:
#
# token名称 (同时也是cookie名称)
#
token-name: token
#
# token有效期,单位s 默认30天, -1代表永不过期
#
timeout: 2592000
#
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒,默认-1 代表不限制 (例如可以设置为1800代表30分钟内无操作就过期)
#
activity-timeout: -1
#
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
#
is-concurrent: true
#
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
#
is-share: false
#
# token风格
#
token-style: simple-uuid
#
# 是否打印操作日志
#
is-log: false
#
# 是否在初始化配置时打印版本字符画
#
is-print: false
#
#
alone-redis:
#
# Redis数据库索引(默认为0)
#
database: 0
#
# Redis服务器地址
#
host: 192.168.9.30
#
# Redis服务器连接端口
#
port: 6379
#
# Redis服务器连接密码(默认为空)
#
password: clx!2022clx
#
# 连接超时时间
#
timeout: 10s
#
#
#
#
日志级别
#
logging:
#
level:
#
root: INFO
#
mybatis-plus:
#
configuration:
#
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#
#
#
#
中交兴路
#
gps:
#
zhongjiao:
#
user: bd63d655-f5d1-4724-8086-0db2858fcd43
#
pwd: iBJ5Y079u234jl985ICV81Y3j4zg37
#
srt: 1db92c4e-8380-4436-a010-5d0fef214947
#
cid: 9dae7170-476a-4a2a-8a9e-3bca075ac9da
server
:
port
:
8081
spring
:
rabbitmq
:
host
:
39.101.187.243
port
:
5672
username
:
clxmq
password
:
clxmq711
redis
:
host
:
47.92.223.27
port
:
6379
password
:
clx!2022clx
jedis
:
pool
:
max-idle
:
100
min-idle
:
1
max-active
:
1000
max-wait
:
-1
datasource
:
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
username
:
clxdevelop
password
:
CLXdevelop#20231
druid
:
initial-size
:
4
min-idle
:
4
max-active
:
8
max-wait
:
10000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
time-between-eviction-runs-millis
:
60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
min-evictable-idle-time-millis
:
1800000
validation-query
:
SELECT 1
test-while-idle
:
true
test-on-borrow
:
false
test-on-return
:
false
# 是否缓存preparedStatement,也就是PSCache。
pool-prepared-statements
:
true
# 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。
max-pool-prepared-statement-per-connection-size
:
20
filters
:
stat,wall
# filter相关配置
filter
:
stat
:
enabled
:
true
db-type
:
mysql
log-slow-sql
:
true
slow-sql-millis
:
500
merge-sql
:
true
slf4j
:
enabled
:
true
statement-log-error-enabled
:
true
statement-create-after-log-enabled
:
false
statement-close-after-log-enabled
:
false
result-set-open-after-log-enabled
:
false
result-set-close-after-log-enabled
:
false
web-stat-filter
:
enabled
:
true
url-pattern
:
/*
exclusions
:
"
/druid/*"
session-stat-enable
:
true
session-stat-max-count
:
1000
# 监控页面相关配置
stat-view-servlet
:
enabled
:
true
allow
:
"
"
url-pattern
:
/druid/*
reset-enable
:
false
login-username
:
clx
login-password
:
Apm!Q@Wm888
aop-patterns
:
"
com.msl.report.dao.*"
xxl
:
job
:
admin
:
address
:
http://job.devclx.cn/xxl-job
executor
:
access-token
:
default_token
app-name
:
clx-performance
log-path
:
./logs/clx-performance/job/
log-retention-days
:
15
# Sa-Token配置
sa-token
:
# token名称 (同时也是cookie名称)
token-name
:
token
# token有效期,单位s 默认30天, -1代表永不过期
timeout
:
2592000
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒,默认-1 代表不限制 (例如可以设置为1800代表30分钟内无操作就过期)
activity-timeout
:
-1
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent
:
true
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share
:
false
# token风格
token-style
:
simple-uuid
# 是否打印操作日志
is-log
:
false
# 是否在初始化配置时打印版本字符画
is-print
:
false
alone-redis
:
# Redis数据库索引(默认为0)
database
:
0
# Redis服务器地址
host
:
192.168.9.30
# Redis服务器连接端口
port
:
6379
# Redis服务器连接密码(默认为空)
password
:
clx!2022clx
# 连接超时时间
timeout
:
10s
# 日志级别
logging
:
level
:
root
:
INFO
mybatis-plus
:
configuration
:
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
#中交兴路
gps
:
zhongjiao
:
user
:
bd63d655-f5d1-4724-8086-0db2858fcd43
pwd
:
iBJ5Y079u234jl985ICV81Y3j4zg37
srt
:
1db92c4e-8380-4436-a010-5d0fef214947
cid
:
9dae7170-476a-4a2a-8a9e-3bca075ac9da
performance-web/src/test/java/com/clx/performance/JobTest.java
浏览文件 @
97b53c63
...
...
@@ -10,10 +10,12 @@ import com.clx.performance.component.OrderGoodsStatusLazyComponent;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.constant.RedisConstants
;
import
com.clx.performance.dao.OrderGoodsDao
;
import
com.clx.performance.dao.OwnerAccountDao
;
import
com.clx.performance.enums.OrderGoodsStatusEnum
;
import
com.clx.performance.enums.OrderGoodsTruckBindEnum
;
import
com.clx.performance.mapper.OrderGoodsMapper
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.OwnerAccount
;
import
com.msl.common.base.Optional
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
...
...
@@ -52,10 +54,16 @@ public class JobTest {
@Autowired
private
OrderGoodsDao
orderGoodsDao
;
@Autowired
private
OwnerAccountDao
ownerAccountDao
;
@Test
public
void
test1
()
{
List
<
OrderOwnTruckVo
>
orderOwnTruckVos
=
orderFeign
.
selectTruckListFeign
(
"PT2023092700041"
);
List
<
String
>
collect
=
orderOwnTruckVos
.
stream
().
map
(
OrderOwnTruckVo:
:
getTruckNo
).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
collect
);
OwnerAccount
account
=
new
OwnerAccount
();
account
.
setId
(
7
);
account
.
setModifiedTime
(
LocalDateTime
.
now
());
Integer
i
=
ownerAccountDao
.
updateAccountCAS
(
account
,
LocalDateTime
.
now
(),
false
);
System
.
out
.
println
(
i
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论