| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.AreasMapper; |
| | | import com.doumee.dao.business.GoodsMapper; |
| | | import com.doumee.dao.business.GoodsorderMapper; |
| | | import com.doumee.dao.business.LabelsMapper; |
| | | import com.doumee.dao.business.join.GoodsAdminJoinMapper; |
| | | import com.doumee.dao.business.join.LabelsJoinMapper; |
| | |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private GoodsAdminJoinMapper goodsAdminJoinMapper; |
| | | private GoodsMapper goodsMapper; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | .in(Constants.equalsInteger(labels.getType(),Constants.LabelsType.YUN_FEE.getKey()),Areas::getId,labels.getAreaIdList()) |
| | | .in(Constants.equalsInteger(labels.getType(),Constants.LabelsType.BIG_AREA.getKey()),Areas::getId,labels.getAreaIdList())); |
| | | areasService.cacheData(); |
| | | } |
| | | if(Constants.equalsInteger(labels.getType(),Constants.LabelsType.HOMEZHUANQU.getKey())){ |
| | | String ids = "["+labels.getId()+"],"; |
| | | // goodsMapper.update(null,new UpdateWrapper<Goods>().lambda() |
| | | // .setSql("zhuanqu_Ids =REPLACE(zhuanqu_Ids, '"+ids+"', '')")); |
| | | if( labels.getApplyIdList()!=null){ |
| | | labels.getApplyIdList().stream().map(String::valueOf).collect(Collectors.joining(",")); |
| | | // List<Goods> goods = goodsMapper.selectList(new QueryWrapper<Goods>().lambda().in(Goods::getId,labels.getApplyIdList() )); |
| | | goodsMapper.update(null,new UpdateWrapper<Goods>().lambda() |
| | | .setSql("zhuanqu_Ids =concat(ifnull(zhuanqu_Ids,''), '"+ids+"' )") |
| | | .in(Goods::getId,labels.getApplyIdList() )); |
| | | } |
| | | } |
| | | return labels.getId(); |
| | | } |
| | |
| | | areasService.cacheData(); |
| | | } |
| | | } |
| | | if(Constants.equalsInteger(labels.getType(),Constants.LabelsType.HOMEZHUANQU.getKey())){ |
| | | String ids = "["+labels.getId()+"],"; |
| | | goodsMapper.update(null,new UpdateWrapper<Goods>().lambda() |
| | | .setSql("zhuanqu_Ids =REPLACE(zhuanqu_Ids, '"+ids+"', '')")); |
| | | if( labels.getApplyIdList()!=null){ |
| | | labels.getApplyIdList().stream().map(String::valueOf).collect(Collectors.joining(",")); |
| | | goodsMapper.update(null,new UpdateWrapper<Goods>().lambda() |
| | | .setSql("zhuanqu_Ids =concat(ifnull(zhuanqu_Ids,''), '"+ids+"' )") |
| | | .in(Goods::getId,labels.getApplyIdList() )); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |