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

//tt product

release_toaliyun_real
xhxu 4 лет назад
Родитель
Сommit
38379aba80
3 измененных файлов: 20 добавлений и 7 удалений
  1. +3
    -3
      mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java
  2. +12
    -0
      mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java
  3. +5
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java

+ 3
- 3
mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java Просмотреть файл

@@ -185,10 +185,10 @@ public class WxOrderController extends BaseController {
try{
JSONArray jsonArray = JSONObject.parseArray(cp_extra);
for(int i=0;i<jsonArray.size();i++){
String couponId = jsonArray.getJSONObject(i).getString("couponId");
String goodsId = jsonArray.getJSONObject(i).getString("goodsId");
Long couponChannelId = jsonArray.getJSONObject(i).getLongValue("couponChannelId");
if(StringUtils.isNotBlank(couponId) && couponChannelId != null){
couponMap.put(couponId,couponChannelId);
if(StringUtils.isNotBlank(goodsId) && couponChannelId != null){
couponMap.put(goodsId,couponChannelId);
}
}
}catch(Exception e){


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

@@ -198,7 +198,19 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {
product.setSku(skuStruct);

String productId = ttWebService.getGoodsService().productSave(product);

if(StringUtils.isBlank(productId)){
throw new Exception("未获取到抖音商品product_id");
}

WxCouponChannel updCC = new WxCouponChannel();
updCC.setId(wxCouponChannel.getId());
updCC.updateTenantInfo(wxCouponChannel);
wxCouponChannel.setTtSpuId(productId);
wxCouponChannelMapper.updateById(wxCouponChannel);

syncCouponChannelPoi(coupon,wxCouponChannel.getId(),productId);

return new ResultData();

} catch (WxErrorException e) {


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

@@ -774,7 +774,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {

@Override
public ResultData getCouponChannelPoi(TenantEntity tenantInfo, Long id) {
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectById(tenantInfo.getTenantId(),id);
TtCouponChannelPoi ttCouponChannelPoi = ttCouponChannelPoiMapper.selectByChannelId(tenantInfo.getTenantId(),id);
if(ttCouponChannelPoi != null && ttCouponChannelPoi.getStatus() != null && ttCouponChannelPoi.getStatus().intValue() > 0){
return new ResultData(ttCouponChannelPoi);
}
@@ -811,9 +811,10 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
updChannel.setId(wxCouponChannel.getId());
updChannel.updateTenantInfo(wxCouponChannel);
updChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
wxCouponChannel.setShowBeginTime(date);
wxCouponChannel.setBeginTime(date);
wxCouponChannel.setUpdateDate(date);
updChannel.setTtSpuId(ttCouponChannelPoi.getSpuId());
updChannel.setShowBeginTime(date);
updChannel.setBeginTime(date);
updChannel.setUpdateDate(date);
wxCouponChannelMapper.updateById(updChannel);
return new ResultData();
}


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