Merge branch 'cc_20250820_bugfix' into 'master'

Cc 20250820 bugfix

See merge request hangzhou/java/custom_zxjp!153
This commit is contained in:
苏竹红
2025-08-20 09:05:04 +00:00
5 changed files with 84 additions and 15 deletions

View File

@@ -70,4 +70,6 @@ public interface LinePayMapper {
Integer updateXgjClaimStatus(@Param("list") List<Long> shopIds,@Param("xgjClaimStatus") Integer xgjClaimStatus,@Param("payBusinessType") Integer payBusinessType); Integer updateXgjClaimStatus(@Param("list") List<Long> shopIds,@Param("xgjClaimStatus") Integer xgjClaimStatus,@Param("payBusinessType") Integer payBusinessType);
Integer deleteByShopId(@Param("list")List<Long> shopIds); Integer deleteByShopId(@Param("list")List<Long> shopIds);
LinePayDO getLastPay(@Param("shopId") Long shopId);
} }

View File

@@ -414,6 +414,16 @@
select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and
pay_business_type = 1 order by create_time desc pay_business_type = 1 order by create_time desc
</select> </select>
<select id="getLastPay" resultMap="BaseResultMap">
select * from xfsg_line_pay
where deleted = 0
and shop_id = #{shopId}
and pay_business_type = 1
and xgj_claim_status = 1
order by update_time desc limit 1
</select>
<update id="dataUpdateLinePay"> <update id="dataUpdateLinePay">
<foreach collection="list" separator=";" item="item" index="index"> <foreach collection="list" separator=";" item="item" index="index">
update xfsg_line_pay update xfsg_line_pay

View File

@@ -7,6 +7,7 @@ import com.cool.store.dao.PointInfoDAO;
import com.cool.store.dao.ShopStageInfoDAO; import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.enums.point.PayBusinessTypeEnum;
import com.cool.store.enums.point.ShopSubStageEnum; import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
@@ -215,10 +216,21 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
franchiseFeeDO.setXgjCollectionStatus(request.getPaymentStatus()); franchiseFeeDO.setXgjCollectionStatus(request.getPaymentStatus());
franchiseFeeDO.setXgjRemainderPayableAmount(request.getRemainingFee()); franchiseFeeDO.setXgjRemainderPayableAmount(request.getRemainingFee());
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees()); franchiseFeeDO.setXgjFeesPaid(request.getPaidFees());
if (request.getPayableFee().compareTo(request.getPaidFees())==-1&&XGJCollectionStatusEnum.PARTIAL_PAYMENT.getCode().equals(request.getPaymentStatus())){
franchiseFeeDO.setXgjRemainderPayableAmount(new BigDecimal("0"));
franchiseFeeDO.setXgjCollectionStatus(XGJCollectionStatusEnum.COMPLETED.getCode());
//如果多缴费 都缴部分退款或者其他用处 这里缴费费用还是填写所需缴的费用
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees().add(request.getRemainingFee()));
LinePayDO lastPay = linePayMapper.getLastPay(franchiseFeeDO.getShopId());
lastPay.setRemark(lastPay.getRemark()+"系统监测到您多缴费"+request.getRemainingFee().abs()+"元 请申请退款或留做他用!");
linePayMapper.updateByPrimaryKeySelective(lastPay);
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
}
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO); franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
if (XGJCollectionStatusEnum.COMPLETED.getCode().equals(request.getPaymentStatus())){ if (XGJCollectionStatusEnum.COMPLETED.getCode().equals(request.getPaymentStatus())){
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80)); shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
} }
return ApiResponse.success(Boolean.TRUE); return ApiResponse.success(Boolean.TRUE);
} }
} }

View File

