|
@@ -154,14 +154,42 @@ class Mvp:
|
|
|
'''
|
|
|
|
|
|
# 根据用户uuid获取城市信息
|
|
|
- sql_16 = 'SELECT a.uuid, b.sub_option_content FROM f_t_daren_score_2 a LEFT JOIN d_shangju_tiku_02 b ON ' \
|
|
|
- 'a.testcase_id = b.testcase_id WHERE a.sub_question_id = b.sub_question_id AND (a.score = b.score OR ' \
|
|
|
- 'a.score = b.sub_option_id) AND a.uuid = %s AND a.sub_question_id = 303 and a.status = b.status = 1 '
|
|
|
+ sql_16 = '''
|
|
|
+ SELECT
|
|
|
+ a.uuid,
|
|
|
+ b.sub_option_content
|
|
|
+ FROM
|
|
|
+ f_t_daren_score_2 a
|
|
|
+ LEFT JOIN d_shangju_tiku_02 b ON a.testcase_id = b.testcase_id
|
|
|
+ WHERE
|
|
|
+ a.sub_question_id = b.sub_question_id
|
|
|
+ AND (
|
|
|
+ a.score = b.score
|
|
|
+ OR a.score = b.sub_option_id
|
|
|
+ )
|
|
|
+ AND a.uuid = %s
|
|
|
+ AND b.father_id = 249
|
|
|
+ AND a. STATUS = b. STATUS = 1
|
|
|
+ '''
|
|
|
|
|
|
# 答题人人群分类信息
|
|
|
- sql_17 = 'SELECT a.uuid, b.sub_option_id FROM f_t_daren_score_2 a LEFT JOIN d_shangju_tiku_02 b ON a.testcase_id ' \
|
|
|
- '= b.testcase_id WHERE a.sub_question_id = b.sub_question_id AND (a.score = b.score OR a.score = ' \
|
|
|
- 'b.sub_option_id) AND a.uuid = %s AND a.sub_question_id = 286 and a.status = b.status = 1 '
|
|
|
+ sql_17 = '''
|
|
|
+ SELECT
|
|
|
+ a.uuid,
|
|
|
+ b.sub_option_id
|
|
|
+ FROM
|
|
|
+ f_t_daren_score_2 a
|
|
|
+ LEFT JOIN d_shangju_tiku_02 b ON a.testcase_id = b.testcase_id
|
|
|
+ WHERE
|
|
|
+ a.sub_question_id = b.sub_question_id
|
|
|
+ AND (
|
|
|
+ a.score = b.score
|
|
|
+ OR a.score = b.sub_option_id
|
|
|
+ )
|
|
|
+ AND a.uuid = %s
|
|
|
+ AND b.father_id = 236
|
|
|
+ AND a. STATUS = b. STATUS = 1
|
|
|
+ '''
|
|
|
|
|
|
def __init__(self, path=None):
|
|
|
self.shangju_db = MysqlDB('shangju')
|