Commit c3faae68 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

parents 0690b554 be0e1f16
......@@ -45,6 +45,17 @@ public interface StoreApiService {
* @throws
*/
ServiceResponse<Integer> saveStoreForPosMember(Integer enterpriseId, String storeCode, String storeName, Integer regionId, String cardNO);
/**
* @Title: countByOverflowStatus
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse<Integer> countByOverflowStatus(Integer enterpriseId);
/**
* @Title: listStore
* @Description: 分页门店列表 查es
......
......@@ -284,6 +284,12 @@ public class StoreApiServiceImpl implements StoreApiService {
return EnterpriseServiceResponse.failure(ErrorCode.UNKNOWN_ERROR.getCode(), "商户没有门店license");
}
@Override
public ServiceResponse<Integer> countByOverflowStatus(Integer enterpriseId) {
this.storeService.countByOverflowStatus(enterpriseId, 0);
return EnterpriseServiceResponse.success(this.storeService.countByOverflowStatus(enterpriseId, 0));
}
/**
* 修改日志
*/
......
......@@ -280,10 +280,12 @@ public class StoreController extends DownloadUtils {
@RequestMapping("store-license-limit")
public RestResponse storeLicenseLimit() {
ServiceResponse<List<EnterpriseLicenseDTO>> listEnterpriseLicense = this.enterpriseApiService.listEnterpriseLicense(UserDetailUtils.getUserDetail().getEnterpriseId());
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
ServiceResponse<List<EnterpriseLicenseDTO>> listEnterpriseLicense = this.enterpriseApiService.listEnterpriseLicense(enterpriseId);
if (listEnterpriseLicense.isSuccess() && CollectionUtils.isNotEmpty(listEnterpriseLicense.getResult())) {
if (listEnterpriseLicense.getResult().size() == 4) {
return RestResponse.success(listEnterpriseLicense.getResult().get(3).getUpperLimit());
Integer result = this.storeApiService.countByOverflowStatus(enterpriseId).getResult();
return RestResponse.success(listEnterpriseLicense.getResult().get(3).getUpperLimit() - result);
}
}
return RestResponse.success();
......
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