Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
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
姚本章
dm_project
Commits
14829d7d
Commit
14829d7d
authored
Dec 07, 2020
by
machengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提现审核
parent
58c74275
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
2 deletions
+47
-2
pom.xml
jz-dm-mall/pom.xml
+1
-1
PlatformTradeFlowInfoController.java
...s/controller/finance/PlatformTradeFlowInfoController.java
+3
-0
FinanceCustomerAssets.java
...va/com/jz/manage/moduls/entity/FinanceCustomerAssets.java
+3
-0
FinanceCustomerAssetsDao.java
...com/jz/manage/moduls/mapper/FinanceCustomerAssetsDao.java
+1
-1
PlatformTradeFlowInfoServiceImpl.java
...moduls/service/impl/PlatformTradeFlowInfoServiceImpl.java
+39
-0
No files found.
jz-dm-mall/pom.xml
View file @
14829d7d
...
...
@@ -78,7 +78,7 @@
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
</dependency>
<!-- mybatis plus -->
<dependency>
<groupId>
com.baomidou
</groupId>
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/PlatformTradeFlowInfoController.java
View file @
14829d7d
...
...
@@ -167,6 +167,9 @@ public class PlatformTradeFlowInfoController extends BaseController {
if
(
StringUtils
.
isEmpty
(
cashOutAuditRequest
.
getCashOutId
()))
{
return
Result
.
error
(
"参数不能为空!"
);
}
if
(
StringUtils
.
isEmpty
(
cashOutAuditRequest
.
getAuditStatus
()))
{
return
Result
.
error
(
"参数不能为空!"
);
}
Result
<
Object
>
dto
=
platformTradeFlowInfoService
.
uptCashOutInfoAuditByid
(
cashOutAuditRequest
);
return
dto
;
}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/entity/FinanceCustomerAssets.java
View file @
14829d7d
package
com
.
jz
.
manage
.
moduls
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -20,6 +22,7 @@ public class FinanceCustomerAssets implements Serializable {
/**
* 资产id
*/
@TableId
(
value
=
"assets_id"
,
type
=
IdType
.
AUTO
)
private
Long
assetsId
;
/**
* 企业id
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/FinanceCustomerAssetsDao.java
View file @
14829d7d
package
com
.
jz
.
manage
.
moduls
.
mapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.
common
.entity.FinanceCustomerAssets
;
import
com.jz.
manage.moduls
.entity.FinanceCustomerAssets
;
/**
* 商城企业客户资产(TFinanceCustomerAssets)表数据库访问层
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/PlatformTradeFlowInfoServiceImpl.java
View file @
14829d7d
...
...
@@ -5,18 +5,24 @@ import com.github.pagehelper.PageInfo;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.enums.AuditStatusEnum
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.controller.finance.platForm.*
;
import
com.jz.manage.moduls.entity.FinanceCashOut
;
import
com.jz.manage.moduls.entity.FinanceCustomerAssets
;
import
com.jz.manage.moduls.mapper.FinanceCashOutDao
;
import
com.jz.manage.moduls.mapper.FinanceCustomerAssetsDao
;
import
com.jz.manage.moduls.mapper.PlatformTradeFlowInfoDao
;
import
com.jz.manage.moduls.service.PlatformTradeFlowInfoService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -32,12 +38,17 @@ import java.util.Map;
@Transactional
public
class
PlatformTradeFlowInfoServiceImpl
implements
PlatformTradeFlowInfoService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PlatformTradeFlowInfoServiceImpl
.
class
);
@Autowired
private
PlatformTradeFlowInfoDao
platformTradeFlowInfoDao
;
@Autowired
private
FinanceCashOutDao
financeCashOutDao
;
@Autowired
private
FinanceCustomerAssetsDao
financeCustomerAssetsDao
;
@Override
public
PlatFormMoneyAndDepartDto
queryPlatFormMoneyAndDepart
(
Map
map
)
throws
Exception
{
return
platformTradeFlowInfoDao
.
queryPlatFormMoneyAndDepart
(
map
);
...
...
@@ -158,8 +169,36 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
cashOut
.
setAuditStatus
(
cashOutAuditRequest
.
getAuditStatus
());
cashOut
.
setAuditTime
(
new
Date
());
//cashOut.setAuditPerson();
//更新提现状态
int
len
=
financeCashOutDao
.
updateById
(
cashOut
);
if
(
len
>
0
)
{
logger
.
info
(
"#####################修改提现状态成功#####################"
);
//审核通过,修改个人资产,总金额减去提现金额,从冻结金额减去
if
(
AuditStatusEnum
.
YSH
.
getValue
().
equals
(
cashOutAuditRequest
.
getAuditStatus
()))
{
//查询出提现金额
FinanceCashOut
cashOutObj
=
financeCashOutDao
.
selectById
(
cashOutAuditRequest
.
getCashOutId
());
String
cashOutMoney
=
cashOutObj
.
getCashOutMoney
().
toString
();
BigDecimal
txMoney
=
new
BigDecimal
(
cashOutMoney
);
//提现金额
if
(
StringUtils
.
isNotEmpty
(
cashOutObj
.
getAssetsId
().
toString
()))
{
FinanceCustomerAssets
assetsObj
=
financeCustomerAssetsDao
.
selectById
(
cashOutObj
.
getAssetsId
().
toString
());
String
totalMoney
=
assetsObj
.
getTotalMoney
().
toString
();
BigDecimal
totalMoneyObj
=
new
BigDecimal
(
totalMoney
);
//总金额
totalMoneyObj
=
totalMoneyObj
.
subtract
(
txMoney
);
String
frozenMoney
=
assetsObj
.
getFrozenMoney
().
toString
();
//冻结金额
BigDecimal
frozenMoneyObJ
=
new
BigDecimal
(
frozenMoney
);
frozenMoneyObJ
=
frozenMoneyObJ
.
subtract
(
txMoney
);
FinanceCustomerAssets
financeCustomerAssets
=
new
FinanceCustomerAssets
();
financeCustomerAssets
.
setAssetsId
(
cashOutObj
.
getAssetsId
());
financeCustomerAssets
.
setTotalMoney
(
totalMoneyObj
);
financeCustomerAssets
.
setFrozenMoney
(
frozenMoneyObJ
);
//financeCustomerAssets.setUptPerson();
financeCustomerAssets
.
setUptTime
(
new
Date
());
financeCustomerAssetsDao
.
updateById
(
financeCustomerAssets
);
logger
.
info
(
"#####################修改资产金额态成功#####################"
);
}
}
return
Result
.
ok
();
}
else
{
return
Result
.
error
(
"提交失败"
);
...
...
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