|
@@ -1,98 +0,0 @@
|
|
-package com.zhongzheng.controller.distribution;
|
|
|
|
-
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Arrays;
|
|
|
|
-
|
|
|
|
-import cn.hutool.core.lang.Validator;
|
|
|
|
-import com.zhongzheng.common.utils.ServletUtils;
|
|
|
|
-import com.zhongzheng.framework.web.service.SellerTokenService;
|
|
|
|
-import com.zhongzheng.framework.web.service.WxLoginService;
|
|
|
|
-import com.zhongzheng.modules.distribution.bo.DistributionSellerAddBo;
|
|
|
|
-import com.zhongzheng.modules.distribution.bo.DistributionSellerEditBo;
|
|
|
|
-import com.zhongzheng.modules.distribution.bo.DistributionSellerQueryBo;
|
|
|
|
-import com.zhongzheng.modules.distribution.service.IDistributionSellerService;
|
|
|
|
-import com.zhongzheng.modules.distribution.vo.DistributionSellerVo;
|
|
|
|
-import com.zhongzheng.modules.user.bo.UserVisitLogAddBo;
|
|
|
|
-import com.zhongzheng.modules.user.domain.UserWxFollow;
|
|
|
|
-import com.zhongzheng.modules.user.entity.ClientLoginSeller;
|
|
|
|
-import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
|
-import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
|
-import com.zhongzheng.modules.wx.bo.WxLoginBody;
|
|
|
|
-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 com.zhongzheng.common.enums.BusinessType;
|
|
|
|
-import com.zhongzheng.common.utils.poi.ExcelUtil;
|
|
|
|
-import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
|
-import io.swagger.annotations.Api;
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * 分销业务员Controller
|
|
|
|
- *
|
|
|
|
- * @author hjl
|
|
|
|
- * @date 2023-03-13
|
|
|
|
- */
|
|
|
|
-@Api(value = "分销业务员控制器", tags = {"分销业务员管理"})
|
|
|
|
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
|
-@RestController
|
|
|
|
-@RequestMapping("/distribution/seller")
|
|
|
|
-public class DistributionSellerController extends BaseController {
|
|
|
|
-
|
|
|
|
- private final IDistributionSellerService iDistributionSellerService;
|
|
|
|
-
|
|
|
|
- private final SellerTokenService sellerTokenService;
|
|
|
|
-
|
|
|
|
- private final WxLoginService wxLoginService;
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 查询分销业务员列表
|
|
|
|
- */
|
|
|
|
- @ApiOperation("查询分销业务员列表")
|
|
|
|
- @PreAuthorize("@ss.hasPermi('system:seller:list')")
|
|
|
|
- @GetMapping("/list")
|
|
|
|
- public TableDataInfo<DistributionSellerVo> list(DistributionSellerQueryBo bo) {
|
|
|
|
- startPage();
|
|
|
|
- List<DistributionSellerVo> list = iDistributionSellerService.queryList(bo);
|
|
|
|
- return getDataTable(list);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 新增分销业务员
|
|
|
|
- */
|
|
|
|
- /* @ApiOperation("新增分销业务员")
|
|
|
|
- @PreAuthorize("@ss.hasPermi('system:seller:add')")
|
|
|
|
- @Log(title = "分销业务员", businessType = BusinessType.INSERT)
|
|
|
|
- @PostMapping()
|
|
|
|
- public AjaxResult<Void> add(@RequestBody DistributionSellerAddBo bo) {
|
|
|
|
- return toAjax(iDistributionSellerService.insertByAddBo(bo) ? 1 : 0);
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 修改分销业务员
|
|
|
|
- */
|
|
|
|
- @ApiOperation("修改分销业务员")
|
|
|
|
- @PreAuthorize("@ss.hasPermi('system:seller:edit')")
|
|
|
|
- @Log(title = "分销业务员", businessType = BusinessType.UPDATE)
|
|
|
|
- @PostMapping("/edit")
|
|
|
|
- public AjaxResult<Void> edit(@RequestBody DistributionSellerEditBo bo) {
|
|
|
|
- ClientLoginSeller loginUser = sellerTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
- bo.setSellerId(loginUser.getSeller().getSellerId());
|
|
|
|
- return toAjax(iDistributionSellerService.updateByEditBo(bo) ? 1 : 0);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-}
|
|
|