fix:三明治新管家推送值修改
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package com.cool.store.request.xgj;
|
||||
|
||||
import com.cool.store.entity.FranchiseFeeDO;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@@ -52,18 +52,22 @@ public class PushFranchiseFeeRequest {
|
||||
private Integer joinBrand;
|
||||
|
||||
public PushFranchiseFeeRequest(){}
|
||||
public PushFranchiseFeeRequest(Long shopId, String partnerName, FranchiseFeeDO franchiseFeeDO){
|
||||
public PushFranchiseFeeRequest(Long shopId, String partnerName, FranchiseFeeDO franchiseFeeDO, String brand){
|
||||
this.setShopId(shopId);
|
||||
this.setPartnerName(partnerName);
|
||||
this.setBillId(franchiseFeeDO.getId().intValue());
|
||||
this.setFranchiseFee(convertToBig(franchiseFeeDO.getYearFranchiseFee()));
|
||||
this.setBond(convertToBig(franchiseFeeDO.getLoanMargin()));
|
||||
this.setFirstYearManageFee(convertToBig(franchiseFeeDO.getFirstYearManageFee()));
|
||||
this.setFirstYearFee(convertToBig(franchiseFeeDO.getFirstYearFee()));
|
||||
this.setDesignFee(convertToBig(franchiseFeeDO.getPerformanceBond()));
|
||||
// 三明治收银费
|
||||
if (StringUtils.isNotBlank(franchiseFeeDO.getCashierFee())) {
|
||||
if (Integer.valueOf(brand).equals(FranchiseBrandEnum.ZXSMZ.getCode())) {
|
||||
this.setFranchiseFee(convertToBig(franchiseFeeDO.getCashierFee()));
|
||||
this.setBond(convertToBig(franchiseFeeDO.getLoanMargin()));
|
||||
this.setFirstYearManageFee(BigDecimal.ZERO);
|
||||
this.setFirstYearFee(BigDecimal.ZERO);
|
||||
this.setDesignFee(convertToBig(franchiseFeeDO.getPerformanceBond()));
|
||||
} else {
|
||||
this.setFranchiseFee(convertToBig(franchiseFeeDO.getYearFranchiseFee()));
|
||||
this.setBond(convertToBig(franchiseFeeDO.getLoanMargin()));
|
||||
this.setFirstYearManageFee(convertToBig(franchiseFeeDO.getFirstYearManageFee()));
|
||||
this.setFirstYearFee(convertToBig(franchiseFeeDO.getFirstYearFee()));
|
||||
this.setDesignFee(convertToBig(franchiseFeeDO.getPerformanceBond()));
|
||||
}
|
||||
this.setTotalFee(this.getBond()
|
||||
.add(this.getFranchiseFee())
|
||||
|
||||
@@ -93,7 +93,7 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.PAY_FRANCHISE_FEES);
|
||||
//推送加盟费信息到新管家
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO, shopInfoDO.getFranchiseBrand());
|
||||
feeRequest.setJoinBrand(Integer.valueOf(shopInfoDO.getFranchiseBrand()));
|
||||
pushService.pushFranchiseFeeToXGJ(feeRequest);
|
||||
return true;
|
||||
@@ -116,7 +116,7 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
//推送加盟费信息到新管家
|
||||
franchiseFeeDO.setCreateTime(franchiseFeeDO1.getCreateTime());
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO, shopInfoDO.getFranchiseBrand());
|
||||
feeRequest.setJoinBrand(Integer.valueOf(shopInfoDO.getFranchiseBrand()));
|
||||
pushService.pushFranchiseFeeToXGJ(feeRequest);
|
||||
return true;
|
||||
|
||||
@@ -390,7 +390,7 @@ public class PCTestController {
|
||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO, shopInfoDO.getFranchiseBrand());
|
||||
pushService.pushFranchiseFeeToXGJ(feeRequest);
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
@@ -418,7 +418,7 @@ public class PCTestController {
|
||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId());
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO, shopInfoDO.getFranchiseBrand());
|
||||
pushService.pushFranchiseFeeToXGJ(feeRequest);
|
||||
} catch (Exception e) {
|
||||
log.error("推送数据失败 shopId {},异常信息:{}",x,e.getMessage());
|
||||
@@ -434,7 +434,7 @@ public class PCTestController {
|
||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId());
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO, shopInfoDO.getFranchiseBrand());
|
||||
pushService.pushFranchiseFeeToXGJ(feeRequest);
|
||||
List<LinePayDO> franchiseFeePayInfoByShopId = linePayDAO.getFranchiseFeePayInfoByShopId(x.getShopId());
|
||||
franchiseFeePayInfoByShopId.forEach(y->{
|
||||
|
||||
Reference in New Issue
Block a user