| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- package com.poyee.controller;
- import com.poyee.annotation.UserLoginToken;
- import com.poyee.base.controller.BaseController;
- import com.poyee.base.dto.Page;
- import com.poyee.base.dto.Result;
- import com.poyee.dto.share.*;
- import com.poyee.enums.Roles;
- import com.poyee.service.IPromotionShareInfoService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.web.bind.annotation.*;
- import javax.validation.Valid;
- /**
- * <p>
- * 前端控制器
- * </p>
- *
- * @author lsz
- * @since 2025-04-16
- */
- @Slf4j
- @Api(tags = "推广分享信息")
- @RestController
- @RequestMapping("/api/promotionShareInfo")
- public class PromotionShareInfoController extends BaseController<IPromotionShareInfoService, PromotionShareInfoReq, PromotionShareInfoDto> {
- @ApiOperation(value = "列表@(app-1.0)")
- @RequestMapping(path = "/page",method = {RequestMethod.POST})
- @UserLoginToken(faceVerify = false, roles = {Roles.ADMIN,Roles.GENERAL_USER})
- @ResponseBody
- public Result<PromotionShareInfoPageDto> page(@RequestBody PromotionShareInfoPageReq req) {
- return Result.success(baseService.page(req));
- }
- /**
- * 更新分享内容
- */
- @ApiOperation(value = "更新分享内容@(app-1.0)")
- @RequestMapping(path = "/hold",method = {RequestMethod.POST})
- @UserLoginToken(faceVerify = false, roles = {Roles.ADMIN,Roles.GENERAL_USER})
- @ResponseBody
- public Result hold(@RequestBody @Valid MakeShareInfoReq req) {
- return baseService.hold(req);
- }
- /**
- * 生成分享信息
- * @param taskId
- * @return
- */
- @ApiOperation(value = "生成分享信息@(app-1.0)")
- @RequestMapping(path = "/makeShareInfo/{taskId}",method = {RequestMethod.POST})
- @UserLoginToken(faceVerify = false, roles = {Roles.ADMIN,Roles.GENERAL_USER})
- @ResponseBody
- public Result<PromotionShareInfoDto> makeShareInfo(@PathVariable("taskId") Long taskId) {
- return Result.success(baseService.makeShareInfo(taskId));
- }
- /**
- * 根据分享口令获取分享产品信息
- */
- @ApiOperation(value = "根据分享口令获取分享产品信息@(app-1.0)")
- @RequestMapping(path = "/getShareInfoByShareCode/{shareCode}",method = {RequestMethod.POST})
- @ResponseBody
- public Result<ShareProductInfoDto> getShareInfoByShareCode(@PathVariable("shareCode") String shareCode) {
- log.info("根据分享口令获取分享产品信息 > {}",shareCode);
- return Result.success(baseService.searchByShareCode(shareCode));
- }
- }
|