记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
e4511bf6
Commit
e4511bf6
authored
Apr 25, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit 修改票提
parent
c211b401
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
32 deletions
+28
-32
SmileAgentVo.java
...ava/com/liquidnet/service/goblin/dto/vo/SmileAgentVo.java
+0
-8
SmileAgentServiceImpl.java
...in/zhengzai/smile/service/impl/SmileAgentServiceImpl.java
+28
-24
No files found.
liquidnet-bus-api/liquidnet-service-smile-api/src/main/java/com/liquidnet/service/goblin/dto/vo/SmileAgentVo.java
View file @
e4511bf6
...
...
@@ -47,14 +47,6 @@ public class SmileAgentVo implements Serializable, Cloneable{
@ApiModelProperty
(
value
=
"普代票提"
)
private
BigDecimal
ordCarry
;
public
BigDecimal
getTotalCarry
()
{
return
totalCarry
!=
null
?
this
.
totalCarry
:
BigDecimal
.
valueOf
(
0
);
}
public
BigDecimal
getOrdCarry
()
{
return
ordCarry
!=
null
?
this
.
ordCarry
:
BigDecimal
.
valueOf
(
0
);
}
private
static
final
SmileAgentVo
obj
=
new
SmileAgentVo
();
public
static
SmileAgentVo
getNew
()
{
try
{
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/smile/service/impl/SmileAgentServiceImpl.java
View file @
e4511bf6
...
...
@@ -38,36 +38,40 @@ public class SmileAgentServiceImpl extends ServiceImpl<SmileAgentMapper, SmileAg
@Override
public
AjaxResult
create
(
List
<
SmileAgent
>
smileAgents
)
{
boolean
result
=
true
;
if
(
StringUtils
.
isNotEmpty
(
smileAgents
))
{
int
count
=
smileAgents
.
size
();
for
(
SmileAgent
agent
:
smileAgents
)
{
if
(
StringUtils
.
isEmpty
(
agent
.
getPerformanceId
())
&&
StringUtils
.
isEmpty
(
agent
.
getTicketId
()))
{
return
AjaxResult
.
error
();
}
result
=
!
StringUtils
.
isEmpty
(
agent
.
getPerformanceId
())
&&
!
StringUtils
.
isEmpty
(
agent
.
getTicketId
());
}
for
(
SmileAgent
smileAgent
:
smileAgents
)
{
SmileAgentVo
agent
=
smileRedisUtils
.
getAgent
(
smileAgent
.
getPerformanceId
(),
smileAgent
.
getTicketId
());
if
(
agent
!=
null
)
{
log
.
info
(
"SmileAgent:{}"
,
agent
);
continue
;
}
count
=
count
-
1
;
SmileAgentVo
smileAgentVo
=
SmileAgentVo
.
getNew
();
smileAgentVo
.
copy
(
smileAgent
);
if
((
smileAgent
.
getTotalCarry
()
==
null
&&
smileAgent
.
getOrdCarry
()
==
null
)
||
(
smileAgent
.
getOrdCarry
().
equals
(
BigDecimal
.
valueOf
(
0
))
&&
smileAgent
.
getTotalCarry
().
equals
(
BigDecimal
.
valueOf
(
0
))))
{
continue
;
if
(
result
)
{
try
{
for
(
SmileAgent
smileAgent
:
smileAgents
){
SmileAgentVo
agent
=
smileRedisUtils
.
getAgent
(
smileAgent
.
getPerformanceId
(),
smileAgent
.
getTicketId
());
if
(
agent
!=
null
){
log
.
info
(
"SmileAgent:{}"
,
agent
);
//修改过票提则无法再次修改
return
AjaxResult
.
warn
(
"票提一但设置,无法修改!"
);
}
}
smileAgents
.
forEach
(
smileAgent
->
{
//是否是修改票提
smileAgentMapper
.
updateAgentById
(
smileAgent
.
getId
(),
smileAgent
.
getTotalCarry
().
divide
(
BigDecimal
.
valueOf
(
100
)),
smileAgent
.
getOrdCarry
().
divide
(
BigDecimal
.
valueOf
(
100
)));
SmileAgentVo
smileAgentVo
=
new
SmileAgentVo
();
BeanUtils
.
copyProperties
(
smileAgent
,
smileAgentVo
);
smileRedisUtils
.
setAgent
(
smileAgent
.
getPerformanceId
(),
smileAgent
.
getTicketId
(),
smileAgentVo
);
log
.
debug
(
"create create Agent id:{},PerformanceId:{},TicketId:{}"
,
smileAgent
.
getId
(),
smileAgent
.
getPerformanceId
(),
smileAgent
.
getTicketId
());
});
return
AjaxResult
.
success
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
AjaxResult
.
warn
(
"请重试"
);
}
smileAgentMapper
.
updateAgentById
(
smileAgentVo
.
getId
(),
smileAgentVo
.
getTotalCarry
(),
smileAgentVo
.
getOrdCarry
());
smileRedisUtils
.
setAgent
(
smileAgent
.
getPerformanceId
(),
smileAgent
.
getTicketId
(),
smileAgentVo
);
}
if
(
count
==
smileAgents
.
size
()){
return
AjaxResult
.
warn
(
"票提一但设置,无法修改!"
);
}
return
AjaxResult
.
success
();
}
return
AjaxResult
.
error
();
return
AjaxResult
.
success
();
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment