| | |
| | | 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.common.tree.MatrixTree; |
| | | import cc.mrbird.febs.mall.dto.*; |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.service.IAdminMallMemberService; |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberService; |
| | | import cc.mrbird.febs.mall.vo.AdminAgentLevelOptionTreeVo; |
| | | import cc.mrbird.febs.mall.vo.ChargeListExportVo; |
| | | import cc.mrbird.febs.system.entity.Dept; |
| | | import com.alibaba.excel.EasyExcel; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @ControllerEndpoint(operation = "会员列表---开启", exceptionMessage = "开启失败") |
| | | public FebsResponse openAccount(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return mallMemberService.openAccount(id); |
| | | } |
| | | |
| | | /** |
| | | * 会员列表---禁止 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("insideWithYes/{id}") |
| | | @ControllerEndpoint(operation = "会员列表---禁止", exceptionMessage = "禁止失败") |
| | | public FebsResponse insideWithYes(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return mallMemberService.insideWithType(id,1); |
| | | } |
| | | |
| | | /** |
| | | * 会员列表---开启 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("insideWithNo/{id}") |
| | | @ControllerEndpoint(operation = "会员列表---开启", exceptionMessage = "开启失败") |
| | | public FebsResponse insideWithNo(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return mallMemberService.insideWithType(id,2); |
| | | } |
| | | |
| | | @GetMapping("changeIdentityYes/{type}/{id}") |
| | |
| | | registerDto.setPassword("a123456"); |
| | | registerDto.setInviteId(member.getInviteId()); |
| | | registerDto.setName(member.getName()); |
| | | registerDto.setSex(member.getSex()); |
| | | apiMallMemberService.register(registerDto); |
| | | return new FebsResponse().success(); |
| | | } |
| | |
| | | return new FebsResponse().success().data(dataTable); |
| | | } |
| | | |
| | | @GetMapping(value = "/matrixTree") |
| | | public FebsResponse matrixTree() { |
| | | MatrixTree instance = MatrixTree.getInstance(); |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping(value = "/chargeList/excel") |
| | | public void exportChargeList(MoneyChargeListDto moneyChargeListDto, HttpServletResponse response) throws IOException { |
| | | List<ChargeListExportVo> list = this.mallMemberService.findChargeListForExcel(moneyChargeListDto); |
| | | |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName= URLEncoder.encode("提现列表","UTF-8").replaceAll("\\+","%20"); |
| | | response.setHeader("Content-disposition","attachment;filename*=utf-8''"+fileName+".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(),ChargeListExportVo.class).sheet("提现列表").doWrite(list); |
| | | } |
| | | |
| | | } |