|
@@ -1,12 +1,20 @@
|
|
|
package com.gree.mall.manager.controller.admin;
|
|
|
|
|
|
+import cn.hutool.core.lang.TypeReference;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.gree.mall.manager.annotation.ZfireList;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminDeptWebsitVO;
|
|
|
import com.gree.mall.manager.bean.admin.AdminWebsitTree;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminWebsitVO;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
import com.gree.mall.manager.logic.admin.AdminWebsitLogic;
|
|
|
import com.gree.mall.manager.plus.entity.AdminWebsit;
|
|
|
import com.gree.mall.manager.plus.entity.AdminZone;
|
|
|
import com.gree.mall.manager.plus.service.AdminWebsitService;
|
|
|
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
+import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -20,7 +28,7 @@ import java.util.List;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
|
-@Api(value = "企业微信部门管理API", tags ={"企业微信部门管理API"} )
|
|
|
+@Api(value = "商户管理", tags ={"商户管理"} )
|
|
|
@RequestMapping(value = "/admin/websit", produces = "application/json; charset=utf-8")
|
|
|
public class AdminWebsitController {
|
|
|
|
|
@@ -34,6 +42,17 @@ public class AdminWebsitController {
|
|
|
return ResponseHelper.success(tree);
|
|
|
}
|
|
|
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "商户管理")
|
|
|
+ public ResponseHelper<IPage<AdminWebsitVO>> list(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ IPage<AdminWebsitVO> adminDeptVOIPage = adminWebsitLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return ResponseHelper.success(adminDeptVOIPage, new TypeReference<AdminWebsitVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@GetMapping("/zone/list")
|
|
|
@ApiOperation("区域列表")
|
|
@@ -43,28 +62,28 @@ public class AdminWebsitController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/add")
|
|
|
- @ApiOperation("新增部门")
|
|
|
+ @ApiOperation("新增商户")
|
|
|
public ResponseHelper add(@RequestBody AdminWebsit adminWebsit, HttpServletRequest request) throws RemoteServiceException, WxErrorException {
|
|
|
adminWebsitLogic.add(adminWebsit,request);
|
|
|
return ResponseHelper.success();
|
|
|
}
|
|
|
|
|
|
@PostMapping("/update")
|
|
|
- @ApiOperation("修改部门")
|
|
|
+ @ApiOperation("修改商户")
|
|
|
public ResponseHelper update(@RequestBody AdminWebsit adminWebsit,HttpServletRequest request) throws RemoteServiceException, WxErrorException {
|
|
|
adminWebsitLogic.update(adminWebsit,request);
|
|
|
return ResponseHelper.success();
|
|
|
}
|
|
|
|
|
|
@PostMapping("/delete")
|
|
|
- @ApiOperation("删除部门")
|
|
|
+ @ApiOperation("删除商户")
|
|
|
public ResponseHelper delete(@RequestParam String id, HttpServletRequest request) throws WxErrorException {
|
|
|
adminWebsitLogic.delete(id,request);
|
|
|
return ResponseHelper.success();
|
|
|
}
|
|
|
|
|
|
@GetMapping("/detail")
|
|
|
- @ApiOperation("部门详情")
|
|
|
+ @ApiOperation("部门商户")
|
|
|
public ResponseHelper<AdminWebsit> detail(@RequestParam String id){
|
|
|
AdminWebsit detail = adminWebsitLogic.detail(id);
|
|
|
return ResponseHelper.success(detail);
|