Commit 4e636fe9 by 陶光胜

门店品牌变更

parent 50a96bef
......@@ -13,22 +13,22 @@ import com.gic.store.dto.StoreDTO;
public interface StoreAuthorizationApiService {
/**
* authStore 联合商户授权初始化
* authStore 联合商户门店授权接口
* @Title: authStore
* @Description:
* @Description: 联合商户门店授权接口
* @author zhiwj
* @param storeResourceId
* @param toEnterpriseId
* @param enterpriseId
* @param unionEnterpriseId
* @param ownEnterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse<Void> authStore(Integer storeResourceId, Integer toEnterpriseId, Integer enterpriseId);
ServiceResponse<Void> authStore(Integer storeResourceId, Integer unionEnterpriseId, Integer ownEnterpriseId);
/**
* reAuthStore
* @Title: reAuthStore
* @Description:
* @Description: 重新授权接口
* @author zhiwj
* @param key
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
......@@ -85,12 +85,12 @@ public interface StoreAuthorizationApiService {
/**
* cancelStoreAll
* @Title: cancelStoreAll
* @Description:
* @Description: 取消授权接口
* @author zhiwj
* @param fromEnterpriseId
* @param enterpriseId
* @param unionEnterpriseId
* @param OwnEnterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse<Void> cancelStoreAll(Integer fromEnterpriseId, Integer enterpriseId);
ServiceResponse<Void> cancelStoreAll(Integer unionEnterpriseId, Integer OwnEnterpriseId);
}
package com.gic.store.service.outer.impl;
package com.gic.store.service.impl;
import com.gic.store.dao.mapper.TabUnionStoreChangeLogMapper;
import com.gic.store.entity.TabUnionStoreChangeLog;
......
......@@ -65,7 +65,7 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
private StoreBrandService storeBrandService;
@Override
public ServiceResponse<Void> authStore(Integer storeResourceId, Integer toEnterpriseId, Integer enterpriseId) {
public ServiceResponse<Void> authStore(Integer storeResourceId, Integer unionEnterpriseId, Integer ownEnterpriseId) {
StoreWidgetDTO storeWidgetDTO = this.storeWidgetApiService.getStoreWidget(storeResourceId).getResult();
if(storeWidgetDTO == null){
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "门店资源Id不存在");
......@@ -73,18 +73,18 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
String key = ToolUtil.randomUUID();
Integer authMode = storeWidgetDTO.getAuthMode();
if(authMode.equals(AuthModeEnum.NO.getCode())){
this.unionEnterpriseAuthResDetailApiService.unionForStore(UnionEnterpriseAuthDetailStatusEnum.HAS_AUTH.getCode(), enterpriseId, toEnterpriseId, key, "门店资源不授权");
this.unionEnterpriseAuthResDetailApiService.unionForStore(UnionEnterpriseAuthDetailStatusEnum.HAS_AUTH.getCode(), ownEnterpriseId, unionEnterpriseId, key, "门店资源不授权");
return ServiceResponse.success();
}
StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setEnterpriseId(enterpriseId);
storeSearchDTO.setEnterpriseId(ownEnterpriseId);
storeSearchDTO.setSearchJson(storeWidgetDTO.getSearchParam());
Long count = this.storeApiService.queryStoreCountFromEs(storeSearchDTO).getResult();
if(count < 0){
this.unionEnterpriseAuthResDetailApiService.unionForStore(UnionEnterpriseAuthDetailStatusEnum.HAS_AUTH.getCode(), enterpriseId, toEnterpriseId, key, "授权成功");
this.unionEnterpriseAuthResDetailApiService.unionForStore(UnionEnterpriseAuthDetailStatusEnum.HAS_AUTH.getCode(), ownEnterpriseId, unionEnterpriseId, key, "授权成功");
}
this.unionEnterpriseAuthResDetailApiService.unionForStore(UnionEnterpriseAuthDetailStatusEnum.RESOURCE_DEALING.getCode(), enterpriseId, toEnterpriseId, key, "资源授权中");
this.queryStoreByPage(count, storeSearchDTO, toEnterpriseId, enterpriseId, key);
this.unionEnterpriseAuthResDetailApiService.unionForStore(UnionEnterpriseAuthDetailStatusEnum.RESOURCE_DEALING.getCode(), ownEnterpriseId, unionEnterpriseId, key, "资源授权中");
this.queryStoreByPage(count, storeSearchDTO, unionEnterpriseId, ownEnterpriseId, key);
return ServiceResponse.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