| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
|
| | | import com.yeshi.fanli.exception.GoodsSubClassException;
|
| | | import com.yeshi.fanli.service.inter.clazz.GoodsSubClassLabelService;
|
| | | import com.yeshi.fanli.service.inter.goods.GoodsSubClassService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoClassService;
|
| | | import com.yeshi.fanli.service.inter.lable.LabelClassService;
|
| | |
| | |
|
| | | @Resource
|
| | | private TaoBaoClassService taoBaoClassService;
|
| | |
|
| | | @Resource
|
| | | private GoodsSubClassLabelService goodsSubClassLabelService;
|
| | |
|
| | | @Override
|
| | | public int deleteByPrimaryKey(Long id) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void saveObject(MultipartFile file, MultipartFile file2, GoodsSubClass record, Integer type, Long pid)
|
| | | throws GoodsSubClassException, Exception {
|
| | | public void saveObject(MultipartFile file, MultipartFile file2, GoodsSubClass record, Integer type, Long pid,
|
| | | GoodsSubClassLabelMap labelMap) throws GoodsSubClassException, Exception {
|
| | |
|
| | | String name = record.getName();
|
| | | if (name == null || name.trim().length() == 0) {
|
| | |
| | | }
|
| | |
|
| | | goodsSubClassMapper.insert(record);
|
| | | if (labelMap != null) {
|
| | | labelMap.setCreateTime(new Date());
|
| | | labelMap.setGoodsSubClass(record);
|
| | | goodsSubClassLabelService.addSubClassLabelMap(labelMap);
|
| | | }
|
| | |
|
| | | } else {
|
| | | // 修改
|
| | |
| | | record.setCreatetime(resultObj.getCreatetime());
|
| | | record.setUpdatetime(new Date());
|
| | | goodsSubClassMapper.updateByPrimaryKey(record);
|
| | |
|
| | | if (labelMap != null) {
|
| | | labelMap.setCreateTime(new Date());
|
| | | labelMap.setGoodsSubClass(record);
|
| | | goodsSubClassLabelService.addSubClassLabelMap(labelMap);
|
| | | }
|
| | | }
|
| | |
|
| | | // 保存淘宝商品分类id
|