Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
db4e66d6
Commit
db4e66d6
authored
Sep 12, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加提现模块
parent
efaa3e7b
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
488 additions
and
2 deletions
+488
-2
WalletCathDTO.java
.../java/com/xxfc/platform/order/pojo/dto/WalletCathDTO.java
+59
-0
WalletDTO.java
...main/java/com/xxfc/platform/order/pojo/dto/WalletDTO.java
+48
-0
CompanyWalletCathVo.java
.../com/xxfc/platform/order/pojo/vo/CompanyWalletCathVo.java
+20
-0
CompanyWalletVo.java
...java/com/xxfc/platform/order/pojo/vo/CompanyWalletVo.java
+20
-0
CompanyWalletBiz.java
...in/java/com/xxfc/platform/order/biz/CompanyWalletBiz.java
+36
-0
CompanyWalletCathBiz.java
...ava/com/xxfc/platform/order/biz/CompanyWalletCathBiz.java
+155
-0
WebConfiguration.java
...java/com/xxfc/platform/order/config/WebConfiguration.java
+2
-1
CompanyWalletCathMapper.java
...m/xxfc/platform/order/mapper/CompanyWalletCathMapper.java
+12
-0
CompanyWalletMapper.java
...a/com/xxfc/platform/order/mapper/CompanyWalletMapper.java
+7
-0
AdminCompanyWalletDetailController.java
...r/rest/background/AdminCompanyWalletDetailController.java
+47
-1
CompanyWaterCathMapper.xml
...rver/src/main/resources/mapper/CompanyWaterCathMapper.xml
+48
-0
CompanyWaterMapper.xml
...r-server/src/main/resources/mapper/CompanyWaterMapper.xml
+34
-0
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/dto/WalletCathDTO.java
0 → 100644
View file @
db4e66d6
package
com
.
xxfc
.
platform
.
order
.
pojo
.
dto
;
import
com.github.wxiaoqi.security.common.vo.DataInter
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 门店收支明细DTO
* @author libin
* @version 1.0
* @description
* @data 2019/12/25 14:53
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
WalletCathDTO
extends
PageParam
implements
DataInter
{
@ApiModelProperty
(
"门店"
)
private
Integer
companyId
;
@ApiModelProperty
(
"企业"
)
private
Integer
branchId
;
@ApiModelProperty
(
"开始时间"
)
private
Long
startTime
;
@ApiModelProperty
(
"结束时间"
)
private
Long
endTime
;
@ApiModelProperty
(
"提现单号"
)
private
String
orderNo
;
List
<
Integer
>
dataCorporationIds
;
List
<
Integer
>
dataCompanyIds
;
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/dto/WalletDTO.java
0 → 100644
View file @
db4e66d6
package
com
.
xxfc
.
platform
.
order
.
pojo
.
dto
;
import
com.github.wxiaoqi.security.common.vo.DataInter
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 门店收支明细DTO
* @author libin
* @version 1.0
* @description
* @data 2019/12/25 14:53
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
WalletDTO
extends
PageParam
implements
DataInter
{
@ApiModelProperty
(
"门店"
)
private
Integer
companyId
;
@ApiModelProperty
(
"企业"
)
private
Integer
branchId
;
List
<
Integer
>
dataCorporationIds
;
List
<
Integer
>
dataCompanyIds
;
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/vo/CompanyWalletCathVo.java
0 → 100644
View file @
db4e66d6
package
com
.
xxfc
.
platform
.
order
.
pojo
.
vo
;
import
com.xxfc.platform.order.entity.CompanyWalletCath
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
CompanyWalletCathVo
extends
CompanyWalletCath
{
@ApiModelProperty
(
"门店名称"
)
private
String
companyName
;
@ApiModelProperty
(
"企业名称"
)
private
String
branchName
;
@ApiModelProperty
(
"企业名称"
)
private
Long
branchId
;
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/vo/CompanyWalletVo.java
0 → 100644
View file @
db4e66d6
package
com
.
xxfc
.
platform
.
order
.
pojo
.
vo
;
import
com.xxfc.platform.order.entity.CompanyWallet
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
CompanyWalletVo
extends
CompanyWallet
{
@ApiModelProperty
(
"门店名称"
)
private
String
companyName
;
@ApiModelProperty
(
"企业名称"
)
private
String
branchName
;
@ApiModelProperty
(
"企业名称"
)
private
Long
branchId
;
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/CompanyWalletBiz.java
View file @
db4e66d6
...
@@ -3,12 +3,20 @@ package com.xxfc.platform.order.biz;
...
@@ -3,12 +3,20 @@ package com.xxfc.platform.order.biz;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.mapper.CompanyWalletMapper
;
import
com.xxfc.platform.order.mapper.CompanyWalletMapper
;
import
com.xxfc.platform.order.pojo.dto.WalletDTO
;
import
com.xxfc.platform.order.pojo.dto.WalletDetailDTO
;
import
com.xxfc.platform.order.pojo.dto.WalletDetailDTO
;
import
com.xxfc.platform.order.pojo.vo.CompanyWalletVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Service
@Service
@Slf4j
@Slf4j
...
@@ -25,6 +33,34 @@ public class CompanyWalletBiz extends BaseBiz<CompanyWalletMapper, CompanyWallet
...
@@ -25,6 +33,34 @@ public class CompanyWalletBiz extends BaseBiz<CompanyWalletMapper, CompanyWallet
}
}
//检查提现下一步操作
public
CompanyWallet
checkAmount
(
Integer
companyId
,
BigDecimal
amount
)
{
if
(
amount
.
compareTo
(
BigDecimal
.
ZERO
)
<
1
)
{
throw
new
BaseException
(
"提现金额不能小于0"
,
ResultCode
.
FAILED_CODE
);
}
CompanyWallet
companyWallet
=
selectById
(
companyId
);
if
(
companyWallet
==
null
)
{
throw
new
BaseException
(
"钱包不存在"
,
ResultCode
.
FAILED_CODE
);
}
if
(
amount
.
compareTo
(
companyWallet
.
getBalance
())
>
0
)
{
throw
new
BaseException
(
"提现金额不能大于钱包金额和未审核提现金额"
,
ResultCode
.
FAILED_CODE
);
}
return
companyWallet
;
}
public
List
<
CompanyWalletVo
>
getList
(
WalletDTO
walletDTO
){
return
mapper
.
selectList
(
walletDTO
);
}
public
PageDataVO
<
CompanyWalletVo
>
selectList
(
WalletDTO
walletDTO
)
{
return
PageDataVO
.
pageInfo
(
walletDTO
.
getPage
(),
walletDTO
.
getLimit
(),
()
->
getList
(
walletDTO
));
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/CompanyWalletCathBiz.java
0 → 100644
View file @
db4e66d6
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
cn.hutool.core.lang.Snowflake
;
import
com.github.wxiaoqi.security.admin.constant.WithDrawStatusEnum
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.order.contant.enumerate.CompanyWalletITypeEnum
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.mapper.CompanyWalletCathMapper
;
import
com.xxfc.platform.order.pojo.dto.WalletCathDTO
;
import
com.xxfc.platform.order.pojo.vo.CompanyWalletCathVo
;
import
com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.Instant
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.List
;
@Service
@Slf4j
public
class
CompanyWalletCathBiz
extends
BaseBiz
<
CompanyWalletCathMapper
,
CompanyWalletCath
>
implements
InitializingBean
{
@Autowired
CompanyWalletBiz
companyWalletBiz
;
@Autowired
CompanyWalletDetailBiz
walletDetailBiz
;
@Autowired
BranchCompanyBiz
branchCompanyBiz
;
private
Snowflake
snowflake
;
private
DateTimeFormatter
dateTimeFormatter
;
public
List
<
CompanyWalletCathVo
>
getList
(
WalletCathDTO
walletCathDTO
){
return
mapper
.
selectList
(
walletCathDTO
);
}
public
PageDataVO
<
CompanyWalletDetailVo
>
selectList
(
WalletCathDTO
walletCathDTO
)
{
return
PageDataVO
.
pageInfo
(
walletCathDTO
.
getPage
(),
walletCathDTO
.
getLimit
(),
()
->
getList
(
walletCathDTO
));
}
//提现申请
public
void
applyCath
(
CompanyWalletCath
walletCathDTO
)
{
if
(
walletCathDTO
==
null
)
{
throw
new
BaseException
(
"参数不能为空"
,
ResultCode
.
NULL_CODE
);
}
Integer
companyId
=
walletCathDTO
.
getCompanyId
();
BigDecimal
amount
=
walletCathDTO
.
getAmount
();
//检查是否可以提现
BigDecimal
cathAmount
=
mapper
.
sunAmountByStatus
(
companyId
);
cathAmount
=
cathAmount
.
add
(
amount
);
CompanyWallet
companyWallet
=
companyWalletBiz
.
checkAmount
(
companyId
,
cathAmount
);
CompanyWalletCath
walletCath
=
new
CompanyWalletCath
();
BeanUtils
.
copyProperties
(
walletCathDTO
,
walletCath
);
BigDecimal
commission
=
BigDecimal
.
ZERO
;
BigDecimal
balnece
=
companyWallet
.
getBalance
();
//到账金额
BigDecimal
realAmount
=
amount
.
subtract
(
commission
).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
//提现单号
String
orderNo
=
snowflake
.
nextIdStr
();
orderNo
=
String
.
format
(
"%s%s"
,
dateTimeFormatter
.
format
(
LocalDate
.
now
()),
orderNo
);
log
.
info
(
"-----提现申请-----orderNo==="
+
orderNo
+
"----companyId===="
+
companyId
+
"---realAmount==="
+
realAmount
);
walletCath
.
setCrtTime
(
Instant
.
now
().
toEpochMilli
());
walletCath
.
setOrderNo
(
orderNo
);
walletCath
.
setStauts
(
WithDrawStatusEnum
.
AUDIT
.
getCode
());
walletCath
.
setBalance
(
balnece
);
walletCath
.
setRealAmount
(
realAmount
);
walletCath
.
setCommission
(
commission
);
walletCath
.
setWithdrawWay
(
2
);
insertSelective
(
walletCath
);
}
public
void
withDrawProcess
(
CompanyWalletCath
companyWalletCath
)
{
WalletCathDTO
walletCathDTO
=
new
WalletCathDTO
();
walletCathDTO
.
setOrderNo
(
companyWalletCath
.
getOrderNo
());
List
<
CompanyWalletCathVo
>
list
=
getList
(
walletCathDTO
);
if
(
list
==
null
||
list
.
size
()
==
0
)
{
throw
new
BaseException
(
"提现记录不存在"
,
ResultCode
.
FAILED_CODE
);
}
CompanyWalletCathVo
walletCathVo
=
list
.
get
(
0
);
if
(
walletCathVo
.
getStauts
()
==
WithDrawStatusEnum
.
SUCCESS
.
getCode
())
{
throw
new
BaseException
(
"已审核"
,
ResultCode
.
FAILED_CODE
);
}
CompanyWallet
companyWallet
=
companyWalletBiz
.
selectById
(
walletCathVo
.
getCompanyId
());
if
(
companyWallet
==
null
)
{
throw
new
BaseException
(
"钱包不存在"
,
ResultCode
.
FAILED_CODE
);
}
companyWalletCath
.
setFinishTime
(
Instant
.
now
().
toEpochMilli
());
companyWalletCath
.
setId
(
walletCathVo
.
getId
());
updateSelectiveById
(
companyWalletCath
);
if
(
companyWalletCath
.
getStauts
()
==
WithDrawStatusEnum
.
SUCCESS
.
getCode
())
{
BigDecimal
sAmount
=
companyWallet
.
getBalance
().
subtract
(
walletCathVo
.
getAmount
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
CompanyWalletDetail
detail
=
new
CompanyWalletDetail
();
detail
.
setCono
(
walletCathVo
.
getOrderNo
());
detail
.
setSAmount
(
sAmount
);
detail
.
setAmount
(
walletCathVo
.
getAmount
());
detail
.
setItype
(
CompanyWalletITypeEnum
.
CATH
.
getCode
());
//设置提现单号
detail
.
setCompanyId
(
walletCathVo
.
getCompanyId
());
detail
.
setBranchId
(
walletCathVo
.
getBranchId
());
walletDetailBiz
.
insertSelective
(
detail
);
//更新钱包
BigDecimal
withdrawals
=
companyWallet
.
getWithdrawals
().
add
(
walletCathVo
.
getAmount
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
companyWallet
.
setBalance
(
sAmount
);
companyWallet
.
setWithdrawals
(
withdrawals
);
companyWalletBiz
.
updCompanyWallet
(
companyWallet
);
}
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
snowflake
=
new
Snowflake
(
2
,
2
,
false
);
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"YYYYMMdd"
);
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/config/WebConfiguration.java
View file @
db4e66d6
...
@@ -60,7 +60,8 @@ public class WebConfiguration implements WebMvcConfigurer {
...
@@ -60,7 +60,8 @@ public class WebConfiguration implements WebMvcConfigurer {
"/orderMember/**"
,
"/orderMember/**"
,
"/orderRefund/**"
,
"/orderRefund/**"
,
"/orderVehicle/**"
,
"/orderVehicle/**"
,
"/shuntApply/**"
"/shuntApply/**"
,
"/admin/**"
,
};
};
Collections
.
addAll
(
list
,
urls
);
Collections
.
addAll
(
list
,
urls
);
return
list
;
return
list
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/CompanyWalletCathMapper.java
View file @
db4e66d6
...
@@ -2,8 +2,15 @@ package com.xxfc.platform.order.mapper;
...
@@ -2,8 +2,15 @@ package com.xxfc.platform.order.mapper;
import
com.xxfc.platform.order.entity.CompanyWalletCath
;
import
com.xxfc.platform.order.entity.CompanyWalletCath
;
import
com.xxfc.platform.order.pojo.dto.WalletCathDTO
;
import
com.xxfc.platform.order.pojo.vo.CompanyWalletCathVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
/**
* 钱包提现表
* 钱包提现表
...
@@ -14,4 +21,9 @@ import tk.mybatis.mapper.common.Mapper;
...
@@ -14,4 +21,9 @@ import tk.mybatis.mapper.common.Mapper;
*/
*/
public
interface
CompanyWalletCathMapper
extends
Mapper
<
CompanyWalletCath
>
{
public
interface
CompanyWalletCathMapper
extends
Mapper
<
CompanyWalletCath
>
{
List
<
CompanyWalletCathVo
>
selectList
(
WalletCathDTO
walletCathDTO
);
@Select
(
"SELECT IFNULL(SUM(amount),0) FROM company_wallet_cath WHERE company_id =#{companyId} AND stauts=0"
)
BigDecimal
sunAmountByStatus
(
@Param
(
"companyId"
)
Integer
companyId
);
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/CompanyWalletMapper.java
View file @
db4e66d6
...
@@ -3,11 +3,15 @@ package com.xxfc.platform.order.mapper;
...
@@ -3,11 +3,15 @@ package com.xxfc.platform.order.mapper;
import
com.xxfc.platform.order.entity.CompanyWallet
;
import
com.xxfc.platform.order.entity.CompanyWallet
;
import
com.xxfc.platform.order.pojo.dto.WalletDTO
;
import
com.xxfc.platform.order.pojo.dto.WalletDetailDTO
;
import
com.xxfc.platform.order.pojo.dto.WalletDetailDTO
;
import
com.xxfc.platform.order.pojo.vo.CompanyWalletVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Update
;
import
org.apache.ibatis.annotations.Update
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
/**
/**
* 我的钱包
* 我的钱包
*
*
...
@@ -25,4 +29,7 @@ public interface CompanyWalletMapper extends Mapper<CompanyWallet> {
...
@@ -25,4 +29,7 @@ public interface CompanyWalletMapper extends Mapper<CompanyWallet> {
CompanyWallet
sumAmount
(
WalletDetailDTO
walletDetailDTO
);
CompanyWallet
sumAmount
(
WalletDetailDTO
walletDetailDTO
);
List
<
CompanyWalletVo
>
selectList
(
WalletDTO
walletDTO
);
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/AdminCompanyWalletDetailController.java
View file @
db4e66d6
...
@@ -6,12 +6,18 @@ import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
...
@@ -6,12 +6,18 @@ import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.order.biz.CompanyWalletBiz
;
import
com.xxfc.platform.order.biz.CompanyWalletCathBiz
;
import
com.xxfc.platform.order.biz.CompanyWalletDetailBiz
;
import
com.xxfc.platform.order.biz.CompanyWalletDetailBiz
;
import
com.xxfc.platform.order.entity.CompanyWalletCath
;
import
com.xxfc.platform.order.entity.CompanyWalletDetail
;
import
com.xxfc.platform.order.entity.CompanyWalletDetail
;
import
com.xxfc.platform.order.pojo.dto.WalletCathDTO
;
import
com.xxfc.platform.order.pojo.dto.WalletDTO
;
import
com.xxfc.platform.order.pojo.dto.WalletDetailDTO
;
import
com.xxfc.platform.order.pojo.dto.WalletDetailDTO
;
import
com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo
;
import
com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -29,9 +35,16 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
...
@@ -29,9 +35,16 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
}
}
@Autowired
CompanyWalletCathBiz
walletCathBiz
;
@Autowired
CompanyWalletBiz
walletBiz
;
@RequestMapping
(
value
=
"selectList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"selectList"
,
method
=
RequestMethod
.
GET
)
@ApiModelProperty
(
value
=
"营收明细列表"
)
@ApiModelProperty
(
value
=
"营收明细列表"
)
public
ObjectRestResponse
<
PageDataVO
<
CompanyWalletDetailVo
>>
refundAmoun
t
(
WalletDetailDTO
walletDetailDTO
)
{
public
ObjectRestResponse
<
PageDataVO
<
CompanyWalletDetailVo
>>
selectLis
t
(
WalletDetailDTO
walletDetailDTO
)
{
setPowerData
(
walletDetailDTO
,
true
);
setPowerData
(
walletDetailDTO
,
true
);
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
walletDetailDTO
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
walletDetailDTO
));
}
}
...
@@ -44,4 +57,37 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
...
@@ -44,4 +57,37 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
return
ObjectRestResponse
.
succ
(
baseBiz
.
getSumAmount
(
walletDetailDTO
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
getSumAmount
(
walletDetailDTO
));
}
}
@RequestMapping
(
value
=
"cath/selectList"
,
method
=
RequestMethod
.
GET
)
@ApiModelProperty
(
value
=
"提现明细列表"
)
public
ObjectRestResponse
<
PageDataVO
<
CompanyWalletDetailVo
>>
cathSelectList
(
WalletCathDTO
walletCathDTO
)
{
setPowerData
(
walletCathDTO
,
true
);
return
ObjectRestResponse
.
succ
(
walletCathBiz
.
selectList
(
walletCathDTO
));
}
@RequestMapping
(
value
=
"amount/selectList"
,
method
=
RequestMethod
.
GET
)
@ApiModelProperty
(
value
=
"钱包列表"
)
public
ObjectRestResponse
<
PageDataVO
<
CompanyWalletDetailVo
>>
amountSelectList
(
WalletDTO
walletDTO
)
{
setPowerData
(
walletDTO
,
true
);
return
ObjectRestResponse
.
succ
(
walletBiz
.
selectList
(
walletDTO
));
}
@RequestMapping
(
value
=
"applyCath"
,
method
=
RequestMethod
.
POST
)
@ApiModelProperty
(
value
=
"提现申请"
)
public
ObjectRestResponse
applyCath
(
@RequestBody
CompanyWalletCath
walletCathDTO
)
{
walletCathBiz
.
applyCath
(
walletCathDTO
);
return
ObjectRestResponse
.
succ
();
}
@RequestMapping
(
value
=
"withDrawProcess"
,
method
=
RequestMethod
.
POST
)
@ApiModelProperty
(
value
=
"提现审核"
)
public
ObjectRestResponse
withDrawProcess
(
@RequestBody
CompanyWalletCath
companyWalletCath
)
{
walletCathBiz
.
withDrawProcess
(
companyWalletCath
);
return
ObjectRestResponse
.
succ
();
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/resources/mapper/CompanyWaterCathMapper.xml
0 → 100644
View file @
db4e66d6
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.xxfc.platform.order.mapper.CompanyWalletCathMapper"
>
<select
id=
"selectList"
resultType=
"com.xxfc.platform.order.pojo.vo.CompanyWalletCathVo"
parameterType=
"com.xxfc.platform.order.pojo.dto.WalletCathDTO"
>
SELECT
wc.*,
c.`name` as companyName,
ci.`name` as branchName,
ci.id as branchId
FROM company_wallet_cath wc
LEFT JOIN branch_company c ON wc.company_id =c.id
LEFT JOIN company_info ci ON c.company_id=ci.id
<where>
<if
test=
"companyId != null and companyId > 0"
>
and wc.company_id=#{companyId}
</if>
<if
test=
"branchId != null and branchId > 0"
>
and c.company_id=#{branchId}
</if>
<if
test=
"orderNo != null and orderNo != '' "
>
and wc.order_no like concat('%',#{orderNo},'%')
</if>
<if
test=
"startTime != null and startTime > 0"
>
and wc.crt_time > = {startTime}
</if>
<if
test=
"endTime != null and endTime > 0"
>
and wc.crt_time
<
= {endTime}
</if>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size() > 0"
>
and wc.company_id= in
<foreach
collection=
"dataCompanyIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size() > 0"
>
and c.company_id in
<foreach
collection=
"dataCorporationIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
</where>
order by wc.crt_time desc
</select>
</mapper>
\ No newline at end of file
xx-order/xx-order-server/src/main/resources/mapper/CompanyWaterMapper.xml
View file @
db4e66d6
...
@@ -71,4 +71,38 @@
...
@@ -71,4 +71,38 @@
</where>
</where>
</select>
</select>
<select
id=
"selectList"
resultType=
"com.xxfc.platform.order.pojo.vo.CompanyWalletVo"
parameterType=
"com.xxfc.platform.order.pojo.dto.WalletDTO"
>
SELECT
w.*,
c.`name` as companyName,
ci.`name` as branchName,
ci.id as branchId
FROM company_wallet w
LEFT JOIN branch_company c ON w.company_id =c.id
LEFT JOIN company_info ci ON c.company_id=ci.id
<where>
<if
test=
"companyId != null and companyId > 0"
>
and w.company_id=#{companyId}
</if>
<if
test=
"branchId != null and branchId > 0"
>
and c.company_id=#{branchId}
</if>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size() > 0"
>
and w.company_id= in
<foreach
collection=
"dataCompanyIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size() > 0"
>
and c.company_id in
<foreach
collection=
"dataCorporationIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
</where>
order by w.id desc
</select>
</mapper>
</mapper>
\ No newline at end of file
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