Commit 6f368e70 authored by 刘琴's avatar 刘琴

编辑线索(图片数量和格式,必填项)

parent 4ca15137
......@@ -19,11 +19,13 @@
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="54f4d37d-1724-4813-a1e2-24e200088c5f" name="Default Changelist" comment="编辑线索">
<list default="true" id="54f4d37d-1724-4813-a1e2-24e200088c5f" name="Default Changelist" comment="编辑线索(图片数量和格式,必填项)">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/common/common_config.py" beforeDir="false" afterPath="$PROJECT_DIR$/common/common_config.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/run.py" beforeDir="false" afterPath="$PROJECT_DIR$/run.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/defalut_account.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/defalut_account.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/common_liuqin/helpler.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/common_liuqin/helpler.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/testcase_clue/test_my_new_clue.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/testcase_clue/test_my_new_clue.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
......@@ -140,7 +142,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="helpler" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<configuration name="myNewClue_handler" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="jk_interface_test" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -148,11 +150,11 @@
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/common_liuqin" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="E:\interface\jk_interface_test\script\ji_yun_ying_pc\service_crm_liuqin\common_liuqin\helpler.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -201,18 +203,18 @@
</configuration>
<list>
<item itemvalue="Python.run" />
<item itemvalue="Python.helpler" />
<item itemvalue="Python.helpler (1)" />
<item itemvalue="Python.conftest" />
<item itemvalue="Python tests.pytest in test_my_new_clue.py" />
<item itemvalue="Python.myNewClue_handler" />
</list>
<recent_temporary>
<list>
<item itemvalue="Python.run" />
<item itemvalue="Python.conftest" />
<item itemvalue="Python.myNewClue_handler" />
<item itemvalue="Python.helpler (1)" />
<item itemvalue="Python.conftest" />
<item itemvalue="Python tests.pytest in test_my_new_clue.py" />
<item itemvalue="Python.helpler" />
</list>
</recent_temporary>
</component>
......@@ -279,7 +281,14 @@
<option name="project" value="LOCAL" />
<updated>1619777539691</updated>
</task>
<option name="localTasksCounter" value="8" />
<task id="LOCAL-00008" summary="编辑线索(图片数量和格式,必填项)">
<created>1620266280390</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1620266280390</updated>
</task>
<option name="localTasksCounter" value="9" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -305,7 +314,8 @@
<MESSAGE value="修改响应" />
<MESSAGE value="查询所有线索+新增线索(必填项)+查询单个线索" />
<MESSAGE value="编辑线索" />
<option name="LAST_COMMIT_MESSAGE" value="编辑线索" />
<MESSAGE value="编辑线索(图片数量和格式,必填项)" />
<option name="LAST_COMMIT_MESSAGE" value="编辑线索(图片数量和格式,必填项)" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......@@ -315,6 +325,11 @@
<line>1</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/common/connect_db.py</url>
<line>1</line>
<option name="timeStamp" value="2" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
......
common_config = {
"host": "http://172.10.62.94",
# "host": "http://172.10.62.94",
"host": "http://192.168.32.31",
"db_config": {
'database': 'edu-admin',
"user": 'read_user',
"password": 'c5JJUqmtTeaSaOTN2gs7',
"host": '132.232.15.12',
"user": 'dev',
# "user": 'read_user',
# "password": 'c5JJUqmtTeaSaOTN2gs7',
"password": 'mko0PL<.;?',
# "host": '132.232.15.12',
"host": '192.168.32.31',
"port": 5432
},
"mongo_db_config": {
......
......@@ -3,11 +3,11 @@ import os
if __name__ == '__main__':
run_config = [
"-s", r"script\ji_yun_ying_pc\service_crm_liuqin\testcase_clue\test_my_new_clue.py::TestMyNewClue::test_edit_my_new_clue_with_wrong_file",
"-s", r"script\ji_yun_ying_pc\service_crm_liuqin\testcase_clue\test_my_new_clue.py::TestMyNewClue::test_query_transformed_clue_with_sourceId",
"--clean-alluredir",
"--alluredir", "./report/xml",
# "--host", "http://192.168.32.31",
"--host", "https://yf1.jkwljy.com",
"--host", "http://192.168.32.31",
# "--host", "https://yf1.jkwljy.com",
"--account", "A",
"--db", "36"
]
......
......@@ -4,8 +4,8 @@ accounts = {
"A": {
# 极运营默认账号
"jyy_account": {
"account": "18224499511",
# "account": "15360956010",
# "account": "18224499511",
"account": "15360956010",
"password": "88888888"
},
# 极运营app默认账号
......
import random
from script.ji_yun_ying_pc.service_crm_liuqin.common_liuqin.helpler import get_mobile, get_time, get_tomorrow_datetime
class Add_My_New_Clue():
intentionLevel_list = ["S", "A", "B", "C"]
sourceId_list = [100, 101, 102, 103, 104]
publicGrade_list = ['零年级','一年级','二年级','三年级','四年级','五年级','六年级','七年级','八年级','九年级','高一','高二','高三']
def __init__(self,contactInfo=get_mobile(),studentName="lq{}".format(get_time()),belong="PERSON",contactType="PHONE",studentSex="NONE",
collectPerson="黄强测试人员", inChargeEmployeeId=8223,createSchoolAreaId=3015,introduceStudentNo=None,otherRemark=None,
homeProvinceId=None,homeProvince=None,homeCityId=None,homeCity=None,homeDistrictId=None,
homeDistrict=None,homeCountyId=None,homeCounty=None,homeAddress=None,schoolId=None,schoolName=None,
publicClass=None,publicTeacher=None,publicGrade=None,birthday=None,testPaperUrls=None,
score=None,sourceId=101,intentionLevel="B",introduceStudentId=None,introduceStudentName=None,
publicClass=None,publicTeacher=None,publicGrade=random.sample(publicGrade_list,1)[0],birthday=None,testPaperUrls=None,
score=None,sourceId=random.sample(sourceId_list,1)[0],intentionLevel=random.sample(intentionLevel_list,1)[0],introduceStudentId=None,introduceStudentName=None,
remark=None,classRank=None,gradeRank=None,recentScore=None,parentsHope=None,
studyHabit=None,city=510100,schoolProvinceName="四川省",schoolProvinceId=510000,
schoolCityId=510000,schoolCityName="成都"
......@@ -103,16 +107,19 @@ class Add_My_New_Clue():
"""
class Add_My_New_All_Clue():
intentionLevel_list = ["S", "A", "B", "C"]
sourceId_list = [100, 101, 102, 103, 104]
publicGrade_list = ['零年级','一年级','二年级','三年级','四年级','五年级','六年级','七年级','八年级','九年级','高一','高二','高三']
def __init__(self, contactInfo=get_mobile(), studentName="lq全{}".format(get_time()), belong="PERSON",
contactType="WECHAT", secondContactType="TEL",secondContactInfo="028-85568842",studentSex="F",
collectPerson="黄强测试人员", inChargeEmployeeId=8223, createSchoolAreaId=3015,
introduceStudentNo=218584, otherRemark=None,
homeProvinceId=510000, homeProvince="四川省", homeCityId=510600, homeCity="德阳市", homeDistrictId=510623,
homeDistrict="中江县", homeCountyId=510623101, homeCounty="南华镇", homeAddress="测试地址", schoolId=13187,
homeDistrict="中江县", homeCountyId=510623101, homeCounty="南华镇", homeAddress="测试地址", schoolId=random.sample(sourceId_list,1)[0],
schoolName="华阳中学",
publicClass="测试班级", publicTeacher="测试老师", publicGrade="三年级", birthday="2013-05-02",
publicClass="测试班级", publicTeacher="测试老师", publicGrade=random.sample(publicGrade_list,1)[0], birthday="2013-05-02",
testPaperUrls="https://test-1257124244.cos.ap-chengdu.myqcloud.com/img/63a0757824c856b31312f9d8a0c60c52.jpeg",
score=999, sourceId=102, intentionLevel="C", introduceStudentId=10170940,
score=999, sourceId=102, intentionLevel=random.sample(intentionLevel_list,1)[0], introduceStudentId=10170940,
introduceStudentName="lq测试用",
remark="测试新增线索所有项", classRank="12", gradeRank="23", recentScore="111", parentsHope="222",
studyHabit="333", city=510100, schoolProvinceName="四川省", schoolProvinceId=510000,
......@@ -315,4 +322,4 @@ class Add_My_New_All_Clue():
"""
if __name__ == '__main__':
print(type(Add_My_New_Clue().add_clue_data))
print(Add_My_New_Clue().add_clue_data.get('intentionLevel'))
......@@ -13,15 +13,57 @@ def get_mobile():
def get_time():
# 获取当前时间
ts =str(int(time.time()))
return ts
def get_tomorrow_datetime():
# 获取明天日期
temp_date = datetime.datetime.now() # 获取当前时间 年月日时分秒
date1 = (temp_date + datetime.timedelta(days=+1)).strftime("%Y-%m-%d %H:%M:%S")
return date1
def get_today():
# 获取今天
today = time.strftime("%Y-%m-%d", time.localtime())
return today
def get_this_week():
# 获取当前日期星期
now = datetime.datetime.now()
this_week_start = now - datetime.timedelta(days=now.weekday())
this_week_end = now + datetime.timedelta(days=6 - now.weekday())
week_start = this_week_start.strftime("%Y-%m-%d")
week_end = this_week_end.strftime("%Y-%m-%d")
return {'week_start':week_start,'week_end':week_end}
def get_this_month():
# 获取当前日期月
now = datetime.datetime.now()
this_month_start = datetime.datetime(now.year,now.month,1)
this_month_end = datetime.datetime(now.year,now.month+1,1) - datetime.timedelta(days=1) + datetime.timedelta(hours=23, minutes=59, seconds=59)
month_start = this_month_start.strftime("%Y-%m-%d")
month_end = this_month_end.strftime("%Y-%m-%d")
return {'month_start':month_start,'month_end':month_end}
def time_transform_day(change_time):
# createTime: 1620387156 转换为2021-05-07 (时间戳转换为日期格式)
day = time.localtime(change_time)
day = time.strftime("%Y-%m-%d", day)
return day
def day_transform_time(change_time):
# createTimeStr: "2021-05-07 19:32:36" 转换为 2021-05-07 (格式转换为日期格式)
timeStruct = time.strptime(change_time, "%Y-%m-%d %H:%M:%S")
timeStruct = time.strftime("%Y-%m-%d", timeStruct)
return timeStruct
if __name__ == '__main__':
print(get_mobile())
print(get_time())
print(get_tomorrow_datetime())
\ No newline at end of file
# print(get_mobile())
# print(get_time())
# print(get_tomorrow_datetime())
# print(get_this_week())
# print(get_this_month())
print(time_transform_day(1620387156))
print(day_transform_time("2021-05-07 19:32:36"))
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