Files
smart-management-auto-test/dulizhan/library/ZZYYLogic/purchase_logic.py

44 lines
1.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding:utf-8 -*-
"""
Author: qiaoxinjiu
Email: qiaoxinjiu@qq.com
Create Date: 2026/01/17 5:58 下午
"""
import ast
import json
from base_framework.public_tools.mg_keyword import ManageKeyWord
from base_framework.public_tools import utils
from zhyy.library.BusinessKw.SZPurchase.index import PurchaseIndex
obj_get_way = utils.Tools()
obj_purchase_kw = PurchaseIndex()
obj_manage_kw = ManageKeyWord()
class PurchaseLogic():
def __init__(self):
pass
def logic_zhyy_sz_purchase_todo_task(self, post_data_input, phone=None):
"""
| 功能说明: | 深圳采购待办任务处理 |
| 请求参数名 | 说明 | 类型 | 条件 | 是否必填 | |
| userName | 登录名 | string |None | 0 |
"""
try:
# 使用 ast.literal_eval 替代 eval防止代码注入攻击
post_data_input = ast.literal_eval(post_data_input)
except (SyntaxError, ValueError):
try:
# 如果 literal_eval 失败,尝试用 json.loads
post_data_input = json.loads(post_data_input)
except (json.JSONDecodeError, TypeError):
# 如果都失败,保持原值
pass
return
if __name__ == '__main__':
pass