package com.rongwei.savecheck.controller;

import com.rongwei.rwcommon.base.R;
import com.rongwei.sfcommon.sys.service.SaveCheckItemService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.Map;

/**
 * SaveCheckItemController class
 *
 * @author XH
 * @date 2023/10/18
 */
@RestController
@RequestMapping("/check/item")
public class SaveCheckItemController {
    private final Logger log = LoggerFactory.getLogger(this.getClass().getName());
    @Autowired
    private SaveCheckItemService saveCheckItemService;


    /**
     * 每周四 向用户发送提醒邮件 安全观察
     *
     * @param map
     * @return
     */
    @PostMapping("/save")
    public R checkItemSave(@RequestBody Map<String, String> map) {
        log.info("检查项保存!参数为：{}", map);
        return saveCheckItemService.checkItemSave(map);
    }
}
