|
@@ -6,15 +6,17 @@ import com.ytpm.general.ResultTable;
|
|
|
import com.ytpm.middle.param.AgentBaseInfoParam;
|
|
import com.ytpm.middle.param.AgentBaseInfoParam;
|
|
|
import com.ytpm.middle.param.AgentForm;
|
|
import com.ytpm.middle.param.AgentForm;
|
|
|
import com.ytpm.middle.service.AgentService;
|
|
import com.ytpm.middle.service.AgentService;
|
|
|
-import com.ytpm.middle.view.AgentBaseInfoListVo;
|
|
|
|
|
|
|
+import com.ytpm.middle.view.AgentBaseInfoListVO;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
@@ -31,7 +33,7 @@ public class AgentController {
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation("代理商基本信息列表")
|
|
@ApiOperation("代理商基本信息列表")
|
|
|
@PostMapping("/baseInfoList")
|
|
@PostMapping("/baseInfoList")
|
|
|
- public ResultTable<AgentBaseInfoListVo> getBaseInfoList(@RequestBody AgentBaseInfoParam param){
|
|
|
|
|
|
|
+ public ResultTable<AgentBaseInfoListVO> getBaseInfoList(@RequestBody AgentBaseInfoParam param){
|
|
|
return agentService.getBaseInfoList(param);
|
|
return agentService.getBaseInfoList(param);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -40,7 +42,7 @@ public class AgentController {
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation("新增代理商")
|
|
@ApiOperation("新增代理商")
|
|
|
@PostMapping("/addOne")
|
|
@PostMapping("/addOne")
|
|
|
- public Result<String> addOne(@RequestBody AgentForm form, @AuthenticationPrincipal AgentUserInfo userInfo){
|
|
|
|
|
|
|
+ public Result<String> addOne(@RequestBody AgentForm form, @ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo){
|
|
|
form.setCreateUserId(userInfo.getUserId());
|
|
form.setCreateUserId(userInfo.getUserId());
|
|
|
return agentService.addOne(form);
|
|
return agentService.addOne(form);
|
|
|
}
|
|
}
|
|
@@ -50,7 +52,7 @@ public class AgentController {
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation("新增代理商")
|
|
@ApiOperation("新增代理商")
|
|
|
@PostMapping("/updateOne")
|
|
@PostMapping("/updateOne")
|
|
|
- public Result<String> updateOne(@RequestBody AgentForm form, @AuthenticationPrincipal AgentUserInfo userInfo){
|
|
|
|
|
|
|
+ public Result<String> updateOne(@RequestBody AgentForm form, @ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo){
|
|
|
form.setUpdateParam(userInfo.getUserId());
|
|
form.setUpdateParam(userInfo.getUserId());
|
|
|
return agentService.updateOne(form);
|
|
return agentService.updateOne(form);
|
|
|
}
|
|
}
|
|
@@ -59,8 +61,8 @@ public class AgentController {
|
|
|
* 启用或禁用
|
|
* 启用或禁用
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation("启用或禁用")
|
|
@ApiOperation("启用或禁用")
|
|
|
- @PostMapping("/changeEnabled")
|
|
|
|
|
- public Result<String> enabled(@RequestParam(name = "creditCode")String creditCode, @AuthenticationPrincipal AgentUserInfo userInfo){
|
|
|
|
|
|
|
+ @GetMapping("/changeEnabled")
|
|
|
|
|
+ public Result<String> enabled(@RequestParam(name = "creditCode")String creditCode, @ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo){
|
|
|
return agentService.enabled(creditCode,userInfo.getUserId());
|
|
return agentService.enabled(creditCode,userInfo.getUserId());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|