|
@@ -14,6 +14,7 @@ import com.tzld.piaoquan.api.model.vo.WxAccountDatastatVO;
|
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformPlanService;
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformPlanService;
|
|
|
import com.tzld.piaoquan.growth.common.utils.DateUtil;
|
|
import com.tzld.piaoquan.growth.common.utils.DateUtil;
|
|
|
import com.tzld.piaoquan.growth.common.utils.OdpsUtil;
|
|
import com.tzld.piaoquan.growth.common.utils.OdpsUtil;
|
|
|
|
|
+import com.tzld.piaoquan.growth.common.utils.RedisUtils;
|
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -58,6 +59,9 @@ public class ContentPlatformDatastatJob {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ContentPlatformPlanService planService;
|
|
private ContentPlatformPlanService planService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private RedisUtils redisUtils;
|
|
|
|
|
+
|
|
|
@ApolloJsonValue("${unit.price.min:{\"gzh_autoReply\":0.1,\"fwh_push\":0.1,\"qw\":0.15}}")
|
|
@ApolloJsonValue("${unit.price.min:{\"gzh_autoReply\":0.1,\"fwh_push\":0.1,\"qw\":0.15}}")
|
|
|
private Map<String, Double> unitPriceMinConfig;
|
|
private Map<String, Double> unitPriceMinConfig;
|
|
|
|
|
|
|
@@ -1104,4 +1108,23 @@ public class ContentPlatformDatastatJob {
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @XxlJob("syncQwHzAccountLayerTypeJob")
|
|
|
|
|
+ public ReturnT<String> syncQwHzAccountLayerTypeJob(String param) {
|
|
|
|
|
+ String sql = "SELECT partner_channel, layer_type FROM loghubods.feishu_wechat_qw_hz_account_base;";
|
|
|
|
|
+ List<Record> dataList = OdpsUtil.getOdpsData(sql);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(dataList)) {
|
|
|
|
|
+ log.info("syncQwHzAccountLayerTypeJob no data found");
|
|
|
|
|
+ return ReturnT.SUCCESS;
|
|
|
|
|
+ }
|
|
|
|
|
+ for (Record record : dataList) {
|
|
|
|
|
+ String partnerChannel = (String) record.get(0);
|
|
|
|
|
+ String layerType = (String) record.get(1);
|
|
|
|
|
+ if (StringUtils.hasText(partnerChannel) && StringUtils.hasText(layerType)) {
|
|
|
|
|
+ redisUtils.set("cp:qw_hz_layer_type:" + partnerChannel, layerType, RedisUtils.DEFAULT_EXPIRE_TIME);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ log.info("syncQwHzAccountLayerTypeJob done, size: {}", dataList.size());
|
|
|
|
|
+ return ReturnT.SUCCESS;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|