Commit 23820ec1 by yao.xiao

增加修改发佣检核入参判断

parent e387879a
......@@ -22,6 +22,8 @@ public interface AgmsFortuneService {
* AGMS -- 修改佣金发放状态
* @param requestVO 请求数据
* @return 响应数据
* @throws InvocationTargetException InvocationTargetException
* @throws IllegalAccessException IllegalAccessException
*/
CommissionPayoutStatusQueryResponseVO commissionPayoutStatusQuery(CommissionPayoutStatusQueryRequestVO requestVO) throws InvocationTargetException, IllegalAccessException;
}
......@@ -72,6 +72,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
@Override
public CommissionPayoutStatusUpdateResponseVO commissionPayoutStatusUpdate(CommissionPayoutStatusUpdateRequestVO requestVO) {
CommissionPayoutStatusUpdateResponseVO responseVO = new CommissionPayoutStatusUpdateResponseVO();
CommonResult commonResult = check(requestVO);
Long[] fortuneIds = requestVO.getFortuneIds();
//1.暂不可发 2.可发放 3.保留
String paymentStatus = requestVO.getPaymentStatus();
......@@ -88,14 +89,32 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
canPaymentUpDate(paymentStatus,payoutBatchId,loginId,customerFortunes);
}else {
//如paymentStatus != 2(暂不可发,保留),只需统计原Fortune对应的Withdraw,重新计算
noPaymentUpDate(paymentStatus,payoutBatchId,loginId,customerFortunes);
noPaymentUpDate(paymentStatus,loginId,customerFortunes);
}
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
responseVO.setCommonResult(commonResult);
return responseVO;
}
private CommonResult check(CommissionPayoutStatusUpdateRequestVO requestVO) {
CommonResult commonResult = new CommonResult();
Boolean success = true;
String message = ZHBErrorConfig.getErrorInfo("800000");
if (("2").equals(requestVO.getPaymentStatus())){
if (CommonUtil.isNullOrBlank(requestVO.getPayoutBatch())){
success = false;
message = ZHBErrorConfig.getErrorInfo("830021");
}
}
commonResult.setSuccess(success);
commonResult.setMessage(message);
return commonResult;
}
private Long findPayoutBatchIdByPayoutBatch(String payoutBatch, Long loginId) {
if (CommonUtil.isNullOrBlank(payoutBatch)){
return null;
}
AclCustomerFortunePayoutBatch customerFortunePayoutBatch = customerFortunePayoutBatchDalService.findByPayoutYearmonth(payoutBatch);
if (customerFortunePayoutBatch == null){
customerFortunePayoutBatch = new AclCustomerFortunePayoutBatch();
......@@ -206,7 +225,7 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
return customerWithdrawMap;
}
private void noPaymentUpDate(String paymentStatus, Long payoutBatchId , Long loginId, List<AclCustomerFortune> customerFortunes) {
private void noPaymentUpDate(String paymentStatus, Long loginId, List<AclCustomerFortune> customerFortunes) {
System.out.println("noPaymentUpDate");
//需要修改的fortune记录(需修改佣金发放状态)
List<AclCustomerFortune> fortuneUpdates = new ArrayList<>();
......
......@@ -23,7 +23,6 @@
830007=上传头像失败,请重新上传!
830008=上传生活照失败,请重新上传!
830009=上传微信二维码失败,请重新上传!
830020=活动时间段冲突
830010=该用户已经注册为银盾经纪人
830011=该增员已存在!
830012=请填写跟进时间!
......@@ -34,4 +33,6 @@
830017=您不是团队长,无法进行查看
830018=您暂无团队,无法设置
830019=已申请过专家支持!请等待
830020=活动时间段冲突
830021=请选择发佣日期
900003=保险公司响应报文为空!
\ No newline at end of file
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