Commit 8092209d authored by hezhen's avatar hezhen

修改批量提交审核

parent 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 WalletCathApplyDTO {
@ApiModelProperty("门店")
private List<Integer> companyIds;
@ApiModelProperty("提现金额")
private BigDecimal amount;
@ApiModelProperty("提现账号")
private String accountNumber;
@ApiModelProperty("账号名称")
private String accountName;
}
......@@ -10,6 +10,7 @@ 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.WalletCathApplyDTO;
import com.xxfc.platform.order.pojo.dto.WalletCathDTO;
import com.xxfc.platform.order.pojo.vo.CompanyWalletCathVo;
import com.xxfc.platform.order.pojo.vo.CompanyWalletDetailVo;
......@@ -18,6 +19,9 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.Instant;
......@@ -59,6 +63,21 @@ public class CompanyWalletCathBiz extends BaseBiz<CompanyWalletCathMapper, Compa
}
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public void applyCathList(WalletCathApplyDTO walletCathApplyDTO){
if (walletCathApplyDTO == null) {
throw new BaseException("参数不能为空",ResultCode.NULL_CODE);
}
List<Integer> companyIds = walletCathApplyDTO.getCompanyIds();
for (Integer companyId:companyIds){
CompanyWalletCath walletCathDTO=new CompanyWalletCath();
BeanUtils.copyProperties(walletCathApplyDTO,walletCathDTO);
walletCathDTO.setCompanyId(companyId);
applyCath(walletCathDTO);
}
}
//提现申请
public void applyCath(CompanyWalletCath walletCathDTO) {
if (walletCathDTO == null) {
......
......@@ -11,6 +11,7 @@ import com.xxfc.platform.order.biz.CompanyWalletCathBiz;
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.pojo.dto.WalletCathApplyDTO;
import com.xxfc.platform.order.pojo.dto.WalletCathDTO;
import com.xxfc.platform.order.pojo.dto.WalletDTO;
import com.xxfc.platform.order.pojo.dto.WalletDetailDTO;
......@@ -82,6 +83,14 @@ public class AdminCompanyWalletDetailController extends BaseController<CompanyWa
return ObjectRestResponse.succ();
}
@RequestMapping(value = "applyCathList", method = RequestMethod.POST)
@ApiModelProperty(value = "提现申请List")
public ObjectRestResponse applyCathList(@RequestBody WalletCathApplyDTO walletCathApplyDTO) {
walletCathBiz.applyCathList(walletCathApplyDTO);
return ObjectRestResponse.succ();
}
@RequestMapping(value = "withDrawProcess", method = RequestMethod.POST)
@ApiModelProperty(value = "提现审核")
public ObjectRestResponse withDrawProcess(@RequestBody CompanyWalletCath companyWalletCath) {
......
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