liupeng 4 jaren geleden
bovenliggende
commit
9a110e143c

+ 6 - 14
code/sapparent/sapcms/src/main/java/org/fouram/controller/ApiController.java

@@ -14,14 +14,14 @@ import org.fouram.core.base.controller.BaseController;
 import org.fouram.core.plugin.weixin.cp.core.WXCpMailList;
 import org.fouram.core.plugin.weixin.cp.core.WXCpMailList;
 import org.fouram.core.util.AppUtil;
 import org.fouram.core.util.AppUtil;
 import org.fouram.core.util.AppUtil.ResultConstant;
 import org.fouram.core.util.AppUtil.ResultConstant;
-import org.fouram.dto.input.GetToBeConfirmedListDTO;
-import org.fouram.dto.input.UpdateResultDTO;
-import org.fouram.dto.output.GetToBeConfirmedListOutput;
 import org.fouram.core.util.ConfConfig;
 import org.fouram.core.util.ConfConfig;
 import org.fouram.core.util.DateUtil;
 import org.fouram.core.util.DateUtil;
 import org.fouram.core.util.ExcelExportUtil;
 import org.fouram.core.util.ExcelExportUtil;
 import org.fouram.core.util.LoggerUtil;
 import org.fouram.core.util.LoggerUtil;
 import org.fouram.core.util.ResultUtil;
 import org.fouram.core.util.ResultUtil;
+import org.fouram.dto.input.GetToBeConfirmedListDTO;
+import org.fouram.dto.input.UpdateResultDTO;
+import org.fouram.dto.output.GetToBeConfirmedListOutput;
 import org.fouram.entity.SapOrg;
 import org.fouram.entity.SapOrg;
 import org.fouram.entity.SapUser;
 import org.fouram.entity.SapUser;
 import org.fouram.enums.DelFlagEnum;
 import org.fouram.enums.DelFlagEnum;
@@ -41,8 +41,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
 import io.swagger.annotations.ApiResponses;
@@ -196,15 +194,11 @@ public class ApiController extends BaseController {
 		}
 		}
 	}
 	}
 
 
-	@ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "用户姓名", dataType = "String", paramType = "query"),
-			@ApiImplicitParam(name = "type", value = "同步类型", dataType = "String", paramType = "query"),
-			@ApiImplicitParam(name = "pageNumber", value = "第几页", dataType = "Integer", paramType = "query"),
-			@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query")})
 	@ApiResponses(@ApiResponse(response = GetToBeConfirmedListOutput.class, code = 200, message = "success"))
 	@ApiResponses(@ApiResponse(response = GetToBeConfirmedListOutput.class, code = 200, message = "success"))
 	@ApiOperation(value = "查询待确认员工列表")
 	@ApiOperation(value = "查询待确认员工列表")
 	@PostMapping(value = "/getToBeConfirmedList", produces = "application/json;charset=utf-8")
 	@PostMapping(value = "/getToBeConfirmedList", produces = "application/json;charset=utf-8")
 	@ResponseBody
 	@ResponseBody
-	public Object getToBeConfirmedList(HttpServletRequest request, GetToBeConfirmedListDTO dto) {
+	public Object getToBeConfirmedList(HttpServletRequest request, @RequestBody GetToBeConfirmedListDTO dto) {
 		if (!isLogin(request)) {
 		if (!isLogin(request)) {
 			return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
 			return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
 		}
 		}
@@ -216,11 +210,10 @@ public class ApiController extends BaseController {
 		}
 		}
 	}
 	}
 
 
-	@ApiImplicitParams({ @ApiImplicitParam(name = "userId", value = "用户id", dataType = "String", paramType = "query")})
 	@ApiOperation(value = "更新忽略")
 	@ApiOperation(value = "更新忽略")
 	@PostMapping(value = "/updateIngore", produces = "application/json;charset=utf-8")
 	@PostMapping(value = "/updateIngore", produces = "application/json;charset=utf-8")
 	@ResponseBody
 	@ResponseBody
-	public Object updateIngore(HttpServletRequest request, UpdateResultDTO dto) {
+	public Object updateIngore(HttpServletRequest request, @RequestBody UpdateResultDTO dto) {
 		if (!isLogin(request)) {
 		if (!isLogin(request)) {
 			return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
 			return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
 		}
 		}
@@ -233,11 +226,10 @@ public class ApiController extends BaseController {
 		}
 		}
 	}
 	}
 	
 	
-	@ApiImplicitParams({ @ApiImplicitParam(name = "userId", value = "用户id", dataType = "String", paramType = "query")})
 	@ApiOperation(value = "更新同步")
 	@ApiOperation(value = "更新同步")
 	@PostMapping(value = "/updateSync", produces = "application/json;charset=utf-8")
 	@PostMapping(value = "/updateSync", produces = "application/json;charset=utf-8")
 	@ResponseBody
 	@ResponseBody
-	public Object updateSync(HttpServletRequest request, UpdateResultDTO dto) {
+	public Object updateSync(HttpServletRequest request, @RequestBody UpdateResultDTO dto) {
 		if (!isLogin(request)) {
 		if (!isLogin(request)) {
 			return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
 			return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
 		}
 		}

+ 8 - 0
code/sapparent/sapservice/src/main/java/org/fouram/dto/input/GetToBeConfirmedListDTO.java

@@ -2,6 +2,7 @@ package org.fouram.dto.input;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Builder;
 import lombok.Data;
 import lombok.Data;
@@ -16,8 +17,15 @@ public class GetToBeConfirmedListDTO implements Serializable {
 
 
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 	
 	
+	@ApiModelProperty(value = "用户姓名")
 	private String name;
 	private String name;
+	
+	@ApiModelProperty(value = "同步类型")
 	private String type;
 	private String type;
+	
+	@ApiModelProperty(value = "第几页")
 	private Integer pageNumber;
 	private Integer pageNumber;
+	
+	@ApiModelProperty(value = "每页条数")
 	private Integer pageSize;
 	private Integer pageSize;
 }
 }

+ 2 - 0
code/sapparent/sapservice/src/main/java/org/fouram/dto/input/UpdateResultDTO.java

@@ -2,6 +2,7 @@ package org.fouram.dto.input;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Builder;
 import lombok.Data;
 import lombok.Data;
@@ -16,5 +17,6 @@ public class UpdateResultDTO implements Serializable {
 
 
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 	
 	
+	@ApiModelProperty(value = "用户id")
 	private String userId;
 	private String userId;
 }
 }