|
@@ -0,0 +1,92 @@
|
|
|
|
+package com.fs.hisStore.controller;
|
|
|
|
+
|
|
|
|
+import com.fs.common.annotation.Log;
|
|
|
|
+import com.fs.common.core.controller.BaseController;
|
|
|
|
+import com.fs.common.core.domain.AjaxResult;
|
|
|
|
+import com.fs.common.core.page.TableDataInfo;
|
|
|
|
+import com.fs.common.enums.BusinessType;
|
|
|
|
+import com.fs.common.utils.poi.ExcelUtil;
|
|
|
|
+import com.fs.hisStore.domain.FsUserPromoterApplyScrm;
|
|
|
|
+import com.fs.hisStore.param.FsUsePromoterApplyParam;
|
|
|
|
+import com.fs.hisStore.service.IFsUserPromoterApplyScrmService;
|
|
|
|
+import com.fs.hisStore.vo.FsUserPromoterApplyVO;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 推广员申请Controller
|
|
|
|
+ *
|
|
|
|
+ * @author fs
|
|
|
|
+ * @date 2023-02-28
|
|
|
|
+ */
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping("/store/userPromoterApply")
|
|
|
|
+public class FsUserPromoterApplyController extends BaseController {
|
|
|
|
+ @Autowired
|
|
|
|
+ private IFsUserPromoterApplyScrmService fsUserPromoterApplyService;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询推广员申请列表
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:userPromoterApply:list')")
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
+ public TableDataInfo list(FsUsePromoterApplyParam fsUserPromoterApply) {
|
|
|
|
+ startPage();
|
|
|
|
+ List<FsUserPromoterApplyVO> list = fsUserPromoterApplyService.selectFsUserPromoterApplyListVO(fsUserPromoterApply);
|
|
|
|
+ return getDataTable(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 导出推广员申请列表
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:userPromoterApply:export')")
|
|
|
|
+ @Log(title = "推广员申请", businessType = BusinessType.EXPORT)
|
|
|
|
+ @GetMapping("/export")
|
|
|
|
+ public AjaxResult export(FsUserPromoterApplyScrm fsUserPromoterApply) {
|
|
|
|
+ List<FsUserPromoterApplyScrm> list = fsUserPromoterApplyService.selectFsUserPromoterApplyList(fsUserPromoterApply);
|
|
|
|
+ ExcelUtil<FsUserPromoterApplyScrm> util = new ExcelUtil<FsUserPromoterApplyScrm>(FsUserPromoterApplyScrm.class);
|
|
|
|
+ return util.exportExcel(list, "userPromoterApply");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取推广员申请详细信息
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:userPromoterApply:query')")
|
|
|
|
+ @GetMapping(value = "/{applyId}")
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("applyId") Long applyId) {
|
|
|
|
+ return AjaxResult.success(fsUserPromoterApplyService.selectFsUserPromoterApplyById(applyId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 新增推广员申请
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:userPromoterApply:add')")
|
|
|
|
+ @Log(title = "推广员申请", businessType = BusinessType.INSERT)
|
|
|
|
+ @PostMapping
|
|
|
|
+ public AjaxResult add(@RequestBody FsUserPromoterApplyScrm fsUserPromoterApply) {
|
|
|
|
+ return toAjax(fsUserPromoterApplyService.insertFsUserPromoterApply(fsUserPromoterApply));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改推广员申请
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:userPromoterApply:edit')")
|
|
|
|
+ @Log(title = "推广员申请", businessType = BusinessType.UPDATE)
|
|
|
|
+ @PutMapping
|
|
|
|
+ public AjaxResult edit(@RequestBody FsUserPromoterApplyScrm fsUserPromoterApply) {
|
|
|
|
+ return toAjax(fsUserPromoterApplyService.updateFsUserPromoterApply(fsUserPromoterApply));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 删除推广员申请
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:userPromoterApply:remove')")
|
|
|
|
+ @Log(title = "推广员申请", businessType = BusinessType.DELETE)
|
|
|
|
+ @DeleteMapping("/{applyIds}")
|
|
|
|
+ public AjaxResult remove(@PathVariable Long[] applyIds) {
|
|
|
|
+ return toAjax(fsUserPromoterApplyService.deleteFsUserPromoterApplyByIds(applyIds));
|
|
|
|
+ }
|
|
|
|
+}
|