|
@@ -147,7 +147,7 @@ public class TBCrmDetailController {
|
|
boolean lock = memoryLock.lock(SystemConstant.LOCK_CRM_DETAIL_SOP_PUBLISH_PREFIX + id, id,
|
|
boolean lock = memoryLock.lock(SystemConstant.LOCK_CRM_DETAIL_SOP_PUBLISH_PREFIX + id, id,
|
|
SystemConstant.LOCK_CRM_DETAIL_SOP_TIME_OUT);
|
|
SystemConstant.LOCK_CRM_DETAIL_SOP_TIME_OUT);
|
|
if (!lock) {
|
|
if (!lock) {
|
|
- throw ExceptionResultEnum.ERROR.exception("正在保存数据,请稍候再试!");
|
|
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("正在发布数据,请稍候再试!");
|
|
}
|
|
}
|
|
boolean result = false;
|
|
boolean result = false;
|
|
try {
|
|
try {
|
|
@@ -170,7 +170,25 @@ public class TBCrmDetailController {
|
|
@OperationLog(logType = LogTypeEnum.DELETE)
|
|
@OperationLog(logType = LogTypeEnum.DELETE)
|
|
@ApiResponses({ @ApiResponse(code = 200, message = "派单明细sop删除", response = EditResult.class) })
|
|
@ApiResponses({ @ApiResponse(code = 200, message = "派单明细sop删除", response = EditResult.class) })
|
|
public Result sopDelete(@ApiParam(value = "派单明细sopId", required = true) @RequestParam Long id) {
|
|
public Result sopDelete(@ApiParam(value = "派单明细sopId", required = true) @RequestParam Long id) {
|
|
- return ResultUtil.ok(tbCrmDetailService.sopDelete(id));
|
|
|
|
|
|
+ boolean lock = memoryLock.lock(SystemConstant.LOCK_CRM_DETAIL_SOP_DELETE_PREFIX + id, id,
|
|
|
|
+ SystemConstant.LOCK_CRM_DETAIL_SOP_TIME_OUT);
|
|
|
|
+ if (!lock) {
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("正在删除数据,请稍候再试!");
|
|
|
|
+ }
|
|
|
|
+ boolean result = false;
|
|
|
|
+ try {
|
|
|
|
+ result = tbCrmDetailService.sopDelete(id);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error(SystemConstant.LOG_ERROR, e);
|
|
|
|
+ if (e instanceof ApiException) {
|
|
|
|
+ ResultUtil.error((ApiException) e, ((ApiException) e).getCode(), e.getMessage());
|
|
|
|
+ } else {
|
|
|
|
+ ResultUtil.error(e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ } finally {
|
|
|
|
+ memoryLock.unlock(SystemConstant.LOCK_CRM_DETAIL_SOP_DELETE_PREFIX + id);
|
|
|
|
+ }
|
|
|
|
+ return ResultUtil.ok(result);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "导入派单明细")
|
|
@ApiOperation(value = "导入派单明细")
|