feat:加盟费处理
This commit is contained in:
@@ -70,4 +70,6 @@ public interface LinePayMapper {
|
||||
Integer updateXgjClaimStatus(@Param("list") List<Long> shopIds,@Param("xgjClaimStatus") Integer xgjClaimStatus,@Param("payBusinessType") Integer payBusinessType);
|
||||
|
||||
Integer deleteByShopId(@Param("list")List<Long> shopIds);
|
||||
|
||||
LinePayDO getLastPay(@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -414,6 +414,16 @@
|
||||
select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and
|
||||
pay_business_type = 1 order by create_time desc
|
||||
</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">
|
||||
<foreach collection="list" separator=";" item="item" index="index">
|
||||
update xfsg_line_pay
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.cool.store.dao.PointInfoDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.*;
|
||||
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.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
@@ -215,10 +216,17 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
franchiseFeeDO.setXgjCollectionStatus(request.getPaymentStatus());
|
||||
franchiseFeeDO.setXgjRemainderPayableAmount(request.getRemainingFee());
|
||||
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees());
|
||||
if (request.getPayableFee().compareTo(request.getPaidFees())==-1&&XGJCollectionStatusEnum.PARTIAL_PAYMENT.getCode().equals(request.getPaymentStatus())){
|
||||
franchiseFeeDO.setXgjRemainderPayableAmount(new BigDecimal("0"));
|
||||
LinePayDO lastPay = linePayMapper.getLastPay(franchiseFeeDO.getShopId());
|
||||
lastPay.setRemark(lastPay.getRemark()+"系统监测到您多缴费"+request.getRemainingFee().abs()+"元 请申请退款或留做他用!");
|
||||
linePayMapper.updateByPrimaryKeySelective(lastPay);
|
||||
}
|
||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||
if (XGJCollectionStatusEnum.COMPLETED.getCode().equals(request.getPaymentStatus())){
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
|
||||
}
|
||||
return ApiResponse.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user