Bläddra i källkod

//tt goods

release_toaliyun_real
xhxu 3 år sedan
förälder
incheckning
00843a54e8
2 ändrade filer med 26 tillägg och 24 borttagningar
  1. +16
    -14
      mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java
  2. +10
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java

+ 16
- 14
mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java Visa fil

@@ -326,8 +326,8 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
@Override
public ResultData productOperate(TenantEntity tenantInfo, Long id) {
WxCoupon wxCoupon = wxCouponMapper.selectById(id, tenantInfo.getTenantId());
if(wxCoupon == null || EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未找到或已作废");
if(wxCoupon == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未找到");
}
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),id);
if(ttCouponChannelPoi == null || !EnumSpuSyncStatus.sync_audit_pass.getCode().equals(ttCouponChannelPoi.getLastStatus())){
@@ -336,14 +336,16 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
//查询上架
//op_type int64 TRUE 1-上线 2-下线
Integer op_type = 2;
WxCouponChannel wxCouponChannelQuery = new WxCouponChannel();
wxCouponChannelQuery.updateTenantInfo(wxCoupon);
wxCouponChannelQuery.setCouponId(wxCoupon.getId());
wxCouponChannelQuery.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN_LIST.getCode());
wxCouponChannelQuery.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
List<WxCouponChannel> wxCouponChannels = wxCouponChannelMapper.findList(wxCouponChannelQuery);
if(wxCouponChannels.size() > 0){
op_type = 1;
if(!EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())){
WxCouponChannel wxCouponChannelQuery = new WxCouponChannel();
wxCouponChannelQuery.updateTenantInfo(wxCoupon);
wxCouponChannelQuery.setCouponId(wxCoupon.getId());
wxCouponChannelQuery.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN_LIST.getCode());
wxCouponChannelQuery.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
List<WxCouponChannel> wxCouponChannels = wxCouponChannelMapper.findList(wxCouponChannelQuery);
if(wxCouponChannels.size() > 0){
op_type = 1;
}
}

try {
@@ -364,8 +366,8 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
@Override
public ResultData productStockSync(TenantEntity tenantInfo, Long id) {
WxCoupon wxCoupon = wxCouponMapper.selectById(id, tenantInfo.getTenantId());
if(wxCoupon == null || EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未找到或已作废");
if(wxCoupon == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未找到");
}
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),id);
if(ttCouponChannelPoi == null || !EnumSpuSyncStatus.sync_audit_pass.getCode().equals(ttCouponChannelPoi.getLastStatus())){
@@ -389,8 +391,8 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
@Override
public ResultData productFreeAudit(TenantEntity tenantInfo, Long id) {
WxCoupon wxCoupon = wxCouponMapper.selectById(id, tenantInfo.getTenantId());
if(wxCoupon == null || EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未找到或已作废");
if(wxCoupon == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未找到");
}
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),id);
if(ttCouponChannelPoi == null || !EnumSpuSyncStatus.sync_audit_pass.getCode().equals(ttCouponChannelPoi.getLastStatus())){


+ 10
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Visa fil

@@ -1036,11 +1036,11 @@ public class WxCouponServiceImpl implements WxCouponService {
if (num == 0) {
throw new MallinkException(ErrorCode.ORDER_SAVE_ERR);
}
try{
spuStockSync(tenantEntity,id);
}catch(Exception e){
logger.error("send spuStockSync error: " + e.getMessage());
}
// try{
// spuStockSync(tenantEntity,id);
// }catch(Exception e){
// logger.error("send spuStockSync error: " + e.getMessage());
// }
}

@Override
@@ -1050,11 +1050,11 @@ public class WxCouponServiceImpl implements WxCouponService {
if (num == 0) {
throw new MallinkException(ErrorCode.REMAIN_BACK_FAIL);
}
try{
spuStockSync(tenantEntity,id);
}catch(Exception e){
logger.error("send spuStockSync error: " + e.getMessage());
}
// try{
// spuStockSync(tenantEntity,id);
// }catch(Exception e){
// logger.error("send spuStockSync error: " + e.getMessage());
// }
}

private void spuStockSync(TenantEntity tenantEntity,Long couponId){


Laddar…
Avbryt
Spara