Commit 202114c6 authored by xiaozhe.chen's avatar xiaozhe.chen

客服系统对接中台接口,用户修改、修改密码、修改账户状态

parent 1077d294
...@@ -15,11 +15,9 @@ import cn.quantgroup.customer.service.IUserService; ...@@ -15,11 +15,9 @@ import cn.quantgroup.customer.service.IUserService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
...@@ -150,10 +148,7 @@ public class UserRest { ...@@ -150,10 +148,7 @@ public class UserRest {
* @return * @return
*/ */
@PostMapping(value = "/pwd/reset") @PostMapping(value = "/pwd/reset")
public JsonResult passwordReset(String phoneNo) { public JsonResult passwordReset(@RequestParam(required = true) String phoneNo) {
if (StringUtils.isEmpty(phoneNo)) {
return JsonResult.buildErrorStateResult(ErrorCodeEnum.PARAM_ERROR.getMessage(), ErrorCodeEnum.PARAM_ERROR.getCode());
}
String response = userService.passwordRest(phoneNo); String response = userService.passwordRest(phoneNo);
return GSON.fromJson(response, JsonResult.class); return GSON.fromJson(response, JsonResult.class);
} }
...@@ -163,9 +158,10 @@ public class UserRest { ...@@ -163,9 +158,10 @@ public class UserRest {
* *
* @return * @return
*/ */
@PostMapping(value = "/modify/account/status") @PostMapping(value = "/modify/account/status/disable")
public JsonResult modifyAccountStatus() { public JsonResult modifyAccountStatusDisable(@RequestParam(required = true) Long userId) {
return JsonResult.buildSuccessResult("success", null); String response = userService.modifyAccountStatusDisable(userId);
return GSON.fromJson(response, JsonResult.class);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment