Commit 9a90d510 by zhiwj

提交门店

parent 1af07722
......@@ -320,4 +320,15 @@ public interface StoreApiService {
* @throws
*/
ServiceResponse<Integer> getStoreIdByStoreNameAndStoreCodeAndRegionId(String storeCode, Integer regionId, Integer enterpriseId);
/**
* 查看商户下是否存在门店
* @Title: checkExistStore
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Boolean>
* @throws
*/
ServiceResponse<Boolean> checkExistStore(Integer enterpriseId);
}
......@@ -75,4 +75,6 @@ public interface TabStoreMapper {
List<String> listAllCityId(@Param("enterpriseId") Integer enterpriseId,
@Param("storeBrandId") Integer storeBrandId);
Integer checkExistStore(@Param("enterpriseId") Integer enterpriseId);
}
\ No newline at end of file
......@@ -128,4 +128,6 @@ public interface StoreService {
void updateStore(StoreDTO storeDTO);
TabStore getByStoreCodeAndRegionId(Integer enterpriseId, Integer regionId, String storeCode);
Boolean checkExistStore(Integer enterpriseId);
}
......@@ -505,4 +505,10 @@ public class StoreServiceImpl implements StoreService {
return null;
}
@Override
public Boolean checkExistStore(Integer enterpriseId) {
Integer line = this.tabStoreMapper.checkExistStore(enterpriseId);
return line != null;
}
}
......@@ -787,6 +787,12 @@ public class StoreApiServiceImpl implements StoreApiService {
}
@Override
public ServiceResponse<Boolean> checkExistStore(Integer enterpriseId) {
Boolean exist = this.storeService.checkExistStore(enterpriseId);
return EnterpriseServiceResponse.success(exist);
}
@Override
public ServiceResponse<StoreDTO> getStoreById(Integer enterpriseId, Integer storeId) {
String key = Constants.STORE_KEY + enterpriseId + ":" + storeId;
......
......@@ -232,4 +232,10 @@
group by city_id
ORDER BY count(1) desc
</select>
<select id="checkExistStore" resultType="int">
select
1
from tab_store
where enterprise_id = #{enterpriseId} and own_type = 0
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment