|
@@ -4,9 +4,9 @@ package com.keao.edu.user.controller;
|
|
|
import com.keao.edu.common.controller.BaseController;
|
|
|
import com.keao.edu.common.entity.HttpResponseResult;
|
|
|
import com.keao.edu.common.page.PageInfo;
|
|
|
-import com.keao.edu.user.entity.Agency;
|
|
|
+import com.keao.edu.user.entity.Organization;
|
|
|
import com.keao.edu.user.page.AgencyQueryInfo;
|
|
|
-import com.keao.edu.user.service.AgencyService;
|
|
|
+import com.keao.edu.user.service.OrganizationService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -14,51 +14,51 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
- * 代理商服务
|
|
|
+ * 合作单位服务
|
|
|
*/
|
|
|
@RestController
|
|
|
-@Api(tags = "代理商服务")
|
|
|
+@Api(tags = "合作单位服务")
|
|
|
@RequestMapping(value = "agency")
|
|
|
public class AgencyController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
- private AgencyService agencyService;
|
|
|
+ private OrganizationService organizationService;
|
|
|
|
|
|
- @ApiOperation(value = "代理商列表")
|
|
|
+ @ApiOperation(value = "合作单位列表")
|
|
|
@GetMapping(value = "list")
|
|
|
@PreAuthorize("@pcs.hasPermissions('agency/list')")
|
|
|
- public HttpResponseResult<PageInfo<Agency>> configList(AgencyQueryInfo queryInfo) {
|
|
|
- return succeed(agencyService.queryPage(queryInfo));
|
|
|
+ public HttpResponseResult<PageInfo<Organization>> configList(AgencyQueryInfo queryInfo) {
|
|
|
+ return succeed(organizationService.queryPage(queryInfo));
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "修改代理商")
|
|
|
+ @ApiOperation(value = "修改合作单位")
|
|
|
@PostMapping(value = "update")
|
|
|
@PreAuthorize("@pcs.hasPermissions('agency/update')")
|
|
|
- public HttpResponseResult updateAgency(@RequestBody Agency agency) {
|
|
|
- agencyService.updateAgency(agency);
|
|
|
+ public HttpResponseResult updateAgency(@RequestBody Organization organization) {
|
|
|
+ organizationService.updateOrganization(organization);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "新增代理商")
|
|
|
+ @ApiOperation(value = "新增合作单位")
|
|
|
@PostMapping(value = "add")
|
|
|
@PreAuthorize("@pcs.hasPermissions('agency/add')")
|
|
|
- public HttpResponseResult addConfig(@RequestBody Agency agency) {
|
|
|
- agencyService.add(agency);
|
|
|
+ public HttpResponseResult addConfig(@RequestBody Organization organization) {
|
|
|
+ organizationService.add(organization);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "查询代理商")
|
|
|
+ @ApiOperation(value = "查询合作单位")
|
|
|
@GetMapping(value = "get")
|
|
|
@PreAuthorize("@pcs.hasPermissions('agency/get')")
|
|
|
- public HttpResponseResult<Agency> getConfig(Integer id) {
|
|
|
- return succeed(agencyService.get(id));
|
|
|
+ public HttpResponseResult<Organization> getConfig(Integer id) {
|
|
|
+ return succeed(organizationService.get(id));
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "删除代理商")
|
|
|
+ @ApiOperation(value = "删除合作单位")
|
|
|
@PostMapping(value = "del")
|
|
|
@PreAuthorize("@pcs.hasPermissions('agency/del')")
|
|
|
public HttpResponseResult del(Integer id) {
|
|
|
- agencyService.delete(id);
|
|
|
+ organizationService.delete(id);
|
|
|
return succeed();
|
|
|
}
|
|
|
}
|