Explorar el Código

//

release_toaliyun_real
xhxu hace 3 años
padre
commit
2975f73e6a
Se han modificado 2 ficheros con 30 adiciones y 0 borrados
  1. +8
    -0
      mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java
  2. +22
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java

+ 8
- 0
mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java Ver fichero

@@ -161,6 +161,14 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
@Override @Override
@Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) @Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
public ResultData productSave(WxCoupon coupon) throws Exception { public ResultData productSave(WxCoupon coupon) throws Exception {
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(coupon.getTenantId(),coupon.getId());
if(ttCouponChannelPoi != null &&
(EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus())
|| EnumSpuSyncStatus.sync_put_on.getCode().equals(ttCouponChannelPoi.getLastStatus())
|| EnumSpuSyncStatus.sync_audit_disable.getCode().equals(ttCouponChannelPoi.getLastStatus()))){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"该券状态不允许提交审核");
}

WxCoupon ttattrs = wxCouponService.getAttrsById(coupon.getId(), coupon.getTenantId()); WxCoupon ttattrs = wxCouponService.getAttrsById(coupon.getId(), coupon.getTenantId());
if(ttattrs.getProductType() == null || ttattrs.getCategoryId() == null if(ttattrs.getProductType() == null || ttattrs.getCategoryId() == null
|| ttattrs.getProductAttrKeyValueMap().isEmpty() || ttattrs.getProductAttrKeyValueMap().isEmpty()


+ 22
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Ver fichero

@@ -147,6 +147,9 @@ public class WxCouponServiceImpl implements WxCouponService {


@Autowired @Autowired
PayServiceFactory payServiceFactory; PayServiceFactory payServiceFactory;

@Autowired
TtCouponChannelPoiMapper ttCouponChannelPoiMapper;
@Autowired @Autowired
WxCouponMallMapper wxCouponMallMapper; WxCouponMallMapper wxCouponMallMapper;
@@ -587,6 +590,15 @@ public class WxCouponServiceImpl implements WxCouponService {
wxCouponMapper.insert(record); wxCouponMapper.insert(record);


} else { } else {
if(EnumCouponType.getDouYinType().contains(record.getType())){
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(record.getTenantId(),record.getId());
if(ttCouponChannelPoi != null &&
(EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus())
|| EnumSpuSyncStatus.sync_put_on.getCode().equals(ttCouponChannelPoi.getLastStatus())
|| EnumSpuSyncStatus.sync_audit_disable.getCode().equals(ttCouponChannelPoi.getLastStatus()))){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"该券状态不允许修改");
}
}


if(record.getInventory() != null && record.getRemainInventory() != null) { if(record.getInventory() != null && record.getRemainInventory() != null) {
// 库存修改检查 // 库存修改检查
@@ -905,6 +917,16 @@ public class WxCouponServiceImpl implements WxCouponService {


@Override @Override
public ResultData updateTtProduct(WxCoupon record) { public ResultData updateTtProduct(WxCoupon record) {
if(EnumCouponType.getDouYinType().contains(record.getType())){
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(record.getTenantId(),record.getId());
if(ttCouponChannelPoi != null &&
(EnumSpuSyncStatus.sync_auditing.getCode().equals(ttCouponChannelPoi.getLastStatus())
|| EnumSpuSyncStatus.sync_put_on.getCode().equals(ttCouponChannelPoi.getLastStatus())
|| EnumSpuSyncStatus.sync_audit_disable.getCode().equals(ttCouponChannelPoi.getLastStatus()))){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"该券状态不允许修改");
}
}
if(StringUtils.isBlank(record.getProductAttrs()) || StringUtils.isBlank(record.getSkuAttrs())){ if(StringUtils.isBlank(record.getProductAttrs()) || StringUtils.isBlank(record.getSkuAttrs())){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
} }


Cargando…
Cancelar
Guardar