package com.diagbot.web;


import com.diagbot.dto.PartSymptomDTO;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.PartFacade;
import com.diagbot.vo.PartSymptomVO;
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;

/**
 * @Description: 分诊部位Controller
 * @Author: ztg
 * @Date: 2018/10/23 15:09
 */
@RestController
@RequestMapping("/part")
public class PartController {

    @Autowired
    PartFacade partFacade;


    @ApiOperation(value = "根据已选部位返回对应的症状[by:zhoutg]",
            notes = "partIds： 部位的id，数组<br>" +
                    "sexType：性别，1：男，2：女<br>" +
                    "age：年龄")
    @PostMapping("/getSymptomByPartIds")
    public RespDTO<List<PartSymptomDTO>> getSymptomByPartIds(@RequestBody PartSymptomVO partSymptomVO) {
        return RespDTO.onSuc(partFacade.getSymptomByPartIds(partSymptomVO));
    }

}

