12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- package com.ruoyi.business.controller;
- import com.ruoyi.business.domain.ZwywLrZvxx;
- import com.ruoyi.business.service.IZwywLrZvxxService;
- import com.ruoyi.common.core.web.controller.BaseController;
- import com.ruoyi.common.core.web.domain.AjaxResult;
- import com.ruoyi.common.core.web.page.TableDataInfo;
- import com.ruoyi.common.log.annotation.Log;
- import com.ruoyi.common.log.enums.BusinessType;
- import com.ruoyi.common.security.annotation.Logical;
- import com.ruoyi.common.security.annotation.RequiresPermissions;
- import com.ruoyi.system.validate.group.AddGroup;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.validation.annotation.Validated;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- /**
- * 子女信息Controller
- *
- * @author CH
- * @date 2022-04-28
- */
- @RestController
- @RequestMapping("/lrzvxx")
- public class ZwywLrZvxxController extends BaseController
- {
- @Autowired
- private IZwywLrZvxxService zwywLrZvxxService;
- /**
- * 查询子女信息列表
- */
- @RequiresPermissions(value = {"business:lrzvxx:list", "search:lrzvxx:list"}, logical = Logical.OR)
- @GetMapping("/list")
- public TableDataInfo list(ZwywLrZvxx zwywLrZvxx)
- {
- startPage();
- List<ZwywLrZvxx> list = zwywLrZvxxService.selectZwywLrZvxxList(zwywLrZvxx);
- return getDataTable(list);
- }
- /**
- * 获取子女信息详细信息
- */
- @RequiresPermissions(value = {"business:lrzvxx:query", "search:lrzvxx:query"}, logical = Logical.OR)
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") String id)
- {
- return AjaxResult.success(zwywLrZvxxService.selectZwywLrZvxxById(id));
- }
- /**
- * 新增子女信息
- */
- @RequiresPermissions("business:lrzvxx:add")
- @Log(title = "子女信息", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywLrZvxx zwywLrZvxx)
- {
- zwywLrZvxxService.checkExist(zwywLrZvxx);
- zwywLrZvxxService.checkIdCard(zwywLrZvxx);
- return toAjax(zwywLrZvxxService.insertZwywLrZvxx(zwywLrZvxx),zwywLrZvxx.getId());
- }
- /**
- * 修改子女信息
- */
- @RequiresPermissions("business:lrzvxx:edit")
- @Log(title = "子女信息", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@Validated @RequestBody ZwywLrZvxx zwywLrZvxx)
- {
- zwywLrZvxxService.checkExist(zwywLrZvxx);
- zwywLrZvxxService.checkIdCard(zwywLrZvxx);
- zwywLrZvxxService.updateCheck(zwywLrZvxx);
- return toAjax(zwywLrZvxxService.updateZwywLrZvxx(zwywLrZvxx));
- }
- /**
- * 删除子女信息
- */
- @RequiresPermissions("business:lrzvxx:remove")
- @Log(title = "子女信息", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable String[] ids)
- {
- return toAjax(zwywLrZvxxService.deleteZwywLrZvxxByIds(ids));
- }
- }
|