Commit b03e0837 authored by 技术部-任文超's avatar 技术部-任文超

输出4个新接口的Swagger文档

parent d3c4e1e9
...@@ -28,6 +28,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; ...@@ -28,6 +28,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
import com.google.common.base.MoreObjects; import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -36,10 +37,7 @@ import org.apache.http.HttpStatus; ...@@ -36,10 +37,7 @@ import org.apache.http.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
...@@ -1236,7 +1234,8 @@ public class InnerController implements IBaseController { ...@@ -1236,7 +1234,8 @@ public class InnerController implements IBaseController {
* @return * @return
*/ */
@LogHttpCaller @LogHttpCaller
@RequestMapping("/user/active") @ApiOperation(notes = "激活/启用 用户 - 供内部系统免密调用", value = "激活/启用 用户", nickname = "activeUser")
@RequestMapping(path = "/user/active", method = RequestMethod.POST)
public JsonResult activeUser(Long userId) { public JsonResult activeUser(Long userId) {
boolean flushed = flushUserStatus(userId, true); boolean flushed = flushUserStatus(userId, true);
return JsonResult.buildSuccessResult("用户已激活.", flushed); return JsonResult.buildSuccessResult("用户已激活.", flushed);
...@@ -1249,7 +1248,8 @@ public class InnerController implements IBaseController { ...@@ -1249,7 +1248,8 @@ public class InnerController implements IBaseController {
* @return * @return
*/ */
@LogHttpCaller @LogHttpCaller
@RequestMapping("/user/disable") @ApiOperation(notes = "注销/禁用 用户 - 供内部系统免密调用", value = "注销/禁用 用户", nickname = "forbiddenUser")
@RequestMapping(path = "/user/disable", method = RequestMethod.POST)
public JsonResult forbiddenUser(Long userId) { public JsonResult forbiddenUser(Long userId) {
boolean flushed = flushUserStatus(userId, false); boolean flushed = flushUserStatus(userId, false);
return JsonResult.buildSuccessResult("用户已禁用.", flushed); return JsonResult.buildSuccessResult("用户已禁用.", flushed);
...@@ -1263,7 +1263,8 @@ public class InnerController implements IBaseController { ...@@ -1263,7 +1263,8 @@ public class InnerController implements IBaseController {
* @param name - 姓名 * @param name - 姓名
*/ */
@LogHttpCaller @LogHttpCaller
@RequestMapping("/userDetail/reset/{userId}") @ApiOperation(notes = "重置用户实名信息接口 - 供内部系统免密调用", value = "重置用户实名信息", nickname = "resetName")
@RequestMapping(path = "/userDetail/reset/{userId}", method = RequestMethod.POST)
public JsonResult resetName(@PathVariable("userId") Long userId, @RequestParam("name") String name, @RequestParam("idNo") String idNo) { public JsonResult resetName(@PathVariable("userId") Long userId, @RequestParam("name") String name, @RequestParam("idNo") String idNo) {
log.info("重置用户实名信息 userId:{},name:{},idNo:{}", userId, name, idNo); log.info("重置用户实名信息 userId:{},name:{},idNo:{}", userId, name, idNo);
if(Objects.nonNull(userId) && ValidationUtil.validateChinese(name)){ if(Objects.nonNull(userId) && ValidationUtil.validateChinese(name)){
...@@ -1286,7 +1287,8 @@ public class InnerController implements IBaseController { ...@@ -1286,7 +1287,8 @@ public class InnerController implements IBaseController {
* -- 供内部系统免密调用 * -- 供内部系统免密调用
*/ */
@LogHttpCaller @LogHttpCaller
@RequestMapping("/user/password/reset") @ApiOperation(notes = "重置密码接口 - 供内部系统免密调用", value = "重置密码", nickname = "resetPassword")
@RequestMapping(path = "/user/password/reset", method = RequestMethod.POST)
public JsonResult resetPassword(@RequestParam("phone") String phone) { public JsonResult resetPassword(@RequestParam("phone") String phone) {
if(ValidationUtil.validatePhoneNo(phone)){ if(ValidationUtil.validatePhoneNo(phone)){
try { try {
......
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