| | |
| | | package com.ruoyi.web.controller.zhang; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.domain.ZHealthHabit; |
| | | import com.ruoyi.domain.dto.ZHealthBaseDto; |
| | | import com.ruoyi.domain.dto.ZHealthHabitDto; |
| | | import com.ruoyi.service.ZHealthHabitService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/zHealthHabit") |
| | | public class ZHealthHabitController { |
| | | |
| | | @Autowired |
| | | ZHealthHabitService zHealthHabitService; |
| | | |
| | | /** |
| | | * 查询数据 |
| | | */ |
| | | @GetMapping("/all") |
| | | public AjaxResult listAll(){ |
| | | return zHealthHabitService.selectData(); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改记录 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:edit')") |
| | | @Log(title = "健康记录", businessType = BusinessType.UPDATE) |
| | | @PostMapping |
| | | public AjaxResult edit(@RequestBody ZHealthHabitDto zHealthHabitDto) |
| | | { |
| | | return zHealthHabitService.saveOrUpdateData(zHealthHabitDto); |
| | | } |
| | | |
| | | |
| | | } |
| | | |