|
|
|
@@ -13,6 +13,7 @@ import com.iformall.domain.po.msg.WxMsgRecord; |
|
|
|
import com.iformall.domain.vo.FlowUserVo; |
|
|
|
import com.iformall.domain.vo.UserTaskVo; |
|
|
|
import com.iformall.domain.vo.WxBillAll; |
|
|
|
import com.iformall.domain.vo.WxCouponChannelVo; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.mq.MqBaseProducer; |
|
|
|
@@ -38,6 +39,8 @@ import org.flowable.task.api.TaskQuery; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@@ -90,6 +93,9 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
private WxBillSettleMapper wxBillSettleMapper; |
|
|
|
@Autowired |
|
|
|
private WxBillSettleService wxBillSettleService; |
|
|
|
@Autowired |
|
|
|
@Qualifier("couponChannelRedisTemplate") |
|
|
|
RedisTemplate<String, PageInfo<WxCouponChannelVo>> cdRedisTemplate; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取流程key |
|
|
|
@@ -250,8 +256,7 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
|| EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType) |
|
|
|
|| EnumFlowKey.NEW_GROUP_UPLINE.getCode().equals(flowType) |
|
|
|
|| EnumFlowKey.NEW_PRESS_UPLINE.getCode().equals(flowType)) { |
|
|
|
WxCoupon wxCoupon = new WxCoupon(); |
|
|
|
wxCoupon.setId(businessId); |
|
|
|
WxCoupon wxCoupon = wxCouponMapper.selectByPrimaryKey(businessId); |
|
|
|
wxCoupon.setUpdateDate(new Date()); |
|
|
|
|
|
|
|
if(EnumCouponAppType.PUT.getCode().equals(operateType)){ |
|
|
|
@@ -286,7 +291,11 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
wxCoupon.setRemainInventory(remainInventory); |
|
|
|
wxCoupon.setType(type); |
|
|
|
wxCoupon.setValidType(validType); |
|
|
|
wxCoupon.setTenantId(wxCoupon.getTenantId()); |
|
|
|
wxCouponService.updateCouponStockAndEndTime(wxCoupon); |
|
|
|
|
|
|
|
//清除缓存 |
|
|
|
clearCache(wxCoupon.getTenantId()); |
|
|
|
} |
|
|
|
}else if(EnumCouponAppType.CANCLE.getCode().equals(operateType)){ |
|
|
|
wxCoupon.setCancleApplyStatus(applyStatus); |
|
|
|
@@ -324,6 +333,17 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 清除c端首页卷列表缓存 |
|
|
|
* @param tenantId |
|
|
|
*/ |
|
|
|
public void clearCache(String tenantId){ |
|
|
|
for (int i = 1; i <=5 ; i++) { |
|
|
|
String key = EnumCacheKey.C_INDEX_PAGE_LIST.getMessage()+tenantId+"_" + i + ":"; |
|
|
|
cdRedisTemplate.delete(key); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public Map<String,Object> mallUserInfoToMap(MallUserInfo userInfo){ |
|
|
|
try { |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|