doum
8 小时以前 e8dd7cfa6bbfd8be4a52f24e03c74f853cc6ac4f
server/dmmall_service/src/main/java/com/doumee/service/business/impl/WithdrawRecordServiceImpl.java
@@ -52,6 +52,7 @@
    @Autowired
    private WithdrawRecordMapper withdrawRecordMapper;
    @Autowired
    private ShopMapper shopMapper;
@@ -101,7 +102,7 @@
     */
    @Override
    @Transactional
    public void updateById(WithdrawRecord withdrawRecord) {
    public void updateById(WithdrawRecord withdrawRecord, IntegralService integralService) {
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!Constants.equalsObject(withdrawRecord.getStatus(),Constants.ONE)
                && !Constants.equalsObject(withdrawRecord.getStatus(),Constants.TWO)){
@@ -126,7 +127,20 @@
        model.setPayBank(withdrawRecord.getPayBank());
        withdrawRecordMapper.updateById(model);
        dealBatchMultiFiles(model,withdrawRecord.getPayFileList());
        //审批未通过 退回提现金额
        if (Constants.equalsObject(model.getStatus(), Constants.TWO)) {
            DealIntegralRequest dealIntegralRequest = new DealIntegralRequest();
            dealIntegralRequest.setIntegralObjType(Constants.IntegralObjType.WITHDRAW_APPLY_BACK);
            dealIntegralRequest.setIntegralNum(model.getAmount());
            dealIntegralRequest.setObjId(withdrawRecord.getId());
            dealIntegralRequest.setOrderCode(withdrawRecord.getCode().toString());
            dealIntegralRequest.setMemberId(model.getMemberId());
            dealIntegralRequest.setDealType(Constants.ZERO);
            integralService.dealShopAmount(dealIntegralRequest);
    }
    }
    public void dealBatchMultiFiles(WithdrawRecord model, List<Multifile> fileList  ) {
        //清空原有的
        if(fileList!=null && fileList.size()>0){
@@ -153,7 +167,7 @@
            return;
        }
        for (WithdrawRecord withdrawRecord: withdrawRecords) {
            this.updateById(withdrawRecord);
//            this.updateById(withdrawRecord);
        }
    }