package com.diagbot.web;


import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.ModuleInfoFacade;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 模型表 前端控制器
 * </p>
 *
 * @author zhoutg
 * @since 2018-12-05
 */
@RestController
@RequestMapping("/moduleInfo")
@SuppressWarnings("unchecked")
@Api(value = "主诉-既往史模板相关API", tags = { "主诉-既往史模板相关API" })
public class ModuleInfoController {


    @Autowired
    ModuleInfoFacade moduleInfoFacade;

    @ApiOperation(value = "模板新增或更新[by:zhoutg]",
            notes = "")
    @PostMapping("/saveOrUpdate")
    @SysLogger("saveOrUpdate")
    @Transactional
    public RespDTO<Boolean> saveOrUpdate() {

        return RespDTO.onSuc(true);
    }


    @ApiOperation(value = "模板删除[by:zhoutg]",
            notes = "")
    @PostMapping("/delete")
    @SysLogger("delete")
    @Transactional
    public RespDTO<Boolean> delete(String ids) {
        moduleInfoFacade.deleteByIdsFac(ids);
        return RespDTO.onSuc(true);
    }
}
