Commit d6d9a20e by 杨林龙

修改ICE接口调用参数

1 parent 11b9345b
...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.security.NoSuchAlgorithmException;
import java.util.List; import java.util.List;
//@Api //@Api
...@@ -61,7 +62,7 @@ public class CustomerMgrController { ...@@ -61,7 +62,7 @@ public class CustomerMgrController {
@RequestMapping(value = "/register", method = RequestMethod.POST) @RequestMapping(value = "/register", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public R register(PlatformCustomer customer) { public R register(PlatformCustomer customer) throws NoSuchAlgorithmException {
int num = customerMgrService.register(customer); int num = customerMgrService.register(customer);
if (num == 0) { if (num == 0) {
return R.error("注册失败"); return R.error("注册失败");
......
...@@ -9,6 +9,8 @@ import org.slf4j.LoggerFactory; ...@@ -9,6 +9,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.bind.annotation.RestControllerAdvice;
import java.security.NoSuchAlgorithmException;
/** /**
* <p>Description: * <p>Description:
* <p>Project: open-platform-admin * <p>Project: open-platform-admin
...@@ -37,4 +39,10 @@ public class GlobalExceptionHandler { ...@@ -37,4 +39,10 @@ public class GlobalExceptionHandler {
this.logger.error("!!!! ERROR", e); this.logger.error("!!!! ERROR", e);
return R.error(ResultCodeEnum.SERVER_ERROR); return R.error(ResultCodeEnum.SERVER_ERROR);
} }
@ExceptionHandler({NoSuchAlgorithmException.class})
public R handlerOtherException(NoSuchAlgorithmException e) {
this.logger.error("!!!! ERROR", e);
return R.error(ResultCodeEnum.SERVER_ERROR);
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!