addproject
This commit is contained in:
31
zhyy/library/CommonFun/course_package_common.py
Normal file
31
zhyy/library/CommonFun/course_package_common.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
"""
|
||||
Author: 罗志鹏
|
||||
Email: luozhipeng@huohua.cn
|
||||
Create Date: 2022/03/03 11:25 下午
|
||||
"""
|
||||
from base_framework.public_tools import log
|
||||
from base_framework.public_tools.sqlhelper import MySqLHelper
|
||||
|
||||
obj_log = log.get_logger()
|
||||
obj_my_sql_helper = MySqLHelper()
|
||||
|
||||
class CoursePackageCommon:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def get_course_package_info_by_name(self, course_package_name):
|
||||
"""
|
||||
功能:根据套餐名称获取套餐基本信息
|
||||
| 输入参数: | course_package_name string | 套餐名称 |
|
||||
"""
|
||||
sql = "SELECT id,code,name,price FROM `peppa`.`course_package` WHERE `name`='{}';".format(course_package_name)
|
||||
return obj_my_sql_helper.select_one(sql)
|
||||
if __name__ == '__main__':
|
||||
user_common_obj = CoursePackageCommon()
|
||||
user_common_obj.get_course_package_info_by_name('测试杰拉德0325-火花-直播逻辑思维')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user