feige
2024-10-13 8fa32fceb853175e24dd0574647dad099b1ccf47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.ruoyi.web.controller.zhang;
 
 
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.dto.ZHealthInfoDto;
import com.ruoyi.service.ZHealthInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * <p>
 * 身体状况疾病表 前端控制器
 * </p>
 *
 * @author ojq
 * @since 2023-03-14
 */
@RestController
@RequestMapping("/zHealthInfo")
public class ZHealthInfoController {
    @Autowired
    ZHealthInfoService zHealthInfoService;
 
    /**
     * 查询数据
     */
    @GetMapping("/all")
    public AjaxResult listAll(){
        return zHealthInfoService.selectData();
    }
 
    /**
     * 新增或修改记录
     */
//    @PreAuthorize("@ss.hasPermi('system:property:edit')")
    @Log(title = "健康记录", businessType = BusinessType.UPDATE)
    @PostMapping
    public AjaxResult edit(@RequestBody ZHealthInfoDto zHealthInfoDto)
    {
        return zHealthInfoService.saveOrUpdateData(zHealthInfoDto);
    }
 
}