| @@ -3,14 +3,11 @@ package com.iformall.mapper; | |||||
| import java.util.*; | import java.util.*; | ||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxProfitSharingResult; | import com.iformall.domain.po.WxProfitSharingResult; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| public interface WxProfitSharingResultMapper extends CommonMapper<WxProfitSharingResult, Long> { | public interface WxProfitSharingResultMapper extends CommonMapper<WxProfitSharingResult, Long> { | ||||
| List<WxProfitSharingResult> findList(WxProfitSharingResult wxProfitSharingResult); | List<WxProfitSharingResult> findList(WxProfitSharingResult wxProfitSharingResult); | ||||
| int deleteBySharingOrderId(@Param(value = "sharingOrderId")Long sharingOrderId, @Param(value = "tenantId")String tenantId); | |||||
| } | } | ||||
| @@ -692,9 +692,9 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||||
| } | } | ||||
| map.put("realRate",payAccount.getRealRate()); | map.put("realRate",payAccount.getRealRate()); | ||||
| map.put("systemRate",payAccount.getSystemRate()+payAccount.getSellRate()); | |||||
| int rate = 0; | int rate = 0; | ||||
| if(EnumYesOrNo.YES.getCode().equals(payAccount.getIsCommission())){ | if(EnumYesOrNo.YES.getCode().equals(payAccount.getIsCommission())){ | ||||
| map.put("systemRate",payAccount.getSystemRate()+payAccount.getSellRate()); | |||||
| rate = payAccount.getRealRate()+payAccount.getSystemRate()+payAccount.getSellRate(); | rate = payAccount.getRealRate()+payAccount.getSystemRate()+payAccount.getSellRate(); | ||||
| }else{ | }else{ | ||||
| rate = payAccount.getRealRate(); | rate = payAccount.getRealRate(); | ||||
| @@ -347,10 +347,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||||
| receivers.add(jo); | receivers.add(jo); | ||||
| } | } | ||||
| try{ | try{ | ||||
| WxProfitSharingResult resultDel = new WxProfitSharingResult(); | |||||
| resultDel.updateTenantInfo(sharingOrder); | |||||
| resultDel.setSharingOrderId(sharingOrder.getId()); | |||||
| int delete = wxProfitSharingResultMapper.delete(new QueryWrapper<>()); | |||||
| int delete = wxProfitSharingResultMapper.deleteBySharingOrderId(sharingOrder.getId(),sharingOrder.getTenantId()); | |||||
| final IdWorker idworker = IdWorker.get(); | final IdWorker idworker = IdWorker.get(); | ||||
| receivers.stream().forEach(obj -> { | receivers.stream().forEach(obj -> { | ||||
| JSONObject o =(JSONObject) obj; | JSONObject o =(JSONObject) obj; | ||||
| @@ -95,6 +95,12 @@ | |||||
| from wx_profit_sharing_result | from wx_profit_sharing_result | ||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <delete id="deleteBySharingOrderId" parameterType="java.util.HashMap" > | |||||
| delete from wx_profit_sharing_result | |||||
| where `tenant_id` = #{tenantId} | |||||
| and `sharing_order_id` = #{sharingOrderId} | |||||
| </delete> | |||||