|
@@ -1,84 +0,0 @@
|
|
|
-package cn.tr.module.smart.web.controller;
|
|
|
|
|
-
|
|
|
|
|
-import cn.dev33.satoken.annotation.SaCheckLogin;
|
|
|
|
|
-import cn.tr.module.api.sys.log.enums.LoginType;
|
|
|
|
|
-import cn.tr.module.sys.oauth2.LoginTypeConstant;
|
|
|
|
|
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
|
|
-import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
|
|
-import cn.tr.core.validation.Insert;
|
|
|
|
|
-import cn.tr.core.validation.Update;
|
|
|
|
|
-import cn.tr.core.pojo.CommonResult;
|
|
|
|
|
-import lombok.AllArgsConstructor;
|
|
|
|
|
-import io.swagger.annotations.Api;
|
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
-import cn.tr.module.smart.common.dto.BizWxUserDTO;
|
|
|
|
|
-import cn.tr.module.smart.common.service.IBizWxUserService;
|
|
|
|
|
-import cn.tr.module.smart.common.dto.BizWxUserQueryDTO;
|
|
|
|
|
-import java.util.*;
|
|
|
|
|
-import cn.tr.plugin.mybatis.base.BaseController;
|
|
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
|
|
-import cn.tr.module.api.sys.log.annotation.OperateLog;
|
|
|
|
|
-import cn.tr.core.pojo.TableDataInfo;
|
|
|
|
|
-/**
|
|
|
|
|
- * 微信用户控制器
|
|
|
|
|
- *
|
|
|
|
|
- * @author lf
|
|
|
|
|
- * @date 2025/05/23 14:03
|
|
|
|
|
- */
|
|
|
|
|
-@Api(tags = "微信用户")
|
|
|
|
|
-@RestController
|
|
|
|
|
-@RequestMapping("/web/wxUser")
|
|
|
|
|
-@AllArgsConstructor
|
|
|
|
|
-@SaCheckLogin(type = LoginTypeConstant.WEB)
|
|
|
|
|
-public class BizWxUserController extends BaseController{
|
|
|
|
|
-
|
|
|
|
|
- private final IBizWxUserService bizWxUserService;
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperationSupport(author = "lf",order = 1)
|
|
|
|
|
- @ApiOperation(value="根据条件查询微信用户",notes = "权限: 无")
|
|
|
|
|
- @PostMapping("/query/page")
|
|
|
|
|
- public TableDataInfo<BizWxUserDTO> selectList(@RequestBody BizWxUserQueryDTO query) {
|
|
|
|
|
- startPage();
|
|
|
|
|
- return getDataTable(bizWxUserService.selectBizWxUserList(query));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperationSupport(author = "lf",order = 2)
|
|
|
|
|
- @ApiOperation(value = "根据id查询微信用户",notes = "权限: wx:wxuser:query")
|
|
|
|
|
- @GetMapping("/detail/{id}")
|
|
|
|
|
- @SaCheckPermission("wx:wxuser:query")
|
|
|
|
|
- public CommonResult<BizWxUserDTO> findById(@PathVariable("id") String id){
|
|
|
|
|
- return CommonResult.success(bizWxUserService.selectBizWxUserById(id));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperationSupport(author = "lf",order = 3)
|
|
|
|
|
- @ApiOperation(value="添加微信用户",notes = "权限: wx:wxuser:add")
|
|
|
|
|
- @PostMapping("/add")
|
|
|
|
|
- @OperateLog
|
|
|
|
|
- @SaCheckPermission("wx:wxuser:add")
|
|
|
|
|
- public CommonResult<Boolean> add(@RequestBody@Validated(Insert.class) BizWxUserDTO source) {
|
|
|
|
|
- return CommonResult.success(bizWxUserService.insertBizWxUser(source));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperationSupport(author = "lf",order = 4)
|
|
|
|
|
- @ApiOperation(value="通过主键id编辑微信用户",notes = "权限: wx:wxuser:edit")
|
|
|
|
|
- @PostMapping("/edit")
|
|
|
|
|
- @OperateLog
|
|
|
|
|
- @SaCheckPermission("wx:wxuser:edit")
|
|
|
|
|
- public CommonResult<Boolean> edit(@RequestBody@Validated(Update.class) BizWxUserDTO source) {
|
|
|
|
|
- return CommonResult.success(bizWxUserService.updateBizWxUserById(source));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperationSupport(author = "lf",order = 5)
|
|
|
|
|
- @ApiOperation(value="删除微信用户",notes = "权限: wx:wxuser:remove")
|
|
|
|
|
- @PostMapping("/removeByIds")
|
|
|
|
|
- @OperateLog
|
|
|
|
|
- @SaCheckPermission("wx:wxuser:remove")
|
|
|
|
|
- public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
|
|
|
|
|
- return CommonResult.success(bizWxUserService.removeBizWxUserByIds(ids));
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|