diff --git a/cash-api/account-server/src/main/java/com/czg/controller/admin/AuthorizationController.java b/cash-api/account-server/src/main/java/com/czg/controller/admin/AuthorizationController.java index 5786ec608..5ba1af9d3 100644 --- a/cash-api/account-server/src/main/java/com/czg/controller/admin/AuthorizationController.java +++ b/cash-api/account-server/src/main/java/com/czg/controller/admin/AuthorizationController.java @@ -44,6 +44,7 @@ public class AuthorizationController { /** * 验证码获取 + * * @return 验证码信息 */ @GetMapping("captcha") @@ -53,6 +54,7 @@ public class AuthorizationController { /** * 商户登录 + * * @param loginDTO 登录参数 * @return token信息 */ @@ -79,6 +81,7 @@ public class AuthorizationController { RabbitPublisher rabbitPublisher; @Resource ShopTableService shopTableService; + @GetMapping("test") public CzgResult login(HttpServletRequest request, HttpServletResponse response) throws IOException { // shopTableService.createQrCode(1L, 1, response, request); @@ -87,7 +90,7 @@ public class AuthorizationController { // rabbitPublisher.sendOrderPrintMsg("552"); // printMqListener.orderPrint("1"); // return CzgResult.success(Map.of("token", StpKit.USER.getShopId())); - return CzgResult.success( shopInfoService.getById(1)); + return CzgResult.success(shopInfoService.getById(1)); } /** @@ -97,7 +100,9 @@ public class AuthorizationController { @GetMapping("/userInfo") public CzgResult> getUserInfo() { String account = StpKit.USER.getAccount(); - ShopInfo shopInfo = shopInfoService.queryChain().select(ShopInfo::getId, ShopInfo::getShopName).one(); + ShopInfo shopInfo = shopInfoService.queryChain() + .select(ShopInfo::getId, ShopInfo::getShopName) + .eq(ShopInfo::getId, StpKit.USER.getShopId()).one(); if (account.contains("@")) { account = account.split("@")[1]; } diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopMerchantService.java b/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopMerchantService.java index 4f0adaf19..feccb67dd 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopMerchantService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopMerchantService.java @@ -4,6 +4,8 @@ import com.czg.account.dto.merchant.ShopMerchantEditDTO; import com.czg.account.entity.ShopMerchant; import com.mybatisflex.core.service.IService; +import java.io.Serializable; + /** * 第三方商户进件 服务层。 * @@ -15,4 +17,6 @@ public interface ShopMerchantService extends IService { ShopMerchant detail(); Boolean edit(ShopMerchantEditDTO shopMerchantEditDTO); + @Override + ShopMerchant getById(Serializable id); } diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopMerchantServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopMerchantServiceImpl.java index 38e20d77f..0e7c2bd8c 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopMerchantServiceImpl.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopMerchantServiceImpl.java @@ -6,9 +6,12 @@ import com.czg.account.entity.ShopMerchant; import com.czg.account.service.ShopMerchantService; import com.czg.sa.StpKit; import com.czg.service.account.mapper.ShopMerchantMapper; +import com.czg.utils.AssertUtil; import com.mybatisflex.spring.service.impl.ServiceImpl; import org.apache.dubbo.config.annotation.DubboService; +import java.io.Serializable; + /** * 第三方商户进件 服务层实现。 * @@ -36,4 +39,11 @@ public class ShopMerchantServiceImpl extends ServiceImpl