拉卡拉进件通知加入mcc
This commit is contained in:
@@ -20,6 +20,7 @@ import cn.pluss.platform.user.impl.GeneralPushUtil;
|
||||
import cn.pluss.platform.userApp.UserAppService;
|
||||
import cn.pluss.platform.util.IpUtils;
|
||||
import cn.pluss.platform.util.LogExceptionUtils;
|
||||
import cn.pluss.platform.util.ParametersUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -39,10 +40,7 @@ import org.springframework.web.client.RestTemplate;
|
||||
import javax.annotation.Resource;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@@ -364,14 +362,21 @@ public class LklMerAuditHandler {
|
||||
UserInfo userInfo = userInfoMapper.selectById(userApp.getUserId());
|
||||
log.info("==============>当前需要同步的用户进件数据为::{}<===================", JSONObject.toJSONString(merchantChannelStatus));
|
||||
if (userInfo != null) {
|
||||
MerchantStore merchantStore = new MerchantStore().setMerchantCode(merchantChannelStatus.getMerchantCode());
|
||||
merchantStore = merchantStoreMapper.selectOne(new QueryWrapper<>(merchantStore));
|
||||
QueryWrapper storQueryWrapper= new QueryWrapper<>();
|
||||
storQueryWrapper.eq("merchantCode",merchantChannelStatus.getMerchantCode());
|
||||
MerchantStore merchantStore = merchantStoreMapper.selectOne(storQueryWrapper);
|
||||
MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getMerchantBaseInfoByMerchantCode(merchantChannelStatus.getMerchantCode());
|
||||
QueryWrapper<MerchantImage> queryWrapper = new QueryWrapper<MerchantImage>()
|
||||
.eq("merchantCode", merchantChannelStatus.getMerchantCode()).eq("photoType", "06");
|
||||
MerchantImage merchantImage = merchantImageMapper.selectOne(queryWrapper);
|
||||
//String baseUrl = "https://life.sxczgkj.cn/web/wmerchant.php?c=site&a=entry&ctrl=store&ac=oauth&op=add_merchan&do=web&m=we7_wmall&i=1";
|
||||
String baseUrl = "https://kysh.sxczgkj.cn/javaApi/java-api/add-store";
|
||||
List<String> mccList = ParametersUtil.url;
|
||||
if(ObjectUtil.isEmpty(mccList)||mccList.size()<=0){
|
||||
log.error("没有配置对应的通之地址");
|
||||
return;
|
||||
}
|
||||
mccList.stream().parallel().forEach(it->{
|
||||
String baseUrl = it.toString();
|
||||
StringBuilder sb = new StringBuilder(baseUrl);
|
||||
sb.append("?title=").append(merchantBaseInfo.getAlias());
|
||||
sb.append("&password=").append(userInfo.getPassword().toLowerCase());
|
||||
@@ -402,6 +407,7 @@ public class LklMerAuditHandler {
|
||||
// 请求生成店铺j
|
||||
String result = restTemplate.getForObject(sb.toString(), String.class);
|
||||
log.info("=============>请求生成店铺URL:{},请求响应返回的参数为:{}<===============", sb.toString(), result);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user