|
@@ -23,6 +23,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.integration.redis.util.RedisLockRegistry;
|
|
@@ -235,13 +236,15 @@ public class CustomerController {
|
|
|
@PostMapping("/updateSystem")
|
|
|
@ApiOperation("经销商绑定售后系统")
|
|
|
public ResponseHelper updateSystem(@ApiParam(required = true, value = "经销商id") @RequestParam(required = true) String id,
|
|
|
- @ApiParam(required = true, value = "销售编号") @RequestParam(required = true) String afterNumber
|
|
|
+ @ApiParam(required = false, value = "销售编号") @RequestParam(required = false) String afterNumber
|
|
|
) throws Exception {
|
|
|
Lock obtain = redisLockRegistry.obtain(Constant.RedisPrefix.LOCK_CUSTOMER + id);
|
|
|
try {
|
|
|
if (!obtain.tryLock(5, TimeUnit.SECONDS)) {
|
|
|
throw new RemoteServiceException("系统繁忙,请稍后再试");
|
|
|
}
|
|
|
+ if (StringUtils.isEmpty(afterNumber))
|
|
|
+ throw new RemoteServiceException("值没填");
|
|
|
k3CustomerLogic.updateSystem(id,afterNumber);
|
|
|
} finally {
|
|
|
obtain.unlock();
|