Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
c1e2f955
提交
c1e2f955
authored
10月 24, 2023
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改BUG
上级
07481b7c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
48 行增加
和
16 行删除
+48
-16
PerformanceFeign.java
...main/java/com/clx/performance/feign/PerformanceFeign.java
+5
-0
FrozenAccountParam.java
...om/clx/performance/param/pc/owner/FrozenAccountParam.java
+3
-5
OwnerAccountFeignController.java
...ormance/controller/feign/OwnerAccountFeignController.java
+31
-0
OwnerAccountController.java
...rformance/controller/pc/owner/OwnerAccountController.java
+0
-8
OwnerAccountServiceImpl.java
...clx/performance/service/impl/OwnerAccountServiceImpl.java
+9
-3
没有找到文件。
performance-api/src/main/java/com/clx/performance/feign/PerformanceFeign.java
浏览文件 @
c1e2f955
package
com
.
clx
.
performance
.
feign
;
import
com.clx.performance.param.pc.owner.FrozenAccountParam
;
import
com.clx.performance.vo.feign.OrderGoodsFeignVO
;
import
com.msl.common.result.Result
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.validation.constraints.NotBlank
;
...
...
@@ -27,4 +30,6 @@ public interface PerformanceFeign {
@GetMapping
(
value
=
{
"clx-performance/feign/orderGoods/getOrderGoodsListByOrderNo"
})
List
<
OrderGoodsFeignVO
>
getOrderGoodsListByOrderNo
(
@RequestParam
String
orderNo
);
@PostMapping
(
value
=
{
"clx-performance/feign/owner/ownerAccountFrozen"
})
Result
<
Object
>
ownerAccountFrozen
(
@RequestBody
FrozenAccountParam
param
);
}
performance-api/src/main/java/com/clx/performance/param/pc/owner/FrozenAccountParam.java
浏览文件 @
c1e2f955
package
com
.
clx
.
performance
.
param
.
pc
.
owner
;
import
com.msl.common.convertor.type.MoneyInConvert
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
...
...
@@ -15,11 +14,10 @@ import java.math.BigDecimal;
public
class
FrozenAccountParam
{
private
Long
userNo
;
private
String
mobile
;
private
String
ownerName
;
@MoneyInConvert
//保证金
private
BigDecimal
frozenBalance
;
@MoneyInConvert
//预付运费
private
BigDecimal
ensureBalance
;
private
Integer
orderId
;
private
String
orderNo
;
...
...
performance-web/src/main/java/com/clx/performance/controller/feign/OwnerAccountFeignController.java
0 → 100644
浏览文件 @
c1e2f955
package
com
.
clx
.
performance
.
controller
.
feign
;
import
com.clx.performance.param.pc.owner.FrozenAccountParam
;
import
com.clx.performance.service.OwnerAccountService
;
import
com.msl.common.result.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@RestController
@RequestMapping
(
"/feign/owner"
)
@Validated
@AllArgsConstructor
public
class
OwnerAccountFeignController
{
private
final
OwnerAccountService
ownerAccountService
;
@ApiOperation
(
value
=
"冻结保证金"
,
notes
=
"<br>By:胡宇帆"
)
@PostMapping
(
"/ownerAccountFrozen"
)
public
Result
<
Object
>
ownerAccountFrozen
(
FrozenAccountParam
param
)
{
ownerAccountService
.
ownerAccountFrozen
(
param
);
return
Result
.
ok
();
}
}
performance-web/src/main/java/com/clx/performance/controller/pc/owner/OwnerAccountController.java
浏览文件 @
c1e2f955
...
...
@@ -162,14 +162,6 @@ public class OwnerAccountController {
return
Result
.
page
(
page
.
getRecords
(),
page
.
getTotal
(),
page
.
getPages
());
}
@ApiOperation
(
value
=
"冻结保证金"
,
notes
=
"<br>By:胡宇帆"
)
@PostMapping
(
"/ownerAccountFrozen"
)
@UnitCovert
()
public
Result
<
Object
>
ownerAccountFrozen
(
FrozenAccountParam
param
)
{
ownerAccountService
.
ownerAccountFrozen
(
param
);
return
Result
.
ok
();
}
@ApiOperation
(
value
=
"创建账户"
,
notes
=
"<br>By:胡宇帆"
)
@PostMapping
(
"/createAccount"
)
public
Result
<
Object
>
createAccount
(
CreteAccountParam
param
)
{
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OwnerAccountServiceImpl.java
浏览文件 @
c1e2f955
...
...
@@ -596,9 +596,9 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
ownerAccountFrozen
(
FrozenAccountParam
param
)
{
String
mobile
=
param
.
getMobile
()
;
String
mobile
=
""
;
Long
userNo
=
param
.
getUserNo
();
String
ownerName
=
param
.
getOwnerName
()
;
String
ownerName
=
""
;
BigDecimal
frozenBalance
=
param
.
getFrozenBalance
();
BigDecimal
ensureBalance
=
param
.
getEnsureBalance
();
Integer
orderId
=
param
.
getOrderId
();
...
...
@@ -610,6 +610,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
List
<
OwnerAccount
>
accountList
=
ownerAccountDao
.
accountInfo
(
userNo
);
for
(
OwnerAccount
ownerAccount
:
accountList
)
{
OwnerAccount
entity
=
new
OwnerAccount
();
mobile
=
ownerAccount
.
getMobile
();
ownerName
=
ownerAccount
.
getOwnerUserName
();
entity
.
setAccountType
(
ownerAccount
.
getAccountType
());
entity
.
setId
(
ownerAccount
.
getId
());
entity
.
setModifiedTime
(
ownerAccount
.
getModifiedTime
());
...
...
@@ -621,9 +623,11 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity
.
setFrozenBalance
(
frozenBalance
);
//可用余额
entity
.
setUsableBalance
(
frozenBalance
);
//账户余额
entity
.
setAccountBalance
(
frozenBalance
);
//updateList.add(entity);
flag
+=
ownerAccountDao
.
updateAccountCAS
(
entity
,
now
,
false
);
}
else
{
if
(
ownerAccount
.
getUsableBalance
().
compareTo
(
ensureBalance
)
<
0
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"当前货主预付运费账户可用余额不够冻结"
);
...
...
@@ -632,6 +636,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity
.
setFrozenBalance
(
ensureBalance
);
//可用余额
entity
.
setUsableBalance
(
ensureBalance
);
//账户余额
entity
.
setAccountBalance
(
frozenBalance
);
//updateList.add(entity);
flag
+=
ownerAccountDao
.
updateAccountCAS
(
entity
,
now
,
false
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论