| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- package com.dk.oauth.controller.integral;
- import com.dk.common.model.pojo.PageList;
- import com.dk.common.response.ResponseResultUtil;
- import com.dk.common.response.ResponseResultVO;
- import com.dk.oauth.model.VO.integral.CouponReceiveVO;
- import com.dk.oauth.model.VO.integral.CouponUseVO;
- import com.dk.oauth.model.pojo.integral.CouponUse;
- 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.CouponUseQuery;
- import com.dk.oauth.model.response.integral.CouponReceiveResponse;
- import com.dk.oauth.model.response.integral.CouponUseResponse;
- 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.CouponUseService;
- import javax.validation.Valid;
- @Api(tags = "优惠券使用API接口")
- @RestController
- @RequestMapping("/oauth/couponUse")
- public class CouponUseController{
- public BaseService<CouponUse> getService() {
- return couponUseService;
- }
- @Autowired
- private CouponUseService couponUseService;
- /**
- * @desc : 条件查询
- * @date : 2024/7/26 11:06
- * @author : 寇珊珊
- */
- @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
- @PostMapping({"list_by"})
- public ResponseResultVO<PageList<CouponUseResponse>> selectByCond(@RequestBody CouponUseQuery couponReceiveQuery) {
- return couponUseService.selectByCond(couponReceiveQuery);
- }
- /**
- * @desc : 通过ID查询
- * @date : 2024/7/26 11:06
- * @author : 寇珊珊
- */
- @PostMapping({"{id}"})
- public ResponseResultVO<?> selectById(@PathVariable String id) {
- return couponUseService.selectById(id);
- }
- /**
- * @desc : 更新
- * @date : 2024/7/26 16:08
- * @author : 寇珊珊
- */
- @ApiOperation(
- value = "更新",
- notes = "更新"
- )
- @PostMapping({"update"})
- public ResponseResultVO<?> update(@Valid @RequestBody CouponUseVO couponUseVO) {
- return couponUseService.update(couponUseVO);
- }
- /**
- * @desc : 获取优惠劵条数
- * @date : 2024/7/29 16:28
- * @author : 刘尧
- */
- @ApiOperation(
- value = "获取优惠劵条数",
- notes = "获取优惠劵条数"
- )
- @PostMapping({"count_by"})
- public ResponseResultVO<?> countByCond(@RequestBody CouponUseQuery couponUseQuery){
- return ResponseResultUtil.success(couponUseService.countByCond(couponUseQuery));
- }
- }
|