Commit 2379da1a by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !4
parents b31652a8 a832eb9c
...@@ -98,4 +98,14 @@ public interface CashWithdrawalApiService { ...@@ -98,4 +98,14 @@ public interface CashWithdrawalApiService {
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.finance.dto.CashWithdrawalDTO>>
 * @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.finance.dto.CashWithdrawalDTO>>


 */ 
 */
ServiceResponse<Page<CashWithdrawalDTO>> listCashWithdrawalPage(CashWithdrawalQueryListQO params); ServiceResponse<Page<CashWithdrawalDTO>> listCashWithdrawalPage(CashWithdrawalQueryListQO params);
/**
* 取消提现
* @Title: cancel

* @Description:

* @author guojuxing
* @param serialNumber
提现申请流水单号
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


*/
ServiceResponse<Void> cancel(String serialNumber);
} }
...@@ -89,6 +89,9 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{ ...@@ -89,6 +89,9 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
if (record == null) { if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录"); return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录");
} }
if (record.getCashWithdrawalStatus().intValue() == WithdrawalStatusEnum.CANCEL.getCode()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已取消");
}
// 操作人相关信息 // 操作人相关信息
getOperationUserInfo(record, dto); getOperationUserInfo(record, dto);
...@@ -115,6 +118,10 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{ ...@@ -115,6 +118,10 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
if (record == null) { if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录"); return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录");
} }
if (record.getCashWithdrawalStatus().intValue() == WithdrawalStatusEnum.CANCEL.getCode()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已取消");
}
// 操作人相关信息 // 操作人相关信息
getOperationUserInfo(record, dto); getOperationUserInfo(record, dto);
...@@ -164,6 +171,20 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{ ...@@ -164,6 +171,20 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
return ServiceResponse.success(resultPage); return ServiceResponse.success(resultPage);
} }
@Override
public ServiceResponse<Void> cancel(String serialNumber) {
TabCashWithdrawal record = cashWithdrawalService.getBySerialNumber(serialNumber);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "提现流水号错误,查无数据");
}
if (record.getCashWithdrawalStatus().intValue() != WithdrawalStatusEnum.TO_BE_EXAMINE.getCode()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已审批,不能取消");
}
record.setCashWithdrawalStatus(WithdrawalStatusEnum.CANCEL.getCode());
cashWithdrawalService.update(record);
return ServiceResponse.success();
}
private void getOperationUserInfo(TabCashWithdrawal record, OperationUserInfoDTO userInfo) { private void getOperationUserInfo(TabCashWithdrawal record, OperationUserInfoDTO userInfo) {
record.setOperatorId(userInfo.getId().toString()); record.setOperatorId(userInfo.getId().toString());
record.setOperatorName(userInfo.getRealName()); record.setOperatorName(userInfo.getRealName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment