| | |
| | | |
| | | if (ids != null && ids.size() > 0) { |
| | | for (String gid: ids) { |
| | | Long goodsId = Long.parseLong(gid); |
| | | labelGoodsMapper.deleteByGoodsId(goodsId); |
| | | labelGoodsMapper.deleteByGoodsId(gid); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int deleteByGoodsIdAndLabId(Long goodsId, Long labId){ |
| | | public int deleteByGoodsIdAndLabId(String goodsId, Long labId){ |
| | | return labelGoodsMapper.deleteByGoodsIdAndLabId(goodsId, labId); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | public List<LabelGoods> queryByGoodsId(int start, int count, Long goodsId) throws LabelClassException { |
| | | public List<LabelGoods> queryByGoodsId(int start, int count, String goodsId) throws LabelClassException { |
| | | return labelGoodsMapper.queryByGoodsId(start, count, goodsId); |
| | | } |
| | | |
| | | @Override |
| | | public int getCountQueryByGoodsId(Long goodsId){ |
| | | public int getCountQueryByGoodsId(String goodsId){ |
| | | return labelGoodsMapper.getCountQueryByGoodsId(goodsId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getCountByGoodsId(Long goodsId){ |
| | | public int getCountByGoodsId(String goodsId){ |
| | | return labelGoodsMapper.getCountByGoodsId(goodsId); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Long isExistence(Long goodsId, Long labId){ |
| | | public Long isExistence(String goodsId, Long labId){ |
| | | return labelGoodsMapper.isExistence(goodsId, labId); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor=Exception.class) |
| | | public void batchGoodsAddLables(List<Long> goodsIdList, List<Long> labIdList, AdminUser admin) throws Exception { |
| | | public void batchGoodsAddLables(List<String> goodsIdList, List<Long> labIdList, AdminUser admin) throws Exception { |
| | | |
| | | /* 商品id 为空 不处理 */ |
| | | if (goodsIdList == null || goodsIdList.size() == 0) { |
| | |
| | | } |
| | | |
| | | |
| | | for (Long goodsId: goodsIdList) { |
| | | for (String goodsId: goodsIdList) { |
| | | |
| | | TaoBaoGoodsBrief goodsBrief = taoBaoGoodsBriefService.selectByPrimaryKey(goodsId); |
| | | TaoBaoGoodsBrief goodsBrief = taoBaoGoodsBriefService.selectByGoodsId(goodsId); |
| | | |
| | | if (goodsBrief != null) { |
| | | /* 贴上标签 : 已贴不处理则 */ |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor=Exception.class) |
| | | public void singleGoodsAddLables(Long goodsId, List<Long> labIdList, AdminUser admin) throws Exception { |
| | | public void singleGoodsAddLables(String goodsId, List<Long> labIdList, AdminUser admin) throws Exception { |
| | | |
| | | /* 商品id 为空 不处理 */ |
| | | if (goodsId == null) { |
| | |
| | | return; |
| | | } |
| | | |
| | | TaoBaoGoodsBrief goodsBrief = taoBaoGoodsBriefService.selectByPrimaryKey(goodsId); |
| | | TaoBaoGoodsBrief goodsBrief = taoBaoGoodsBriefService.selectByGoodsId(goodsId); |
| | | if (goodsBrief == null) { |
| | | return; |
| | | } |