1234567891011121314151617181920212223242526272829303132333435 |
- package com.ruoyi.demo.controller;
- import cn.dev33.satoken.annotation.SaIgnore;
- import com.ruoyi.common.core.domain.R;
- import com.ruoyi.demo.entity.Exposure;
- import com.ruoyi.demo.service.ExposureService;
- 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;
- /**
- * 曝光统计
- */
- @RestController
- @RequestMapping("/exposure")
- public class ExposureController {
- @Autowired
- ExposureService exposureService;
- /**
- * 添加曝光记录
- * @param bo 请求体
- * @return
- */
- @SaIgnore
- @PostMapping()
- public R add(@RequestBody Exposure bo){
- int i = exposureService.add(bo);
- if (i == 1)
- return R.ok("添加成功");
- return R.fail("添加失败");
- }
- }
|