Просмотр исходного кода

//tt coupon

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
d14979b366
4 измененных файлов: 17 добавлений и 13 удалений
  1. +9
    -10
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  2. +2
    -2
      mallinkBApi/src/main/java/com/iformall/controller/WxCouponController.java
  3. +5
    -0
      mallinkService/src/main/java/com/iformall/service/impl/OrderSnapshotServiceImpl.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java

+ 9
- 10
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Просмотреть файл

@@ -7,11 +7,7 @@ import com.iformall.common.ErrorCode;
import com.iformall.common.Result; import com.iformall.common.Result;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController; import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxCUserBasicInfo;
import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.po.WxCouponChannel;
import com.iformall.domain.po.WxCouponPassword;
import com.iformall.domain.po.WxPayAccount;
import com.iformall.domain.po.*;
import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.TtCouponVo; import com.iformall.domain.vo.TtCouponVo;
import com.iformall.domain.vo.WxCouponStatisVo; import com.iformall.domain.vo.WxCouponStatisVo;
@@ -53,7 +49,7 @@ public class WxCouponController extends BaseController {
@Autowired @Autowired
private WxCouponPasswordService couponPasswordService; private WxCouponPasswordService couponPasswordService;
@Autowired @Autowired
private WxCouponChannelMapper wxCouponChannelMapper;
private WxCouponChannelService wxCouponChannelService;
@Autowired @Autowired
private WxFlowService wxFlowService; private WxFlowService wxFlowService;
@Autowired @Autowired
@@ -195,12 +191,15 @@ public class WxCouponController extends BaseController {
query.updateTenantInfo(wxCoupon); query.updateTenantInfo(wxCoupon);
query.setCouponId(wxCoupon.getId()); query.setCouponId(wxCoupon.getId());
query.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); query.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
if (CollectionUtils.isNotEmpty(wxCouponChannelMapper.findList(query))) {
if (CollectionUtils.isNotEmpty(wxCouponChannelService.findList(query))) {
return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。"); return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。");
} }
// query.setStatus(EnumCouponChannelStatus.STATUS_BEFORE.getCode()); // query.setStatus(EnumCouponChannelStatus.STATUS_BEFORE.getCode());
// if (CollectionUtils.isNotEmpty(wxCouponChannelMapper.findList(query))) {
// return new ResultData(ResultData.ERROR, "有活动正在预审核.");
// if (CollectionUtils.isNotEmpty(wxCouponChannelService.findList(query))) {
// TtCouponChannelPoi ttCouponChannelPoi = wxCouponService.getCouponChannelPoi(getTenantInfo(),wxCoupon.getId());
// if(EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus())){
// return new ResultData(ResultData.ERROR, "有活动正在预审核.");
// }
// } // }
} }
@@ -248,7 +247,7 @@ public class WxCouponController extends BaseController {
query.updateTenantInfo(wxCoupon); query.updateTenantInfo(wxCoupon);
query.setCouponId(wxCoupon.getId()); query.setCouponId(wxCoupon.getId());
query.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); query.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
if (CollectionUtils.isNotEmpty(wxCouponChannelMapper.findList(query))) {
if (CollectionUtils.isNotEmpty(wxCouponChannelService.findList(query))) {
return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。"); return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。");
} }
} }


+ 2
- 2
mallinkBApi/src/main/java/com/iformall/controller/WxCouponController.java Просмотреть файл

@@ -49,7 +49,7 @@ public class WxCouponController extends BaseController {
@Autowired @Autowired
private WxCouponPasswordService couponPasswordService; private WxCouponPasswordService couponPasswordService;
@Autowired @Autowired
private WxCouponChannelMapper wxCouponChannelMapper;
private WxCouponChannelService wxCouponChannelService;
@Autowired @Autowired
private WxFlowService wxFlowService; private WxFlowService wxFlowService;
@Autowired @Autowired
@@ -243,7 +243,7 @@ public class WxCouponController extends BaseController {
query.updateTenantInfo(wxCoupon); query.updateTenantInfo(wxCoupon);
query.setCouponId(wxCoupon.getId()); query.setCouponId(wxCoupon.getId());
query.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); query.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
if (CollectionUtils.isNotEmpty(wxCouponChannelMapper.findList(query))) {
if (CollectionUtils.isNotEmpty(wxCouponChannelService.findList(query))) {
return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。"); return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。");
} }
} }


+ 5
- 0
mallinkService/src/main/java/com/iformall/service/impl/OrderSnapshotServiceImpl.java Просмотреть файл

@@ -80,6 +80,8 @@ public class OrderSnapshotServiceImpl implements OrderSnapshotService {
logger.error("同步订单快照异常---未找到商品数据"); logger.error("同步订单快照异常---未找到商品数据");
return ; return ;
} }
WxCoupon attrsById = wxCouponMapper.getAttrsById(order.getProductId(), order.getTenantId());

OrderSnapshot snapshot = new OrderSnapshot(); OrderSnapshot snapshot = new OrderSnapshot();
final IdWorker idWorker = IdWorker.get(); final IdWorker idWorker = IdWorker.get();
Date now = new Date(); Date now = new Date();
@@ -89,6 +91,9 @@ public class OrderSnapshotServiceImpl implements OrderSnapshotService {
snapshot.setOrderId(wxOrder.getId()); snapshot.setOrderId(wxOrder.getId());
snapshot.initByCoupon(wxCoupon); snapshot.initByCoupon(wxCoupon);


snapshot.setProductAttrs(attrsById.getProductAttrs());
snapshot.setSkuAttrs(attrsById.getSkuAttrs());

List<Long> couponIdList = new ArrayList<Long>(); List<Long> couponIdList = new ArrayList<Long>();
couponIdList.add(wxCoupon.getId()); couponIdList.add(wxCoupon.getId());
Map<Long, List<WxMerchantVo>> couponMerchantVoMap = wxMerchantService.findCouponMerchantVoList(couponIdList, wxCoupon,true); Map<Long, List<WxMerchantVo>> couponMerchantVoMap = wxMerchantService.findCouponMerchantVoList(couponIdList, wxCoupon,true);


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Просмотреть файл

@@ -775,7 +775,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
@Override @Override
public ResultData getCouponChannelPoi(TenantEntity tenantInfo, Long id) { public ResultData getCouponChannelPoi(TenantEntity tenantInfo, Long id) {
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectByChannelId(tenantInfo.getTenantId(),id); TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectByChannelId(tenantInfo.getTenantId(),id);
if(ttCouponChannelPoi != null && ttCouponChannelPoi.getStatus() != null && ttCouponChannelPoi.getStatus().intValue() > 0){
if(ttCouponChannelPoi != null && ttCouponChannelPoi.getLastStatus() != null && ttCouponChannelPoi.getLastStatus().intValue() > 0){
return new ResultData(ttCouponChannelPoi); return new ResultData(ttCouponChannelPoi);
} }
return new ResultData(ErrorCode.SYS_NULLPOINTER_ERROR.getCode(),"未找到可用的数据"); return new ResultData(ErrorCode.SYS_NULLPOINTER_ERROR.getCode(),"未找到可用的数据");


Загрузка…
Отмена
Сохранить