修改了商家查看自己的入驻信息功能模块

This commit is contained in:
XinYi Song 2021-12-17 10:05:10 +08:00
parent 5203337650
commit 794b90fb49
2 changed files with 4 additions and 3 deletions

View File

@ -56,10 +56,11 @@ public interface BusinessDao extends JpaRepository<BusinessEntity,Long> {
*/ */
List<BusinessEntity> findAllByBusinessCountryAndAndBusinessType(String businessCounty, String type); List<BusinessEntity> findAllByBusinessCountryAndAndBusinessType(String businessCounty, String type);
/**| /**
* 根据商家用户id查询自己的入驻信息 * 根据商家用户id查询自己的入驻信息
* @param id * @param id
* @param businessType
* @return * @return
*/ */
BusinessEntity findByBusinessId(Integer id); BusinessEntity findByBusinessIdAndBusinessType(Integer id,String businessType);
} }

View File

@ -122,7 +122,7 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService
@Override @Override
public String findBusinessById(Integer businessId) { public String findBusinessById(Integer businessId) {
Locale locale = LocaleContextHolder.getLocale(); Locale locale = LocaleContextHolder.getLocale();
BusinessEntity byBusinessId = businessDao.findByBusinessId(businessId); BusinessEntity byBusinessId = businessDao.findByBusinessIdAndBusinessType(businessId,"1");
if(byBusinessId == null){ if(byBusinessId == null){
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"你还未入驻,请先入驻!",locale); return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"你还未入驻,请先入驻!",locale);
} }