| | |
| | | import com.yeshi.fanli.service.inter.goods.GoodsSubClassService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoClassService;
|
| | | import com.yeshi.fanli.service.inter.lable.LabelClassService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | |
| | |
|
| | | if (picture != null && picture.trim().length() > 0) {
|
| | | // 删除老图
|
| | | removePicture(resultObj.getPicture());
|
| | | if (!Constant.IS_TEST)
|
| | | removePicture(resultObj.getPicture());
|
| | | // 存储新图
|
| | | record.setPicture(picture);
|
| | | } else {
|
| | |
| | |
|
| | | if (pictureSecond != null && pictureSecond.trim().length() > 0) {
|
| | | // 删除老图
|
| | | removePicture(resultObj.getPictureSecond());
|
| | | if (!Constant.IS_TEST)
|
| | | removePicture(resultObj.getPictureSecond());
|
| | | // 存储新图
|
| | | record.setPictureSecond(pictureSecond);
|
| | | } else {
|
| | |
| | |
|
| | | // 保存淘宝商品分类id
|
| | | String taobaoCids = record.getTaobaoCids();
|
| | | List<Long> tbCidList = new ArrayList<>();
|
| | | if (!StringUtil.isNullOrEmpty(taobaoCids) && !"null".equalsIgnoreCase(taobaoCids)) {
|
| | | List<Long> tbCidList = new ArrayList<>();
|
| | |
|
| | | String[] sts = taobaoCids.split(",");
|
| | | for (String st : sts) {
|
| | | String cid = st.split("-")[st.split("-").length - 1];
|
| | | tbCidList.add(Long.parseLong(cid));
|
| | | }
|
| | | taoBaoClassService.saveSub(record.getId(), tbCidList);
|
| | | }
|
| | | taoBaoClassService.saveSub(record.getId(), tbCidList);
|
| | | }
|
| | |
|
| | | /**
|