Commit 397a87f4 authored by 赵建伟's avatar 赵建伟

update codes

parent 300d7914
......@@ -27,7 +27,7 @@ $JAR_DIR/ctr-estimate-1.0-SNAPSHOT.jar \
--retryInteral 3000 \
--checkpointPath 'hdfs://bj-gmei-hdfs/user/data/flink/ctr-estimate-tag/checkpoint' \
--parallelism 6 \
--startTime '2020-04-04 11:53:00' \
--startTime '2020-04-04 11:56:00' \
>> /data/log/ctr-estimate/ctr-estimate-tag.out 2>&1 &
tail -f /data/log/ctr-estimate/ctr-estimate-tag.out
......
......@@ -70,21 +70,21 @@ public class TidbMysqlAsyncSource extends RichAsyncFunction<CtrEstimateTagEtl, D
if("commodity".equals(type) || "content".equals(type)){
String sql = null;
String cardContentType = ctrEstimateTagEtl.getCardContentType();
Long cardId = ctrEstimateTagEtl.getCardId();
String cardId = ctrEstimateTagEtl.getCardId();
if("commodity".equals(type) && "service".equals(cardContentType)){
sql = String.format("select first_demands,first_positions,first_solutions,second_demands,second_positions,second_solutions,project_tags " +
"from strategy_service_tagv3_info where service_id = '%d'",cardId);
"from strategy_service_tagv3_info where service_id = '%s'",cardId);
}
if("content".equals(type)){
if("diary".equals(cardContentType)){
sql = String.format("select first_demands,first_positions,first_solutions,second_demands,second_positions,second_solutions,project_tags " +
"from strategy_content_tagv3_info where content_id = '%d'",cardId);
"from strategy_content_tagv3_info where content_id = '%s'",cardId);
}else if("tractate".equals(cardContentType)){
sql = String.format("select first_demands,first_positions,first_solutions,second_demands,second_positions,second_solutions,project_tags " +
"from strategy_tractate_tagv3_info where content_id = '%d'",cardId);
"from strategy_tractate_tagv3_info where content_id = '%s'",cardId);
}else if("answer".equals(cardContentType)){
sql = String.format("select first_demands,first_positions,first_solutions,second_demands,second_positions,second_solutions,project_tags " +
"from strategy_answer_tagv3_info where content_id = '%d'",cardId);
"from strategy_answer_tagv3_info where content_id = '%s'",cardId);
}
}
if(StringUtils.isNotBlank(sql)){
......
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