| | |
| | | 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.MoneyChargeListDto; |
| | | import cc.mrbird.febs.mall.dto.MoneyFlowListDto; |
| | | 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.MallOrderRefund; |
| | | 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.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | 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; |
| | | |
| | | @Slf4j |
| | |
| | | if(parentId==null){ |
| | | ViewMallMemberController.idFromMoneyFlow=0; |
| | | } |
| | | mallMember.setId(ViewMallOrderController.idFromRefund); |
| | | mallMember.setId(ViewMallMemberController.idFromMoneyFlow); |
| | | Map<String, Object> dataTable = getDataTable(mallMemberService.moneyFlow(request, mallMember)); |
| | | return new FebsResponse().success().data(dataTable); |
| | | } |
| | |
| | | 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 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); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |