Commit 0ea97ab6 by zhiwj

商户下是否存在有未完善的门店

parent 3d5cd577
......@@ -534,4 +534,15 @@ public interface StoreApiService {
* @throws
*/
ServiceResponse<List<StoreDTO>> listStoreFromDb(Integer enterpriseId, StoreSearchDbDTO storeSearchDbDTO);
/**
* hasUnCompleteStatusStore 商户下不启用的门店里是否存在有未完善的门店
* @Title: hasUnCompleteStatusStore
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Boolean> true:有存在未完善的门店, false:所有门店都已完善
* @throws
*/
ServiceResponse<Boolean> hasUnCompleteStatusStore(Integer enterpriseId);
}
......@@ -76,7 +76,7 @@ public interface TabStoreInfoMapper {
* @Title: countByBrandId
* @Description:
* @author zhiwj
* @param brandId
* @param brandId
* @return java.lang.Integer
* @throws
*/
......@@ -247,4 +247,15 @@ public interface TabStoreInfoMapper {
* @throws
*/
Integer getStoreIdByStoreInfoId(@Param("enterpriseId") Integer enterpriseId, @Param("storeInfoId") Integer storeInfoId);
/**
* hasUnCompleteStatusStore
* @Title: hasUnCompleteStatusStore
* @Description:
* @author zhiwj
* @param enterpriseId
* @return boolean
* @throws
*/
Integer hasUnCompleteStatusStore(@Param("enterpriseId") Integer enterpriseId);
}
\ No newline at end of file
......@@ -492,4 +492,15 @@ public interface StoreService {
* @throws
*/
int refreshStoreIndex(Integer enterpriseId, Integer storeGroupId);
/**
* hasUnCompleteStatusStore 商户下不启用的门店里是否存在有未完善的门店
* @Title: hasUnCompleteStatusStore
* @Description:
* @author zhiwj
* @param enterpriseId
* @return boolean
* @throws
*/
boolean hasUnCompleteStatusStore(Integer enterpriseId);
}
......@@ -572,4 +572,9 @@ public class StoreServiceImpl implements StoreService {
public int refreshStoreIndex(Integer enterpriseId, Integer storeGroupId) {
return this.tabStoreMapper.refreshStoreIndexByStoreGroup(enterpriseId, storeGroupId);
}
@Override
public boolean hasUnCompleteStatusStore(Integer enterpriseId) {
return tabStoreInfoMapper.hasUnCompleteStatusStore(enterpriseId) != null;
}
}
\ No newline at end of file
......@@ -382,6 +382,11 @@ public class StoreApiServiceImpl implements StoreApiService {
}
@Override
public ServiceResponse<Boolean> hasUnCompleteStatusStore(Integer enterpriseId) {
return ServiceResponse.success(this.storeService.hasUnCompleteStatusStore(enterpriseId));
}
@Override
public ServiceResponse<Integer> countByOverflowStatus(Integer enterpriseId) {
this.storeService.countByOverflowStatus(enterpriseId, 0);
return EnterpriseServiceResponse.success(this.storeService.countByOverflowStatus(enterpriseId, 0));
......
......@@ -556,4 +556,14 @@
and t1.store_info_id = #{storeInfoId}
and t2.enterprise_id = #{enterpriseId}
</select>
<select id="hasUnCompleteStatusStore" resultType="java.lang.Integer">
select
1
from tab_store_info t1,tab_store t2 where t1.store_info_id = t2.store_info_id
and t2.enterprise_id = #{enterpriseId}
and t2.own_type = 0
and t1.status = 2
and t1.complete_status = 0
limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -459,6 +459,12 @@ public class StoreController extends DownloadUtils {
return RestResponse.success(EntityUtil.changeEntityListByJSON(StoreExportFieldVO.class, listSource));
}
@RequestMapping("/has-uncomplete-status-store")
public RestResponse hasUnCompleteStatusStore() {
ServiceResponse<Boolean> serviceResponse = this.storeApiService.hasUnCompleteStatusStore(UserDetailUtils.getUserDetail().getEnterpriseId());
return ResultControllerUtils.commonResult(serviceResponse);
}
@RequestMapping("export-store-list")
public RestResponse exportStoreList(HttpServletRequest request, @RequestBody StoreExportQO storeExportQO){
storeExportQO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
......
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