fix:三明治新管家推送值修改

This commit is contained in:
wangff
2025-11-11 18:39:37 +08:00
parent 2dfff50138
commit 456e778f1d
3 changed files with 18 additions and 14 deletions

View File

@@ -1,9 +1,9 @@
package com.cool.store.request.xgj; package com.cool.store.request.xgj;
import com.cool.store.entity.FranchiseFeeDO; import com.cool.store.entity.FranchiseFeeDO;
import com.cool.store.enums.FranchiseBrandEnum;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -52,18 +52,22 @@ public class PushFranchiseFeeRequest {
private Integer joinBrand; private Integer joinBrand;
public PushFranchiseFeeRequest(){} public PushFranchiseFeeRequest(){}
public PushFranchiseFeeRequest(Long shopId, String partnerName, FranchiseFeeDO franchiseFeeDO){ public PushFranchiseFeeRequest(Long shopId, String partnerName, FranchiseFeeDO franchiseFeeDO, String brand){
this.setShopId(shopId); this.setShopId(shopId);
this.setPartnerName(partnerName); this.setPartnerName(partnerName);
this.setBillId(franchiseFeeDO.getId().intValue()); this.setBillId(franchiseFeeDO.getId().intValue());
this.setFranchiseFee(convertToBig(franchiseFeeDO.getYearFranchiseFee())); if (Integer.valueOf(brand).equals(FranchiseBrandEnum.ZXSMZ.getCode())) {
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())) {
this.setFranchiseFee(convertToBig(franchiseFeeDO.getCashierFee())); 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() this.setTotalFee(this.getBond()
.add(this.getFranchiseFee()) .add(this.getFranchiseFee())

View File

@@ -93,7 +93,7 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId()); LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.PAY_FRANCHISE_FEES); 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())); feeRequest.setJoinBrand(Integer.valueOf(shopInfoDO.getFranchiseBrand()));
pushService.pushFranchiseFeeToXGJ(feeRequest); pushService.pushFranchiseFeeToXGJ(feeRequest);
return true; return true;
@@ -116,7 +116,7 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId()); LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
//推送加盟费信息到新管家 //推送加盟费信息到新管家
franchiseFeeDO.setCreateTime(franchiseFeeDO1.getCreateTime()); 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())); feeRequest.setJoinBrand(Integer.valueOf(shopInfoDO.getFranchiseBrand()));
pushService.pushFranchiseFeeToXGJ(feeRequest); pushService.pushFranchiseFeeToXGJ(feeRequest);
return true; return true;

View File

@@ -390,7 +390,7 @@ public class PCTestController {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId); FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId); ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId()); 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); pushService.pushFranchiseFeeToXGJ(feeRequest);
return ResponseResult.success(Boolean.TRUE); return ResponseResult.success(Boolean.TRUE);
} }
@@ -418,7 +418,7 @@ public class PCTestController {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId()); FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId());
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId()); ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId()); 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); pushService.pushFranchiseFeeToXGJ(feeRequest);
} catch (Exception e) { } catch (Exception e) {
log.error("推送数据失败 shopId {},异常信息:{}",x,e.getMessage()); log.error("推送数据失败 shopId {},异常信息:{}",x,e.getMessage());
@@ -434,7 +434,7 @@ public class PCTestController {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId()); FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId());
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId()); ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId()); 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); pushService.pushFranchiseFeeToXGJ(feeRequest);
List<LinePayDO> franchiseFeePayInfoByShopId = linePayDAO.getFranchiseFeePayInfoByShopId(x.getShopId()); List<LinePayDO> franchiseFeePayInfoByShopId = linePayDAO.getFranchiseFeePayInfoByShopId(x.getShopId());
franchiseFeePayInfoByShopId.forEach(y->{ franchiseFeePayInfoByShopId.forEach(y->{