|
@@ -35,7 +35,7 @@ import java.util.List;
|
|
|
*/
|
|
*/
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/api")
|
|
@RequestMapping("/api")
|
|
|
-public class UserController extends BaseController {
|
|
|
|
|
|
|
+public class UserController extends BaseController{
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private PersonalAuthService personalAuthService;
|
|
private PersonalAuthService personalAuthService;
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -146,8 +146,8 @@ public class UserController extends BaseController {
|
|
|
public PersonalAuthVO applyPersonalAuthentication(@PathVariable("userId") Long userId,
|
|
public PersonalAuthVO applyPersonalAuthentication(@PathVariable("userId") Long userId,
|
|
|
@Validated @RequestBody ApplyPersonalAuthCommand command,
|
|
@Validated @RequestBody ApplyPersonalAuthCommand command,
|
|
|
BindingResult result, HttpSession session) {
|
|
BindingResult result, HttpSession session) {
|
|
|
-// if (!userId.equals(Long.parseLong((String) session.getAttribute("userId"))))
|
|
|
|
|
-// throw new UnauthorizedException("没有权限对他人账号进行操作!");
|
|
|
|
|
|
|
+ if (!userId.equals(Long.parseLong((String) session.getAttribute("userId"))))
|
|
|
|
|
+ throw new UnauthorizedException("没有权限对他人账号进行操作!");
|
|
|
LOG.info("当前用户申请的认证信息为" + command);
|
|
LOG.info("当前用户申请的认证信息为" + command);
|
|
|
if (result.hasErrors())
|
|
if (result.hasErrors())
|
|
|
throw new BaseException(result.getFieldError().getDefaultMessage());
|
|
throw new BaseException(result.getFieldError().getDefaultMessage());
|
|
@@ -313,7 +313,7 @@ public class UserController extends BaseController {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "index/address", method = RequestMethod.GET)
|
|
@RequestMapping(value = "index/address", method = RequestMethod.GET)
|
|
|
- public Area getAddressByIp(HttpServletRequest request) throws UnsupportedEncodingException {
|
|
|
|
|
|
|
+ public Area getAddressByIp(HttpServletRequest request) throws UnsupportedEncodingException{
|
|
|
String ip = DataUtils.getClientIp(request);
|
|
String ip = DataUtils.getClientIp(request);
|
|
|
LOG.info("ip地址是========" + ip);
|
|
LOG.info("ip地址是========" + ip);
|
|
|
Area area = AddressUtils.getProvinceName(ip);
|
|
Area area = AddressUtils.getProvinceName(ip);
|