|
|
@@ -367,18 +367,19 @@ public class CallbackController {
|
|
|
for (int j = 0; j < dataArr.size(); j++) {
|
|
|
JSONObject dataJson = dataArr.getJSONObject(j);
|
|
|
Long advertiser_id1 = dataJson.getLong("advertiser_id");
|
|
|
+ String advertiserName = dataJson.getString("advertiser_name");
|
|
|
data.put("advertiser_id", advertiser_id1);
|
|
|
CtopOauthToken token = new CtopOauthToken(advertiserId, data);
|
|
|
ctopOauthTokenService.saveOrUpdate(token);
|
|
|
//获取广告主信息
|
|
|
- Map<String, Object> advertiserDataMap = advertiserDataService.getAdvertiserInfo(advertiser_id1 + "", data.getString("access_token"));
|
|
|
- Boolean getSuccess = (Boolean) advertiserDataMap.get("success");
|
|
|
+ // Map<String, Object> advertiserDataMap = advertiserDataService.getAdvertiserInfo(advertiser_id1 + "", data.getString("access_token"));
|
|
|
+ /* Boolean getSuccess = (Boolean) advertiserDataMap.get("success");
|
|
|
if (null == getSuccess || !getSuccess) {
|
|
|
log.info("获取广告主信息失败,accountId:{},message:{}", token.getAccountId(), (String) advertiserDataMap.get("message"));
|
|
|
text.append("账户id:" + advertiser_id + ",暂未获取数据权限,请检查账户")
|
|
|
.append("<br/>");
|
|
|
continue;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
Long accountId = token.getAccountId();
|
|
|
QueryWrapper<UserAllocation> userAllocationQueryWrapper = new QueryWrapper<>();
|
|
|
@@ -388,11 +389,11 @@ public class CallbackController {
|
|
|
userAllocationQueryWrapper.last("limit 1");
|
|
|
UserAllocation checkUserAllocation = allocationMapper.selectOne(userAllocationQueryWrapper);
|
|
|
if (!Check.isNull(checkUserAllocation)) {
|
|
|
- text.append("账户id:" + accountId + ",授权名称为:" + (String) advertiserDataMap.get("name") + ",绑定失败,失败原因:已被" + checkUserAllocation.getUserName() + "绑定。")
|
|
|
+ text.append("账户id:" + accountId + ",授权名称为:" + advertiserName + ",绑定失败,失败原因:已被" + checkUserAllocation.getUserName() + "绑定。")
|
|
|
.append("<br/>");
|
|
|
continue;
|
|
|
}
|
|
|
- text.append("账户id:" + accountId + ",授权名称为:" + (String) advertiserDataMap.get("name") + ",绑定成功。").append("<br/>");
|
|
|
+ text.append("账户id:" + accountId + ",授权名称为:" + advertiserName + ",绑定成功。").append("<br/>");
|
|
|
String systemType = json.getString("systemType");
|
|
|
UserAllocation userAllocation = new UserAllocation();
|
|
|
userAllocation.setUserId(userId);
|
|
|
@@ -401,7 +402,7 @@ public class CallbackController {
|
|
|
userAllocation.setMediaId(mediaId);
|
|
|
userAllocation.setProjectId(projectId);
|
|
|
userAllocation.setSystemType(systemType);
|
|
|
- userAllocation.setAuthName((String) advertiserDataMap.get("name"));
|
|
|
+ userAllocation.setAuthName(advertiserName);
|
|
|
if (null != authBeginTime && !"".equals(authBeginTime.trim())) {
|
|
|
userAllocation.setAuthBeginTime(authBeginTime);
|
|
|
}
|