ExposureController.java 948 B

1234567891011121314151617181920212223242526272829303132
  1. package com.ruoyi.demo.controller;
  2. import cn.dev33.satoken.annotation.SaIgnore;
  3. import com.ruoyi.common.core.domain.R;
  4. import com.ruoyi.demo.entity.Exposure;
  5. import com.ruoyi.demo.service.ExposureService;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.RequestBody;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.RestController;
  11. @RestController
  12. @RequestMapping("/exposure")
  13. public class ExposureController {
  14. @Autowired
  15. ExposureService exposureService;
  16. /**
  17. * 添加曝光记录
  18. * @param bo
  19. * @return
  20. */
  21. @SaIgnore
  22. @PostMapping()
  23. public R add(@RequestBody Exposure bo){
  24. int i = exposureService.add(bo);
  25. if (i == 1)
  26. return R.ok("添加成功");
  27. return R.fail("添加失败");
  28. }
  29. }