|
|
@@ -96,9 +96,11 @@ public class ChannelServiceImpl implements IChannelService {
|
|
|
Set<ChangDuAppDistributor> adds = new HashSet<>();
|
|
|
for (JSONObject appDistributor : distributorApp) {
|
|
|
String appId = appDistributor.getString("app_id");
|
|
|
+ String appName = appDistributor.getString("app_name");
|
|
|
String apiKey = appDistributor.getString("api_key");
|
|
|
String distributorId = appDistributor.getString("distributor_id");
|
|
|
String changduAccountId = appDistributor.getString("changdu_account_id");
|
|
|
+ String accountName = appDistributor.getString("account_name");
|
|
|
int thisPageIndex = 0;
|
|
|
int pageSize = 50;
|
|
|
int totalPageIndex = 0;
|
|
|
@@ -128,6 +130,7 @@ public class ChannelServiceImpl implements IChannelService {
|
|
|
distributorConfig.setChangduAccountId(changduAccountId);
|
|
|
distributorConfig.setChannelType(3);
|
|
|
distributorConfig.setApiKey(apiKey);
|
|
|
+ distributorConfig.setDistributorName(accountName + "-" + appName + "-" + distributorConfig.getNickName());
|
|
|
log.info("番茄获取小程序绑定的渠道信息 {}", distributorConfig);
|
|
|
adds.add(distributorConfig);
|
|
|
}
|
|
|
@@ -159,6 +162,7 @@ public class ChannelServiceImpl implements IChannelService {
|
|
|
String changduAccountId = didKey.getString("changduAccountId");
|
|
|
String distributorId = didKey.getString("distributorId");
|
|
|
String apiKey = didKey.getString("apiKey");
|
|
|
+ String accountName = didKey.getString("accountName");
|
|
|
String url = "https://www.changdunovel.com/novelsale/openapi/package_info/v1/";
|
|
|
String ts = String.valueOf(System.currentTimeMillis()).substring(0, 10);
|
|
|
String sign = getSign(distributorId, apiKey, ts);
|
|
|
@@ -177,6 +181,7 @@ public class ChannelServiceImpl implements IChannelService {
|
|
|
JSONObject resultJson = result.getJSONObject(i);
|
|
|
resultJson.put("changdu_account_id", changduAccountId);
|
|
|
resultJson.put("api_key", apiKey);
|
|
|
+ resultJson.put("account_name", accountName);
|
|
|
log.info("番茄获取账户内快应用/公众号列表 {}", resultJson);
|
|
|
appDistributors.add(resultJson);
|
|
|
}
|