diff --git a/service/trade-service-others/trade-service-others-account/src/main/java/com/hchbox/module/controller/AccountInfoController.java b/service/trade-service-others/trade-service-others-account/src/main/java/com/hchbox/module/controller/AccountInfoController.java index aca7b20..e80cf0d 100644 --- a/service/trade-service-others/trade-service-others-account/src/main/java/com/hchbox/module/controller/AccountInfoController.java +++ b/service/trade-service-others/trade-service-others-account/src/main/java/com/hchbox/module/controller/AccountInfoController.java @@ -1,21 +1,15 @@ package com.hchbox.module.controller; import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import cn.hutool.json.JSONObject; import com.hchbox.api.RequestCore; -import com.hchbox.constant.AuthConstants; import com.hchbox.constant.DefaultNumberConstants; -import com.hchbox.module.entity.SellerAccount; -import com.hchbox.module.entity.vo.AccountInfoVO; -import com.hchbox.module.feign.AliPayClient; import com.hchbox.model.param.CommonResult; import com.hchbox.module.service.AccountInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Page; +import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Pageable; import org.springframework.web.bind.annotation.*; @@ -27,29 +21,17 @@ import org.springframework.web.bind.annotation.*; @RequiredArgsConstructor @Api(tags = "账号信息") @RequestMapping("/api") +@Slf4j public class AccountInfoController { - private final AliPayClient aliPayClient; private final AccountInfoService accountInfoService; @Resource private RequestCore requestCore; - @GetMapping("/list") - @ApiOperation("查询主账号下的子账号") - public CommonResult> getAccountAll(HttpServletRequest request, Pageable pageable) { - String token = request.getParameter(AuthConstants.TAO_MI_TOKEN); - Long accountId = aliPayClient.checkSellAccountByPurchaser(token); - if (accountId == DefaultNumberConstants.ZERO_NUMBER) { - return new CommonResult>().forbidden(); - } - AccountInfoVO accountInfoVO = new AccountInfoVO(); - accountInfoVO.setParentId(accountId); - return accountInfoService.getAccountAll(accountInfoVO, pageable); - } - @GetMapping("/parent/accounts") @ApiOperation("查询主账号") - public CommonResult getParentAccount(@RequestParam(value = "sellerNick", required = false) String sellerNick, Pageable pageable) { - return requestCore.getParentAccount(sellerNick, pageable); + public CommonResult getParentAccount(@RequestParam(value = "nickName", required = false) String nickName, Pageable pageable) { + log.info("====={}", nickName); + return requestCore.getParentAccount(nickName, pageable); } @GetMapping("/account/subAccount")