xiaoyong931011
2022-08-12 77a12468215a8a8a5b3a22544bdcc239efddf287
src/main/java/cc/mrbird/febs/mall/controller/AdminMallTeamLeaderController.java
@@ -6,18 +6,18 @@
import cc.mrbird.febs.common.entity.QueryRequest;
import cc.mrbird.febs.mall.dto.AdminLeaderUpdateDto;
import cc.mrbird.febs.mall.entity.MallGoodsCategory;
import cc.mrbird.febs.mall.entity.MallLeaderStock;
import cc.mrbird.febs.mall.entity.MallMember;
import cc.mrbird.febs.mall.entity.MallTeamLeader;
import cc.mrbird.febs.mall.service.IAdminMallTeamLeaderService;
import cc.mrbird.febs.mall.vo.AdminSelectListLeaderVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;
@@ -57,4 +57,26 @@
        return iAdminMallTeamLeaderService.selectList(mallTeamLeader);
    }
    /**
     * 团长信息--取消团长
     */
    @GetMapping("leaderCancel/{id}")
    @ControllerEndpoint(operation = "团长信息--取消团长", exceptionMessage = "取消团长失败")
    public FebsResponse leaderCancel(@NotNull(message = "{required}") @PathVariable Long id) {
        return iAdminMallTeamLeaderService.leaderCancel(id);
    }
    /**
     * 团长信息-商品库存编辑
     */
    @GetMapping("/leaderGoodsUpdate")
    public FebsResponse leaderGoodsUpdate(QueryRequest request, MallLeaderStock mallLeaderStock, Integer parentId) {
        if (parentId == null) {
            ViewMallTeamLeaderController.idLeaderGoodsUpdate = 0;
        }
        mallLeaderStock.setTeamLeaderId(ViewMallTeamLeaderController.idLeaderGoodsUpdate);
        Map<String, Object> dataTable = getDataTable(iAdminMallTeamLeaderService.leaderGoodsUpdate(request, mallLeaderStock));
        return new FebsResponse().success().data(dataTable);
    }
}