Commit a60f76cd by guojuxing

联合商户授权,日志信息冗余

parent f34ab407
......@@ -12,6 +12,11 @@ import java.util.List;
*/
public class UnionEnterpriseAuthResNoticeDTO implements Serializable{
private static final long serialVersionUID = -7222957448764839407L;
/**
* TransmitDataDTO transmitDataDTO = TransmitDataHolder.get(); json字符串
*/
private String logParams;
/**
* 自有商户ID
*/
......@@ -28,7 +33,7 @@ public class UnionEnterpriseAuthResNoticeDTO implements Serializable{
private Long storeResource;
/**
* 商品资源
* 废弃字段。商品资源
*/
private Long goodsResourceId;
......@@ -47,6 +52,17 @@ public class UnionEnterpriseAuthResNoticeDTO implements Serializable{
*/
private Integer resourceGroupChangeType;
/**
* 短信签名多选,英文逗号隔开
*/
private String smsId;
/**
* 商品资源配置。json字符串。key:一个商户ID Value:商品选择器ID value如果为空,则说明该商户不授予商品资源
* 可转化为Map<Integer, Long>,遍历map
*/
private String goodsResourceConfig;
public Long getStoreResource() {
return storeResource;
}
......@@ -113,6 +129,33 @@ public class UnionEnterpriseAuthResNoticeDTO implements Serializable{
return this;
}
public String getLogParams() {
return logParams;
}
public UnionEnterpriseAuthResNoticeDTO setLogParams(String logParams) {
this.logParams = logParams;
return this;
}
public String getSmsId() {
return smsId;
}
public UnionEnterpriseAuthResNoticeDTO setSmsId(String smsId) {
this.smsId = smsId;
return this;
}
public String getGoodsResourceConfig() {
return goodsResourceConfig;
}
public UnionEnterpriseAuthResNoticeDTO setGoodsResourceConfig(String goodsResourceConfig) {
this.goodsResourceConfig = goodsResourceConfig;
return this;
}
@Override
public String toString() {
return "UnionEnterpriseAuthResNoticeDTO{" +
......@@ -123,6 +166,9 @@ public class UnionEnterpriseAuthResNoticeDTO implements Serializable{
", userResourceInfoList=" + userResourceInfoList +
", customAreaDTO=" + customAreaDTO +
", resourceGroupChangeType=" + resourceGroupChangeType +
", logParams=" + logParams +
", smsId=" + smsId +
", goodsResourceConfig=" + goodsResourceConfig +
'}';
}
}
......@@ -36,10 +36,11 @@ public interface ResourceGroupApiService {
* @param newResourceGroup
* @param oldResourceGroup
* @param resourceGroupChangeType 1 : 初始化 2:资源组变更, 默认1
* @param logParams TransmitDataDTO transmitDataDTO = TransmitDataHolder.get();
* @return
*/
ServiceResponse<Void> syncResourceAuthChangeMQ(Integer ownEnterpriseId, Integer unionEnterpriseId,
ResourceGroupDTO newResourceGroup, ResourceGroupDTO oldResourceGroup, Integer resourceGroupChangeType);
ResourceGroupDTO newResourceGroup, ResourceGroupDTO oldResourceGroup, Integer resourceGroupChangeType, String logParams);
/**
* 分页查询
......
......@@ -4,6 +4,8 @@ import java.util.*;
import java.util.stream.Collectors;
import com.gic.enterprise.service.EnterpriseLicensePatternApiService;
import com.gic.platform.dto.TransmitDataDTO;
import com.gic.platform.manager.TransmitDataHolder;
import com.gic.store.service.StoreAuthorizationApiService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
......@@ -91,8 +93,10 @@ public class ResourceGroupApiServiceImpl implements ResourceGroupApiService{
// 保存商户下联合商户资源组授权范围变化日志
unionStoreChangeApiService.save(unionEnterpriseAuthDTO.getOwnEnterpriseId(), unionEnterpriseAuthDTO.getUnionEnterpriseId());
//通知业务方数据同步联合调整
TransmitDataDTO transmitDataDTO = TransmitDataHolder.get();
syncResourceAuthChangeMQ(unionEnterpriseAuthDTO.getOwnEnterpriseId(), unionEnterpriseAuthDTO.getUnionEnterpriseId(),
resourceGroup, oldResourceGroup, 2);
resourceGroup, oldResourceGroup, 2, JSON.toJSONString(transmitDataDTO));
}
resourceGroupService.editResourceGroup(resourceGroup);
......@@ -101,7 +105,7 @@ public class ResourceGroupApiServiceImpl implements ResourceGroupApiService{
@Override
public ServiceResponse<Void> syncResourceAuthChangeMQ(Integer ownEnterpriseId, Integer unionEnterpriseId,
ResourceGroupDTO newResourceGroup, ResourceGroupDTO oldResourceGroup, Integer resourceGroupChangeType) {
ResourceGroupDTO newResourceGroup, ResourceGroupDTO oldResourceGroup, Integer resourceGroupChangeType, String logParams) {
UnionEnterpriseAuthResNoticeDTO unionEnterpriseAuthResNoticeDTO = new UnionEnterpriseAuthResNoticeDTO();
unionEnterpriseAuthResNoticeDTO.setGoodsResourceId(newResourceGroup.getGoodsResourceId());
unionEnterpriseAuthResNoticeDTO.setStoreResource(newResourceGroup.getStoreResource());
......@@ -109,6 +113,10 @@ public class ResourceGroupApiServiceImpl implements ResourceGroupApiService{
unionEnterpriseAuthResNoticeDTO.setUnionEnterpriseId(unionEnterpriseId);
unionEnterpriseAuthResNoticeDTO.setResourceGroupChangeType(resourceGroupChangeType);
unionEnterpriseAuthResNoticeDTO.setLogParams(logParams);
unionEnterpriseAuthResNoticeDTO.setSmsId(newResourceGroup.getSmsId());
unionEnterpriseAuthResNoticeDTO.setGoodsResourceConfig(newResourceGroup.getGoodsResourceConfig());
//门店通知
if (newResourceGroup.getStoreResource() != null) {
try {
......
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