From 794b90fb4917babedb5289bededcc6f8ced508f1 Mon Sep 17 00:00:00 2001 From: XinYi Song <2037158277@qq.com> Date: Fri, 17 Dec 2021 10:05:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=87=AA=E5=B7=B1=E7=9A=84=E5=85=A5=E9=A9=BB?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/dao/BusinessDao.java | 5 +++-- .../com/xkrs/service/impl/MerchantSettlementServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xkrs/dao/BusinessDao.java b/src/main/java/com/xkrs/dao/BusinessDao.java index 8c9edee..4bde171 100644 --- a/src/main/java/com/xkrs/dao/BusinessDao.java +++ b/src/main/java/com/xkrs/dao/BusinessDao.java @@ -56,10 +56,11 @@ public interface BusinessDao extends JpaRepository { */ List findAllByBusinessCountryAndAndBusinessType(String businessCounty, String type); - /**| + /** * 根据商家用户id查询自己的入驻信息 * @param id + * @param businessType * @return */ - BusinessEntity findByBusinessId(Integer id); + BusinessEntity findByBusinessIdAndBusinessType(Integer id,String businessType); } diff --git a/src/main/java/com/xkrs/service/impl/MerchantSettlementServiceImpl.java b/src/main/java/com/xkrs/service/impl/MerchantSettlementServiceImpl.java index 037d289..d6d4adb 100644 --- a/src/main/java/com/xkrs/service/impl/MerchantSettlementServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/MerchantSettlementServiceImpl.java @@ -122,7 +122,7 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService @Override public String findBusinessById(Integer businessId) { Locale locale = LocaleContextHolder.getLocale(); - BusinessEntity byBusinessId = businessDao.findByBusinessId(businessId); + BusinessEntity byBusinessId = businessDao.findByBusinessIdAndBusinessType(businessId,"1"); if(byBusinessId == null){ return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"你还未入驻,请先入驻!",locale); }