CustomActivityMidyearTenPercentGiveController.java 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package com.crm.manager.controller;
  2. import com.crm.manager.service.activity.CustomActivityMidyearTenPercentGiveFeignService;
  3. import com.crm.rely.backend.core.dto.base.BaseResultDto;
  4. import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
  5. import com.crm.rely.backend.core.dto.custom.activity.midyear.ten.percent.give.CustomActivityMidyearTenPercentGiveDto;
  6. import com.crm.rely.backend.core.entity.base.SingleLongEntity;
  7. import com.crm.rely.backend.core.entity.custom.activity.midyear.ten.percent.give.CustomActivityMidyearTenPercentGiveDeleteEntity;
  8. import com.crm.rely.backend.core.entity.custom.activity.midyear.ten.percent.give.CustomActivityMidyearTenPercentGiveSearchEntity;
  9. import lombok.extern.log4j.Log4j;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.validation.annotation.Validated;
  12. import org.springframework.web.bind.annotation.PostMapping;
  13. import org.springframework.web.bind.annotation.RequestBody;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RestController;
  16. /**
  17. * @author: houn
  18. */
  19. @Log4j
  20. @RestController
  21. @RequestMapping("/custom/activity/midyear/ten/percent/give")
  22. public class CustomActivityMidyearTenPercentGiveController {
  23. @Autowired
  24. private CustomActivityMidyearTenPercentGiveFeignService feignService;
  25. @PostMapping("/delete")
  26. public BaseResultDto delete(@RequestBody @Validated CustomActivityMidyearTenPercentGiveDeleteEntity entity) throws Exception {
  27. return feignService.delete(entity);
  28. }
  29. @PostMapping("/cancel")
  30. public BaseResultDto cancelActivity(@RequestBody @Validated SingleLongEntity entity) throws Exception {
  31. return feignService.cancelActivity(entity);
  32. }
  33. @PostMapping("/search/list")
  34. public ResultWithPagerDto<CustomActivityMidyearTenPercentGiveDto> searcherList(@RequestBody @Validated CustomActivityMidyearTenPercentGiveSearchEntity entity) throws Exception {
  35. return feignService.searcherList(entity);
  36. }
  37. @PostMapping("/search/single")
  38. public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
  39. return feignService.searcherSingle(entity);
  40. }
  41. }