|
|
@@ -336,16 +336,13 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
if (!Status.ENABLE.getDisplay().equals(product.getPr_status())){
|
|
|
throw new BizException(BizExceptionCode.BIZ_BANNED);
|
|
|
}
|
|
|
- String code = getMapper().getCodeById(id);
|
|
|
- product = new Product();
|
|
|
- product.setId(id);
|
|
|
product.setPr_status(Status.BANNED.getDisplay());
|
|
|
product.setPr_statuscode(Status.BANNED.name());
|
|
|
product.setUpdaterId(BaseContextHolder.getUserId());
|
|
|
product.setUpdateTime(new Date());
|
|
|
getMapper().updateByPrimaryKeySelective(product);
|
|
|
//记录LOG
|
|
|
- docBaseDTO = generateMsgObj(id, code);
|
|
|
+ docBaseDTO = generateMsgObj(id, product.getPr_code());
|
|
|
messageLogService.customizeLog(docBaseDTO, Operation.BANNED);
|
|
|
return docBaseDTO;
|
|
|
}else{
|
|
|
@@ -365,7 +362,6 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
if (!Status.BANNED.getDisplay().equals(product.getPr_status())){
|
|
|
throw new BizException(BizExceptionCode.BIZ_ENABLE);
|
|
|
}else{
|
|
|
- product.setId(id);
|
|
|
product.setPr_statuscode(Status.ENABLE.name());
|
|
|
product.setPr_status(Status.ENABLE.getDisplay());
|
|
|
product.setUpdaterId(BaseContextHolder.getUserId());
|