|
|
@ -48,7 +48,7 @@ public class ItembasicServiceImpl implements ItembasicService { |
|
|
|
// 插入
|
|
|
|
ItembasicDO itembasic = ItembasicConvert.INSTANCE.convert(createReqVO); |
|
|
|
itembasicMapper.insert(itembasic); |
|
|
|
trendsApi.createTrends(this.newTrendsCreateReqDTO(itembasic.getId(), null, TrendsTypeEnum.CREATE)); |
|
|
|
trendsApi.createTrends(this.newTrendsCreateReqDTO(itembasic.getId(), "增加了物品基本信息", TrendsTypeEnum.CREATE)); |
|
|
|
// 返回
|
|
|
|
return itembasic.getId(); |
|
|
|
} |
|
|
@ -86,15 +86,6 @@ public class ItembasicServiceImpl implements ItembasicService { |
|
|
|
trendsApi.createTrends(this.newTrendsCreateReqDTO(id, itembasic.toString(), TrendsTypeEnum.DELETE)); |
|
|
|
} |
|
|
|
|
|
|
|
private TrendsCreateReqDTO newTrendsCreateReqDTO(Long id, String content, TrendsTypeEnum trendsTypeEnum) { |
|
|
|
TrendsCreateReqDTO trendsCreateReqDTO = new TrendsCreateReqDTO(); |
|
|
|
trendsCreateReqDTO.setTableName("basicItembasic"); |
|
|
|
trendsCreateReqDTO.setTableId(id); |
|
|
|
trendsCreateReqDTO.setType(trendsTypeEnum.getType()); |
|
|
|
trendsCreateReqDTO.setContent(content); |
|
|
|
return trendsCreateReqDTO; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ItembasicDO getItembasic(Long id) { |
|
|
|
return itembasicMapper.selectById(id); |
|
|
@ -296,4 +287,21 @@ public class ItembasicServiceImpl implements ItembasicService { |
|
|
|
throw exception(ITEMBASIC_CODE_NOT_EXISTS); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 构建操作流水对象 |
|
|
|
* @param id |
|
|
|
* @param content |
|
|
|
* @param trendsTypeEnum |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private TrendsCreateReqDTO newTrendsCreateReqDTO(Long id, String content, TrendsTypeEnum trendsTypeEnum) { |
|
|
|
TrendsCreateReqDTO trendsCreateReqDTO = new TrendsCreateReqDTO(); |
|
|
|
trendsCreateReqDTO.setTableName("basicItembasic"); |
|
|
|
trendsCreateReqDTO.setTableId(id); |
|
|
|
trendsCreateReqDTO.setType(trendsTypeEnum.getType()); |
|
|
|
trendsCreateReqDTO.setContent(content); |
|
|
|
return trendsCreateReqDTO; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|