|
@@ -0,0 +1,83 @@
|
|
|
|
|
+package cn.tr.module.smart.web.controller;
|
|
|
|
|
+
|
|
|
|
|
+import cn.dev33.satoken.annotation.SaCheckLogin;
|
|
|
|
|
+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.BizQuestionSquareDTO;
|
|
|
|
|
+import cn.tr.module.smart.common.service.IBizQuestionSquareService;
|
|
|
|
|
+import cn.tr.module.smart.common.dto.BizQuestionSquareQueryDTO;
|
|
|
|
|
+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 16:50
|
|
|
|
|
+ */
|
|
|
|
|
+@Api(tags = "问卷调查问题字段广场")
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/web/questionSquare")
|
|
|
|
|
+@AllArgsConstructor
|
|
|
|
|
+@SaCheckLogin(type = LoginTypeConstant.WEB)
|
|
|
|
|
+public class BizQuestionSquareController extends BaseController{
|
|
|
|
|
+
|
|
|
|
|
+ private final IBizQuestionSquareService bizQuestionSquareService;
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 1)
|
|
|
|
|
+ @ApiOperation(value="根据条件查询问卷调查问题字段",notes = "权限: 无")
|
|
|
|
|
+ @PostMapping("/query/page")
|
|
|
|
|
+ public TableDataInfo<BizQuestionSquareDTO> selectList(@RequestBody BizQuestionSquareQueryDTO query) {
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ return getDataTable(bizQuestionSquareService.selectBizQuestionSquareList(query));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 2)
|
|
|
|
|
+ @ApiOperation(value = "根据id查询问卷调查问题字段",notes = "权限: common:questionSquare:query")
|
|
|
|
|
+ @GetMapping("/detail/{id}")
|
|
|
|
|
+ @SaCheckPermission("common:questionSquare:query")
|
|
|
|
|
+ public CommonResult<BizQuestionSquareDTO> findById(@PathVariable("id") String id){
|
|
|
|
|
+ return CommonResult.success(bizQuestionSquareService.selectBizQuestionSquareById(id));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 3)
|
|
|
|
|
+ @ApiOperation(value="添加问卷调查问题字段",notes = "权限: common:questionSquare:add")
|
|
|
|
|
+ @PostMapping("/add")
|
|
|
|
|
+ @OperateLog
|
|
|
|
|
+ @SaCheckPermission("common:questionSquare:add")
|
|
|
|
|
+ public CommonResult<Boolean> add(@RequestBody@Validated(Insert.class) BizQuestionSquareDTO source) {
|
|
|
|
|
+ return CommonResult.success(bizQuestionSquareService.insertBizQuestionSquare(source));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 4)
|
|
|
|
|
+ @ApiOperation(value="通过主键id编辑问卷调查问题字段",notes = "权限: common:questionSquare:edit")
|
|
|
|
|
+ @PostMapping("/edit")
|
|
|
|
|
+ @OperateLog
|
|
|
|
|
+ @SaCheckPermission("common:questionSquare:edit")
|
|
|
|
|
+ public CommonResult<Boolean> edit(@RequestBody@Validated(Update.class) BizQuestionSquareDTO source) {
|
|
|
|
|
+ return CommonResult.success(bizQuestionSquareService.updateBizQuestionSquareById(source));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 5)
|
|
|
|
|
+ @ApiOperation(value="删除问卷调查问题字段",notes = "权限: common:questionSquare:remove")
|
|
|
|
|
+ @PostMapping("/removeByIds")
|
|
|
|
|
+ @OperateLog
|
|
|
|
|
+ @SaCheckPermission("common:questionSquare:remove")
|
|
|
|
|
+ public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
|
|
|
|
|
+ return CommonResult.success(bizQuestionSquareService.removeBizQuestionSquareByIds(ids));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|