| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package com.ym.mec.web.controller;
- import com.ym.mec.biz.dal.entity.AppRedemptionCode;
- import com.ym.mec.biz.service.AppRedemptionCodeService;
- import com.ym.mec.common.controller.BaseController;
- import com.ym.mec.common.entity.HttpResponseResult;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import javax.annotation.Resource;
- /**
- * 兑换码分配表(RedemptionCode)表控制层
- *
- * @author makejava
- * @since 2021-12-27 14:27:56
- */
- @RestController
- @RequestMapping("appRedemptionCode")
- public class AppRedemptionCodeController extends BaseController {
- /**
- * 服务对象
- */
- @Resource
- private AppRedemptionCodeService appRedemptionCodeService;
- @ApiOperation(value = "分配url")
- @GetMapping(value = "allocation")
- public HttpResponseResult<AppRedemptionCode> allocation(@RequestParam("userId")Integer userId) throws Exception {
- if (userId == null) {
- throw new Exception("用户Id必须填写");
- }
- return succeed(appRedemptionCodeService.allocation(userId));
- }
- @ApiOperation(value = "使用量检测")
- @GetMapping(value = "checkLowVolume")
- // @PreAuthorize("@pcs.hasPermissions('appRedemptionCode/checkLowVolume')")
- public Object checkLowVolume() {
- appRedemptionCodeService.checkLowVolume();
- return null;
- }
- }
|