| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- package com.dk.oauth.controller.integral;
- import com.dk.common.model.pojo.PageList;
- import com.dk.common.response.ResponseResultVO;
- import com.dk.oauth.model.VO.integral.CouponReceiveVO;
- import com.dk.oauth.model.VO.integral.CouponSendVO;
- import com.dk.oauth.model.pojo.integral.CouponReceive;
- import com.dk.common.controller.BaseController;
- import com.dk.common.service.BaseService;
- import com.dk.oauth.model.query.integral.CouponReceiveQuery;
- import com.dk.oauth.model.query.integral.CouponSendQuery;
- import com.dk.oauth.model.response.integral.CouponReceiveResponse;
- import com.dk.oauth.model.response.integral.CouponSendResponse;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.beans.factory.annotation.Autowired;
- import io.swagger.annotations.Api;
- import com.dk.oauth.service.integral.CouponReceiveService;
- import javax.validation.Valid;
- @Api(tags = "优惠券获取API接口")
- @RestController
- @RequestMapping("/oauth/couponReceive")
- public class CouponReceiveController{
- public BaseService<CouponReceive> getService() {
- return couponReceiveService;
- }
- @Autowired
- private CouponReceiveService couponReceiveService;
- /**
- * @desc : 条件查询
- * @date : 2024/7/26 11:06
- * @author : 寇珊珊
- */
- @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
- @PostMapping({"list_by"})
- public ResponseResultVO<PageList<CouponReceiveResponse>> selectByCond(@RequestBody CouponReceiveQuery couponReceiveQuery ) {
- return couponReceiveService.selectByCond(couponReceiveQuery);
- }
- /**
- * @desc : 通过ID查询
- * @date : 2024/7/26 11:06
- * @author : 寇珊珊
- */
- @PostMapping({"{id}"})
- public ResponseResultVO<?> selectById(@PathVariable String id) {
- return couponReceiveService.selectById(id);
- }
- /**
- * @desc : 助力数据新建
- * @date : 2024/7/26 11:06
- * @author : 寇珊珊
- */
- @ApiOperation(
- value = "新建",
- notes = "新建"
- )
- @PostMapping({"insert_coupon_send"})
- public ResponseResultVO<?> otherOutboundInsert(@Valid @RequestBody CouponReceiveVO couponReceiveVO) {
- return couponReceiveService.insert(couponReceiveVO);
- }
- /**
- * @desc : 获取链接助力人数
- * @date : 2024/8/8 13:18
- * @author : 刘尧
- */
- @ApiOperation(
- value = "获取链接助力人数",
- notes = "获取链接助力人数"
- )
- @PostMapping({"get_receive_user_number"})
- public ResponseResultVO<?> getReceiveUserNumber(@Valid @RequestBody CouponReceiveVO couponReceiveVO) {
- return couponReceiveService.selectReceiveNumber(couponReceiveVO);
- }
- }
|