Przeglądaj źródła

优质定向V0.2

liyuyi@c-top.com.cn 3 lat temu
rodzic
commit
9cf5079994

+ 1 - 3
.idea/ai_target.iml

@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module type="PYTHON_MODULE" version="4">
   <component name="NewModuleRootManager">
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
-    </content>
+    <content url="file://$MODULE_DIR$" />
     <orderEntry type="jdk" jdkName="ai_target_test_env" jdkType="Python SDK" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>

+ 1 - 1
ai_callback_handler.py

@@ -12,7 +12,7 @@ curr_path = os.path.abspath(os.path.dirname(__file__))
 project_root_path = curr_path[:curr_path.find("ai_target") + len("ai_target")]
 sys.path.append(project_root_path)
 
-from config.url_and_db import jeecg_db, db_config_info
+from config.url_and_db import db_config_info
 
 logger.remove()  # 删去 import logger之后自动产生的handler,不删除的话会出现重复输出的现象
 logger.add("/data/pythonProject/ai_target/logs/ai_callback.{time:YYYY-MM-DD}.log",

+ 1 - 1
ai_target_create_ads.py

@@ -495,7 +495,7 @@ class GetTargetAndCreateAds(object):
             replace('{{广告位置}}', scene_id)
 
         # 3-5 日期, 在拼装广告组和创意层级函数中获取
-        now_date = datetime.datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
+        now_date = datetime.datetime.now().strftime('%Y-%m-%d_%H:%M')
         if '日期' in group_params['unit_name']:
             unit_name = unit_name.replace('{{日期}}', now_date)
         else:

+ 1 - 1
config/url_and_db.py

@@ -15,7 +15,7 @@ if mac in ['5254003fa716', '00163e9162d9']:
     db_config_info = config['jeecg_dev_db']
 else:
     jeecg_db = get_db_engine(config['jeecg_product_db'])
-    db_config_info = config['jeecg_dev_db']
+    db_config_info = config['jeecg_product_db']
 
 jeecg_product_db = get_db_engine(config['jeecg_product_db'])
 application_product_db = get_db_engine(config['application_product_db'])

+ 1 - 1
time_task_create_ad_by_target.py

@@ -45,7 +45,7 @@ acc_list = [(int(item['account_id']), int(item['project_id'])) for index, item i
 # TODO 注释测试代码 for test
 # acc_list = [(10456827, 458), (9774238, 458)]
 # acc_list = [(10456827, 458), (9774238, 458)]
-acc_list = [(11041466, 458)]  # 李琳的账户
+# acc_list = [(11041466, 458)]  # 李琳的账户
 # acc_list = [(10967859, 458)]  # 郭浩的账户