| package cc.mrbird.febs.mall.controller; | 
|   | 
| import cc.mrbird.febs.common.annotation.ControllerEndpoint; | 
| import cc.mrbird.febs.common.controller.BaseController; | 
| import cc.mrbird.febs.common.entity.FebsResponse; | 
| import cc.mrbird.febs.common.entity.QueryRequest; | 
| import cc.mrbird.febs.mall.dto.*; | 
| import cc.mrbird.febs.mall.entity.AppVersion; | 
| import cc.mrbird.febs.mall.entity.MallMember; | 
| import cc.mrbird.febs.mall.entity.MallNewsInfo; | 
| import cc.mrbird.febs.mall.entity.MallShopApply; | 
| import cc.mrbird.febs.mall.service.IAdminMallMemberService; | 
| import cc.mrbird.febs.mall.vo.AdminAgentLevelOptionTreeVo; | 
| import lombok.RequiredArgsConstructor; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.validation.annotation.Validated; | 
| import org.springframework.web.bind.annotation.*; | 
|   | 
| import javax.validation.Valid; | 
| import javax.validation.constraints.NotNull; | 
| import java.util.List; | 
| import java.util.Map; | 
|   | 
| @Slf4j | 
| @Validated | 
| @RestController | 
| @RequiredArgsConstructor | 
| @RequestMapping(value = "/admin/mallMember") | 
| public class AdminMallMemberController extends BaseController { | 
|   | 
|     private final IAdminMallMemberService mallMemberService; | 
|   | 
|     /** | 
|      * 平台账单 | 
|      * @param mallMember | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getMallDataList") | 
|     public FebsResponse getMallDataList(MallMember mallMember, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getMallDataList(mallMember, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * 会员列表 | 
|      * @param mallMember | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getMallMemberList") | 
|     public FebsResponse getMallMemberList(MallMember mallMember, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getMallMemberList(mallMember, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * 会员列表---禁止 | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @GetMapping("closeAccount/{id}") | 
|     @ControllerEndpoint(operation = "会员列表---禁止", exceptionMessage = "禁止失败") | 
|     public FebsResponse closeAccount(@NotNull(message = "{required}") @PathVariable Long id) { | 
|         return mallMemberService.closeAccount(id); | 
|     } | 
|   | 
|     /** | 
|      * 会员列表---开启 | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @GetMapping("openAccount/{id}") | 
|     @ControllerEndpoint(operation = "会员列表---开启", exceptionMessage = "开启失败") | 
|     public FebsResponse openAccount(@NotNull(message = "{required}") @PathVariable Long id) { | 
|         return mallMemberService.openAccount(id); | 
|     } | 
|   | 
|     /** | 
|      * 会员列表-资金流水 | 
|      */ | 
|     @GetMapping("/moneyFlow") | 
|     public FebsResponse moneyFlow(QueryRequest request, MallMember mallMember, Integer parentId) { | 
|         if(parentId==null){ | 
|             ViewMallMemberController.idFromMoneyFlow=0; | 
|         } | 
|         mallMember.setId(ViewMallMemberController.idFromMoneyFlow); | 
|         Map<String, Object> dataTable = getDataTable(mallMemberService.moneyFlow(request, mallMember)); | 
|         return new FebsResponse().success().data(dataTable); | 
|     } | 
|   | 
|     /** | 
|      * 会员列表-系统拨付 | 
|      */ | 
|     @PostMapping("updateSystemPay") | 
|     @ControllerEndpoint(operation = "会员列表-系统拨付", exceptionMessage = "操作失败") | 
|     public FebsResponse updateSystemPay(@Valid MallSystemPayDto mallSystemPayDto) { | 
|         return mallMemberService.updateSystemPay(mallSystemPayDto); | 
|     } | 
|   | 
|     /** | 
|      * 资金流水-列表 | 
|      * @param moneyFlowListDto | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getMoneyFlowList") | 
|     public FebsResponse getMoneyFlowList(MoneyFlowListDto moneyFlowListDto, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getMoneyFlowListInPage(moneyFlowListDto, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * 会员提现-列表 | 
|      * @param moneyChargeListDto | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getMoneyChargeList") | 
|     public FebsResponse getMoneyChargeList(MoneyChargeListDto moneyChargeListDto, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getMoneyChargeListInPage(moneyChargeListDto, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * 会员提现-同意 | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @GetMapping("chargeAgree/{id}") | 
|     @ControllerEndpoint(operation = "会员提现-同意", exceptionMessage = "操作失败") | 
|     public FebsResponse chargeAgree(@NotNull(message = "{required}") @PathVariable Long id) { | 
|         return mallMemberService.chargeAgree(id); | 
|     } | 
|   | 
|     /** | 
|      * 会员提现-拒绝 | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @GetMapping("chargeDisagree/{id}") | 
|     @ControllerEndpoint(operation = "会员提现-拒绝", exceptionMessage = "操作失败") | 
|     public FebsResponse chargeDisagree(@NotNull(message = "{required}") @PathVariable Long id) { | 
|         return mallMemberService.chargeDisagree(id); | 
|     } | 
|   | 
|     /** | 
|      * 代理列表 | 
|      * @param agentDto | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getAgentList") | 
|     public FebsResponse getAgentList(AgentDto agentDto, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getAgentList(agentDto, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * 代理级别-列表 | 
|      * @param agentLevelDto | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getAgentLevelList") | 
|     public FebsResponse getAgentLevelList(AgentLevelDto agentLevelDto, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getAgentLevelList(agentLevelDto, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * 代理级别-更新 | 
|      */ | 
|     @PostMapping("agentLevelUpdate") | 
|     @ControllerEndpoint(operation = "商家支付方式-更新", exceptionMessage = "操作失败") | 
|     public FebsResponse agentLevelUpdate(@Valid AgentLevelUpdateDto agentLevelUpdateDto) { | 
|         return mallMemberService.agentLevelUpdate(agentLevelUpdateDto); | 
|     } | 
|   | 
|     /** | 
|      * 代理-等级选择Option | 
|      */ | 
|     @GetMapping("getAgentLevelOption/tree") | 
|     @ControllerEndpoint(exceptionMessage = "获取等级失败") | 
|     public List<AdminAgentLevelOptionTreeVo> getAgentLevelOption(){ | 
|         return mallMemberService.getAgentLevelOption(); | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 代理列表-全部成员 | 
|      */ | 
|     @GetMapping("/agentChild") | 
|     public FebsResponse agentChild(QueryRequest request, MallMember mallMember, Integer parentId) { | 
|         if(parentId==null){ | 
|             ViewMallMemberController.idFromAgentAllMember=0; | 
|         } | 
|         mallMember.setId(ViewMallMemberController.idFromAgentAllMember); | 
|         Map<String, Object> dataTable = getDataTable(mallMemberService.agentChild(request, mallMember)); | 
|         return new FebsResponse().success().data(dataTable); | 
|     } | 
|   | 
|     /** | 
|      * 代理列表---激活 | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @GetMapping("activateAccount/{id}") | 
|     @ControllerEndpoint(operation = "代理列表---激活", exceptionMessage = "操作失败") | 
|     public FebsResponse activateAccount(@NotNull(message = "{required}") @PathVariable Long id) { | 
|         return mallMemberService.activateAccount(id); | 
|     } | 
|   | 
|     /** | 
|      * 代理列表-设置代理级别 | 
|      */ | 
|     @PostMapping("agentLevelSetUpdate") | 
|     @ControllerEndpoint(operation = "代理列表-设置代理级别", exceptionMessage = "操作失败") | 
|     public FebsResponse agentLevelSetUpdate(@Valid AgentLevelSetUpdateDto agentLevelSetUpdateDto) { | 
|         return mallMemberService.agentLevelSetUpdate(agentLevelSetUpdateDto); | 
|     } | 
|   | 
|     /** | 
|      * 奖励设置-列表 | 
|      * @param rankAwardDto | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getRankAwardList") | 
|     public FebsResponse getRankAwardList(RankAwardDto rankAwardDto, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getRankAwardList(rankAwardDto, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * 奖励设置-更新 | 
|      */ | 
|     @PostMapping("rankAwardUpdate") | 
|     @ControllerEndpoint(operation = "奖励设置-更新", exceptionMessage = "操作失败") | 
|     public FebsResponse rankAwardUpdate(@Valid RankAwardUpdateDto rankAwardUpdateDto) { | 
|         return mallMemberService.rankAwardUpdate(rankAwardUpdateDto); | 
|     } | 
|   | 
|     /** | 
|      * App版本-列表 | 
|      * @param appVersion | 
|      * @param request | 
|      * @return | 
|      */ | 
|     @GetMapping("getAppVersionList") | 
|     public FebsResponse getAppVersionList(AppVersion appVersion, QueryRequest request) { | 
|         Map<String, Object> data = getDataTable(mallMemberService.getAppVersionList(appVersion, request)); | 
|         return new FebsResponse().success().data(data); | 
|     } | 
|   | 
|     /** | 
|      * App版本-删除 | 
|      */ | 
|     @GetMapping("delAppVersion/{id}") | 
|     @ControllerEndpoint(operation = " App版本-删除", exceptionMessage = "操作失败") | 
|     public FebsResponse delAppVersion(@NotNull(message = "{required}") @PathVariable Long id) { | 
|         return mallMemberService.delCategary(id); | 
|     } | 
|   | 
|     /** | 
|      * App版本-新增 | 
|      */ | 
|     @PostMapping("addAppVersion") | 
|     @ControllerEndpoint(operation = " App版本-新增", exceptionMessage = "操作失败") | 
|     public FebsResponse addAppVersion(@Valid AppVersion appVersion) { | 
|         return mallMemberService.addAppVersion(appVersion); | 
|     } | 
|   | 
|     /** | 
|      * App版本-更新 | 
|      */ | 
|     @PostMapping("updateAppVersion") | 
|     @ControllerEndpoint(operation = "App版本-更新", exceptionMessage = "操作失败") | 
|     public FebsResponse updateAppVersion(@Valid AppVersion appVersion) { | 
|         return mallMemberService.updateAppVersion(appVersion); | 
|     } | 
|   | 
|   | 
|     @PostMapping("resetPwd/{id}") | 
|     @ControllerEndpoint(operation = "会员列表---重置密码", exceptionMessage = "重置密码失败") | 
|     public FebsResponse resetPwd(@PathVariable("id") Long id) { | 
|         return mallMemberService.resetPwd(id); | 
|     } | 
|   | 
|     @GetMapping("shopApplyList") | 
|     @ControllerEndpoint(operation = "申请通道列表", exceptionMessage = "获取失败") | 
|     public FebsResponse shopApplyList(MallShopApply mallShopApply, QueryRequest request) { | 
|         return new FebsResponse().success().data(getDataTable(mallMemberService.findShopApplyListInPage(mallShopApply, request))); | 
|     } | 
|   | 
|     @PostMapping("applyCheckAgree/{id}") | 
|     public FebsResponse applyCheckAgree(@PathVariable Long id) { | 
|         mallMemberService.applyCheckAgree(id); | 
|         return new FebsResponse().success().message("操作成功"); | 
|     } | 
|   | 
|     @PostMapping(value = "applyCheckDisAgree/{id}") | 
|     public FebsResponse applyCheckDisAgree(@PathVariable Long id) { | 
|         mallMemberService.applyCheckDisAgree(id); | 
|         return new FebsResponse().success().message("操作成功"); | 
|     } | 
|   | 
| } |