|
@@ -0,0 +1,116 @@
|
|
|
+
|
|
|
+ * Author: wangjian
|
|
|
+ * 生成controller
|
|
|
+ */
|
|
|
+package com.tofly.feesapi.znbgl.controller;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.tofly.common.core.entity.ResultRespone;
|
|
|
+import com.tofly.common.log.annotation.ToFlyAppLog;
|
|
|
+import com.tofly.feesapi.znbgl.entity.ZnbYhda;
|
|
|
+import com.tofly.feesapi.znbgl.service.ZnbYhdaService;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
+
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+ * 智能表用户档案
|
|
|
+ *
|
|
|
+ * @author sxb
|
|
|
+ * @date Tue Apr 23 00:00:00 CST 2024
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+@RequestMapping("/znbyhda")
|
|
|
+@Api(tags="智能表用户档案接口")
|
|
|
+public class ZnbYhdaController {
|
|
|
+
|
|
|
+ private final ZnbYhdaService znbYhdaService;
|
|
|
+
|
|
|
+
|
|
|
+ * 分页查询
|
|
|
+ * @param page 分页对象
|
|
|
+ * @param znbYhda 智能表用户档案
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/page" )
|
|
|
+ @ApiOperation(value = "分页查询")
|
|
|
+ public ResultRespone getZnbYhdaPage(Page page, @ModelAttribute ZnbYhda znbYhda) {
|
|
|
+ return ResultRespone.success(znbYhdaService.page(page, Wrappers.query(znbYhda)));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ * 通过id查询智能表用户档案
|
|
|
+ * @param yhbh id
|
|
|
+ * @return ResultRespone
|
|
|
+ */
|
|
|
+ @GetMapping("/{yhbh}" )
|
|
|
+ @ApiOperation(value = "通过ID查询")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "yhbh", value = "ID", required = true, dataType = "String")
|
|
|
+ })
|
|
|
+ public ResultRespone getById(@PathVariable("yhbh" ) String yhbh) {
|
|
|
+ return ResultRespone.success(znbYhdaService.getById(yhbh));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 新增智能表用户档案
|
|
|
+ * @param znbYhda 智能表用户档案
|
|
|
+ * @return ResultRespone
|
|
|
+ */
|
|
|
+ @ToFlyAppLog(title="新增智能表用户档案" )
|
|
|
+ @ApiOperation(value = "新增智能表用户档案")
|
|
|
+ @PostMapping
|
|
|
+ public ResultRespone save(@RequestBody ZnbYhda znbYhda) {
|
|
|
+ return ResultRespone.success(znbYhdaService.save(znbYhda));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 修改智能表用户档案
|
|
|
+ * @param znbYhda 智能表用户档案
|
|
|
+ * @return ResultRespone
|
|
|
+ */
|
|
|
+ @ToFlyAppLog(title="修改智能表用户档案" )
|
|
|
+ @ApiOperation(value = "修改智能表用户档案")
|
|
|
+ @PutMapping
|
|
|
+ public ResultRespone updateById(@RequestBody ZnbYhda znbYhda) {
|
|
|
+ return ResultRespone.success(znbYhdaService.updateById(znbYhda));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 通过id删除智能表用户档案
|
|
|
+ * @param yhbh id
|
|
|
+ * @return ResultRespone
|
|
|
+ */
|
|
|
+ @ToFlyAppLog(title="通过id删除智能表用户档案" )
|
|
|
+ @ApiOperation(value = "通过ID删除智能表用户档案")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "yhbh", value = "ID", required = true, dataType = "String")
|
|
|
+ })
|
|
|
+ @DeleteMapping("/{yhbh}" )
|
|
|
+ public ResultRespone removeById(@PathVariable String yhbh) {
|
|
|
+ return ResultRespone.success(znbYhdaService.removeById(yhbh));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 通过id批量删除智能表用户档案
|
|
|
+ * @param ids id
|
|
|
+ * @return ResultRespone
|
|
|
+ */
|
|
|
+ @ToFlyAppLog(title="通过id批量删除智能表用户档案" )
|
|
|
+ @ApiOperation(value = "通过ID批量删除智能表用户档案")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "ids", value = "批量删除,多个id以逗号隔开", required = true, dataType = "String")
|
|
|
+ })
|
|
|
+ @DeleteMapping("/deleteByIds" )
|
|
|
+ public ResultRespone removeByIds(String ids) {
|
|
|
+ return ResultRespone.success(znbYhdaService.removeByIds(Arrays.asList(ids.split(","))));
|
|
|
+ }
|
|
|
+}
|