|
@@ -0,0 +1,60 @@
|
|
|
+package com.zhongzheng.controller.distribution;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
+import com.zhongzheng.framework.web.service.SellerTokenService;
|
|
|
+import com.zhongzheng.modules.distribution.bo.DistributionActivityPosterQueryBo;
|
|
|
+import com.zhongzheng.modules.distribution.service.IDistributionActivityPosterService;
|
|
|
+import com.zhongzheng.modules.distribution.vo.DistributionActivityPosterVo;
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginSeller;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.zhongzheng.common.annotation.Log;
|
|
|
+import com.zhongzheng.common.core.controller.BaseController;
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 分销海报Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2023-03-22
|
|
|
+ */
|
|
|
+@Api(value = "分销海报控制器", tags = {"分销海报管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/distribution/poster")
|
|
|
+public class DistributionActivityPosterController extends BaseController {
|
|
|
+
|
|
|
+ private final IDistributionActivityPosterService iDistributionActivityPosterService;
|
|
|
+
|
|
|
+ private final SellerTokenService sellerTokenService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取分销海报详细信息
|
|
|
+ */
|
|
|
+ @ApiOperation("生成业务员海报")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:poster:query')")
|
|
|
+ @GetMapping("/makePoster")
|
|
|
+ public AjaxResult<DistributionActivityPosterVo> makePoster(DistributionActivityPosterQueryBo bo) {
|
|
|
+ ClientLoginSeller loginUser = sellerTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bo.setSellerId(loginUser.getSeller().getSellerId());
|
|
|
+ return AjaxResult.success(iDistributionActivityPosterService.makePoster(bo));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|