|
|
|
@@ -667,7 +667,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
List<String> addDouyinIdList = new ArrayList<>(); |
|
|
|
addDouyinIdList.addAll(record.getDouyinIdList()); |
|
|
|
List<String> oldDouyinIdList = JSONObject.parseArray(oldTakeRate.getDouyinId(), String.class); |
|
|
|
addDouyinIdList.remove(oldDouyinIdList); |
|
|
|
addDouyinIdList.removeAll(oldDouyinIdList); |
|
|
|
if(!addDouyinIdList.isEmpty()){//有新增的达人 |
|
|
|
poiPlan.setDouyinIdList(addDouyinIdList); |
|
|
|
Map<String, Integer> douyinMap = JSONObject.parseObject(oldTakeRate.getDouyinIdStatus(), Map.class); |
|
|
|
@@ -804,10 +804,17 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
TtWebService ttWebService = ttMerchantPoiService.getTtWebService(record); |
|
|
|
boolean b = ttWebService.getPoiPlanService().poiOrientedPlanDeleteTalent(record.getId(), record.getDouyinId()); |
|
|
|
|
|
|
|
|
|
|
|
TtPoiTakeRate updTakeRate = new TtPoiTakeRate(); |
|
|
|
updTakeRate.setId(record.getId()); |
|
|
|
updTakeRate.updateTenantInfo(record); |
|
|
|
updTakeRate.setDouyinIdStatus(JSON.toJSONString(douyinMap)); |
|
|
|
|
|
|
|
Collection<Integer> values = douyinMap.values(); |
|
|
|
values.removeIf(e -> e.equals(EnumCpsPlanStatus.OFF.getCode())); |
|
|
|
if(values.isEmpty()){ |
|
|
|
updTakeRate.setStatus(EnumCpsPlanStatus.OFF.getCode()); |
|
|
|
} |
|
|
|
updTakeRate.setUpdateDate(new Date()); |
|
|
|
ttPoiTakeRateMapper.updateById(updTakeRate); |
|
|
|
return new ResultData(); |
|
|
|
|