package com.diagbot.web;

import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.rabbit.MySender;
import com.diagbot.vo.BuriedSomeStatisticalVO;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author wangfeng
 * @Description: 数据埋点统计表 前端控制器
 * @date 2018年12月3日 上午9:24:22
 */
@RestController
@RequestMapping("/buriedSomeStatistical")
@Api(value = "数据埋点统计API[by:wangfeng]", tags = { "WF——数据埋点统计API" })
@SuppressWarnings("unchecked")
public class BuriedSomeStatisticalController {
    @Autowired
    MySender mySender;

    @ApiOperation(value = "数据埋点统计保存[by:wangfeng]", notes = "数据埋点统计保存")
    @PostMapping("/saveBuriedSomeStatisticals")
    @SysLogger("saveBuriedSomeStatisticals")
    @Transactional
    public RespDTO<Boolean> saveBuriedSomeStatisticals(@Valid @RequestBody BuriedSomeStatisticalVO buriedSomeStatisticalVO) {

        mySender.outputPointSend(buriedSomeStatisticalVO);

        return RespDTO.onSuc(true);
    }

}
