package com.bonus.canteen.core.nutrition.controller;

import com.bonus.canteen.core.nutrition.common.dto.HealthChronicDto;
import com.bonus.canteen.core.nutrition.service.HealthChronicService2;
import com.bonus.canteen.core.nutrition.common.vo.HealthChronicVo;
import com.bonus.common.core.web.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping({"/health/chronic"})
public class HealthChronicController2 {
   @Autowired
   private HealthChronicService2 healthChronicService;

   @ApiOperation("获取慢性病字典")
   @PostMapping({"/dict-health-chronic"})
   public AjaxResult dictHealthChronic(@RequestBody HealthChronicDto dto) {
      List<HealthChronicVo> list = this.healthChronicService.dictHealthChronic(dto);
      return AjaxResult.success(list);
   }

}