@@ -171,21 +171,21 @@ public class LinePayServiceImpl implements LinePayService {
if (request.getId()!=null){ if (request.getId()!=null){
payIdMap.remove(request.getId()); payIdMap.remove(request.getId());
} }
//判断缴费金额不能大于未缴费金额 // //判断缴费金额不能大于未缴费金额
BigDecimal total = payIdMap.values().stream() // BigDecimal total = payIdMap.values().stream()
.map(LinePayDO::getAmount) // .map(LinePayDO::getAmount)
.reduce(BigDecimal.ZERO, BigDecimal::add); // .reduce(BigDecimal.ZERO, BigDecimal::add);
//应缴金额 // //应缴金额
BigDecimal amountDue = new BigDecimal(franchiseFeeDO.getYearFranchiseFee()) // BigDecimal amountDue = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
.add(new BigDecimal(franchiseFeeDO.getLoanMargin())) // .add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee())) // .add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee())) // .add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond())); // .add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
//未缴费金额 // //未缴费金额
BigDecimal amountUnpaid = amountDue.subtract(total); // BigDecimal amountUnpaid = amountDue.subtract(total);
if( request.getAmount().compareTo(amountUnpaid) > 0 ){ // if( request.getAmount().compareTo(amountUnpaid) > 0 ){
throw new ServiceException(ErrorCodeEnum.PAY_AMOUNT_ERROR); // throw new ServiceException(ErrorCodeEnum.PAY_AMOUNT_ERROR);
} // }
Set<String> payUserList = list.stream().map(LinePayDO::getPayUserName).collect(Collectors.toSet()); Set<String> payUserList = list.stream().map(LinePayDO::getPayUserName).collect(Collectors.toSet());
if (!payUserList.contains(request.getPayUserName()) && payUserList.size() >= 2) { if (!payUserList.contains(request.getPayUserName()) && payUserList.size() >= 2) {
throw new ServiceException(ErrorCodeEnum.PAY_USER_NAME_ERROR); throw new ServiceException(ErrorCodeEnum.PAY_USER_NAME_ERROR);
@@ -321,6 +321,7 @@ public class LinePayServiceImpl implements LinePayService {
return ApiResponse.error(ErrorCodeEnum.RECEIPT_NOT_EXIST); return ApiResponse.error(ErrorCodeEnum.RECEIPT_NOT_EXIST);
} }
linePayDO.setXgjClaimStatus(request.getClaimStatus()); linePayDO.setXgjClaimStatus(request.getClaimStatus());
linePayDO.setUpdateTime(new Date());
linePayDAO.updateLinePay(linePayDO); linePayDAO.updateLinePay(linePayDO);
return ApiResponse.success(Boolean.TRUE); return ApiResponse.success(Boolean.TRUE);
} }

View File

@@ -81,6 +81,50 @@ aliyun.sms.signName=酷店掌
mybatis.configuration.variables.enterpriseId=e17cd2dc350541df8a8b0af9bd27f77d mybatis.configuration.variables.enterpriseId=e17cd2dc350541df8a8b0af9bd27f77d
enterprise.dingCorpId=dingef2502a50df74ccc35c2f4657eb6378f enterprise.dingCorpId=dingef2502a50df74ccc35c2f4657eb6378f
qywx.task.notice.url2=https://tstore-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s&noticeType=zx&corpId=%s&appType=%s&eid=%s
#机会点地址
third.party.appKey=IGSAEQoakR2HEaYx
third.party.appSecret=aPsA99K1obFeFm3m
zx.opportunity.url=https://snp.wenmatech.com/
#大数据地址
zx.big.data.url=https://ds.zhengxinfood.com/
zx.big.data.appKey=ff203b5567744feaaae49fb86f58c5bf
zx.big.data.appSecret=35b8b9a400b4430fa022190be0913cd6
#火吗POS
api.auth.url=https://api.hmdzg.top
api.auth.username=VA59C0ubfcpcVpl
api.auth.secret=H9YKHF6R7N16Fvy
#新管家账号
xgj.api.auth.url=http://117.139.13.24:11180
xgj.api.auth.username=6446346061e043e392dd53c9c8d1af0b
xgj.api.auth.secret=3ba6e4c5632547b8b2b3acefe08667bb
xgj.api.token.url=http://117.139.13.24:29000
#云流水账号
#yls.api.auth.url=http://scm330-test.366ec.net
#yls.api.auth.username=096d4009072c927c
#yls.api.auth.secret=3b56198f096d4009072c927c96fbc8b6
yls.api.auth.url=http://yuanguiwuliu.com
yls.api.auth.username=096d4009072c927c
yls.api.auth.secret=3b56198f096d4009072c927c96fbc8b6
#新掌柜账号
xzg.api.auth.url=http://webapi.zhengxinfood.com
zx.food.url=https://datacenter.zhengxinfood.com
cool.api.appKey=k8J7fG2qR5tY9vX3
cool.api.secret=wP4sN6dL8zK2xM9c
#maozhejun userID
special.user.id=wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg_woayJeDAAA0TC8mkCJeXouw94hYA-D3Q
ask.bot.url=https://test.auth.wx.askbot.cn
hqt.token.url=https://tc.cloud.hecom.cn hqt.token.url=https://tc.cloud.hecom.cn