• 【Django毕业设计源码】Python考试题库练习系统


    目录

    一、程序介绍:

    三、文档目录:

    四、运行截图:

    五、数据库表:

    六、代码展示:

    七、更多学习目录:

    八、互动留言


    一、程序介绍:

    1. 文档:开发技术文档、参考LW、答辩PPT,部分项目另有其他文档
    2. 开发环境:Pytharm(python3.7以上)丨微信开发者工具丨navicat12丨mysql5.7
    3. 配套工具:涉及项目开发运行的全部软件均提供
    4. 项目运行视频或截图:提供
    5. 运行电脑配置要求:内存≥8G,  CPU  i3及以上
    6. 运行教学:指导
    7. 项目修改教学:有
    8. 代码讲解:代码结构讲解

    三、文档目录:

    四、运行截图:

     

    五、数据库表:

     

    六、代码展示:

    1. from app.service import service_select
    2. from app.core.mysql import MysqlPool
    3. import json
    4. import csv
    5. import ast
    6. import os
    7. mysqlPool = MysqlPool()
    8. # 帮助方法,合并对象
    9. def obj_update(*config):
    10. config_temp = {}
    11. for o in config:
    12. config_temp.update(o)
    13. return config_temp
    14. # 权限集合
    15. dict_auth = {}
    16. # 控制器父类
    17. class Controller:
    18. def __init__(self, config):
    19. """
    20. 构造函数
    21. @param {Dictionary} config 配置参数
    22. """
    23. # 配置参数
    24. self.config = config or {}
    25. # 添加服务
    26. self.service = service_select(self.config["service"])
    27. cg = {
    28. # 选择的模板那路径模板
    29. "tpl":
    30. "./index/",
    31. # 选择的服务
    32. "service":
    33. "user",
    34. # 注册get请求路由
    35. "get": ["list", "view", "table"],
    36. # 注册post请求路由
    37. "post": [],
    38. # 注册get api路由
    39. "get_api": [
    40. "del",
    41. "get_list",
    42. "get_obj",
    43. "count",
    44. "count_group",
    45. "sum",
    46. "sum_group",
    47. "avg",
    48. "avg_group",
    49. "list_group",
    50. "bar_group",
    51. "get_hits_list"
    52. ],
    53. # 注册post api路由
    54. "post_api": ["add", "del", "set", "import_db", "export_db", "upload"],
    55. "interact": [],
    56. "unique": []
    57. }
    58. if config:
    59. if "interact" in config:
    60. config["interact"].extend(cg["interact"])
    61. else:
    62. config["interact"] = cg["interact"]
    63. if "get" in config:
    64. config["get"].extend(cg["get"])
    65. else:
    66. config["get"] = cg["get"]
    67. if "post" in config:
    68. config["post"].extend(cg["post"])
    69. else:
    70. config["post"] = cg["post"]
    71. if "get_api" in config:
    72. config["get_api"].extend(cg["get_api"])
    73. else:
    74. config["get_api"] = cg["get_api"]
    75. if "post_api" in config:
    76. config["post_api"].extend(cg["post_api"])
    77. else:
    78. config["post_api"] = cg["post_api"]
    79. if "unique" in config:
    80. config["unique"].extend(cg["unique"])
    81. else:
    82. config["unique"] = cg["unique"]
    83. # 公共模型,用于在render()为传递模板数据补充
    84. def model(self, ctx, model):
    85. m = {}
    86. m.update(model)
    87. #
    88. # model_temp.user = ctx.session.user
    89. # 获取导航
    90. service = service_select("nav")
    91. m["nav_top"] = service.Get_list({"location": "top"})
    92. m["nav_side"] = service.Get_list({"location": "side"})
    93. m["nav_foot"] = service.Get_list({"location": "foot"})
    94. # 获取轮播图
    95. service = service_select("slides")
    96. m["list_slides"] = service.Get_list({})
    97. # 获取公告
    98. service = service_select("notice")
    99. m["list_notice"] = service.Get_list({},
    100. {"orderby": "`update_time` desc"})
    101. # 交互模型接口
    102. if ("interact" in self.config) and self.config["interact"]:
    103. m = self.model_interact(ctx, m)
    104. m["query"] = ctx.query
    105. m["body"] = ctx.body
    106. m["auth"] = ctx.auth
    107. return m
    108. # 交互对象
    109. def interact_obj(self, ctx, o):
    110. interact = self.config["interact"]
    111. if interact:
    112. source_table = service_select(
    113. self.config["service"]).config["table"]
    114. source_field = source_table + "_id"
    115. # 评论
    116. if "comment" in interact:
    117. service = service_select("comment")
    118. source_id = o[source_field]
    119. o["comment_list"] = service.Get_list(
    120. {
    121. "source_table": source_table,
    122. "source_field": source_field,
    123. "source_id": source_id
    124. }, {
    125. "page": 1,
    126. "size": 10,
    127. })
    128. o["comment_len"] = service.Count({
    129. "source_table": source_table,
    130. "source_field": source_field,
    131. "source_id": source_id,
    132. })
    133. # 评分
    134. if "score" in interact:
    135. service = service_select("score")
    136. source_id = o[source_field]
    137. o["score_list"] = service.Get_list(
    138. {
    139. "source_table": source_table,
    140. "source_field": source_field,
    141. "source_id": source_id
    142. }, {
    143. "page": 1,
    144. "size": 10,
    145. })
    146. o["score_len"] = service.Avg(
    147. {
    148. "source_table": source_table,
    149. "source_field": source_field,
    150. "source_id": source_id,
    151. },
    152. {"field": "score_num"},
    153. )
    154. # 收藏
    155. if "collect" in interact:
    156. service = service_select("collect")
    157. source_id = o[source_field]
    158. o["collect_list"] = service.Get_list(
    159. {
    160. "source_table": source_table,
    161. "source_field": source_field,
    162. "source_id": source_id
    163. }, {
    164. "page": 1,
    165. "size": 10,
    166. })
    167. o["collect_len"] = service.Count({
    168. "source_table": source_table,
    169. "source_field": source_field,
    170. "source_id": source_id,
    171. })
    172. # 点赞
    173. if "praise" in interact:
    174. service = service_select("praise")
    175. source_id = o[source_field]
    176. o["praise_list"] = service.Get_list(
    177. {
    178. "source_table": source_table,
    179. "source_field": source_field,
    180. "source_id": source_id,
    181. }, {
    182. "page": 1,
    183. "size": 10,
    184. })
    185. o["praise_len"] = service.Count({
    186. "source_table": source_table,
    187. "source_field": source_field,
    188. "source_id": source_id,
    189. })
    190. return o
    191. # 交互列表
    192. def interact_list(self, ctx, list_1):
    193. interact = self.config["interact"]
    194. if interact:
    195. source_table = service_select(
    196. self.config["service"]).config["table"]
    197. source_field = source_table + "_id"
    198. # 评论数
    199. if "comment" in interact:
    200. service = service_select("comment")
    201. for o in list_1:
    202. source_id = o[source_field]
    203. o["comment_len"] = service.Count({
    204. "source_table": source_table,
    205. "source_field": source_field,
    206. "source_id": source_id,
    207. })
    208. # 平均分
    209. if "score" in interact:
    210. service = service_select("score")
    211. for o in list_1:
    212. source_id = o[source_field]
    213. o["score_len"] = service.Avg(
    214. {
    215. "source_table": source_table,
    216. "source_field": source_field,
    217. "source_id": source_id,
    218. },
    219. {"field": "score_num"},
    220. )
    221. # 收藏人数
    222. if "collect" in interact:
    223. service = service_select("collect")
    224. for o in list_1:
    225. source_id = o[source_field]
    226. o["collect_len"] = service.Count({
    227. "source_table": source_table,
    228. "source_field": source_field,
    229. "source_id": source_id,
    230. })
    231. # 点赞人数
    232. if "praise" in interact:
    233. service = service_select("praise")
    234. for o in list_1:
    235. source_id = o[source_field]
    236. o["praise_len"] = service.Count({
    237. "source_table": source_table,
    238. "source_field": source_field,
    239. "source_id": source_id,
    240. })
    241. # 交互模型
    242. def model_interact(self, ctx, m):
    243. if ("list" in m) and m["list"]:
    244. self.interact_list(ctx, m["list"])
    245. elif ("obj" in m) and m["obj"]:
    246. self.interact_obj(ctx, m["obj"])
    247. return m
    248. """
    249. 公共参数校验
    250. """
    251. def Check_param(self, ctx):
    252. return True
    253. # 首页
    254. def Index(self, ctx):
    255. """首页
    256. @param {Object} ctx http请求上下文
    257. @return {Object} 返回html页面
    258. """
    259. query = dict(ctx.query)
    260. config_plus = {}
    261. if "field" in query:
    262. field = query.pop("field")
    263. config_plus["field"] = field
    264. if "page" in query:
    265. page = query.pop("page")
    266. config_plus["page"] = page
    267. if "size" in query:
    268. size = query.pop("size")
    269. config_plus["size"] = size
    270. result_list = self.service.Get_list(
    271. query, obj_update(self.config, config_plus))
    272. result_dict = {"list": result_list}
    273. model = self.model(ctx, result_dict)
    274. return ctx.render(self.config["tpl"] + "index" + ".html", model)
    275. def Api(self, ctx):
    276. return {"demo": "hello world!"}
    277. # 列表页面
    278. def List(self, ctx):
    279. """
    280. 列表页面
    281. @param {Object} ctx http请求上下文
    282. @return {Object} 返回html页面
    283. """
    284. query = dict(ctx.query)
    285. config_plus = {}
    286. if "field" in query:
    287. field = query.pop("field")
    288. config_plus["field"] = field
    289. if "page" in query:
    290. page = query.pop("page")
    291. config_plus["page"] = page
    292. if "size" in query:
    293. size = query.pop("size")
    294. config_plus["size"] = size
    295. result_list = self.service.Get_list(
    296. query, obj_update(self.config, config_plus))
    297. result_dict = {"list": result_list}
    298. model = self.model(ctx, result_dict)
    299. return ctx.render(self.config["tpl"] + "list" + ".html", model)
    300. # 表格页面
    301. def Table(self, ctx):
    302. """
    303. 表格页面
    304. @param {Object} ctx http请求上下文
    305. @return {Object} 返回html页面
    306. """
    307. query = dict(ctx.query)
    308. config_plus = {}
    309. if "field" in query:
    310. field = query.pop("field")
    311. config_plus["field"] = field
    312. if "page" in query:
    313. page = query.pop("page")
    314. config_plus["page"] = page
    315. if "size" in query:
    316. size = query.pop("size")
    317. config_plus["size"] = size
    318. result_list = self.service.Get_list(
    319. query, obj_update(self.config, config_plus))
    320. result_dict = {"list": result_list}
    321. model = self.model(ctx, result_dict)
    322. return ctx.render(self.config["tpl"] + "table" + ".html", model)
    323. # 详情页面
    324. def View(self, ctx):
    325. """
    326. 详情页面
    327. @param {Object} ctx http请求上下文
    328. @return {Object} 返回html页面
    329. """
    330. query = dict(ctx.query)
    331. config_plus = {}
    332. if "field" in query:
    333. field = query.pop("field")
    334. config_plus["field"] = field
    335. obj_result = self.service.Get_obj(query,
    336. obj_update(self.config, config_plus))
    337. obj_dict = {"obj": obj_result}
    338. model = self.model(ctx, obj_dict)
    339. return ctx.render(self.config["tpl"] + "view" + ".html", model)
    340. # 编辑页面
    341. def Edit(self, ctx):
    342. """
    343. 编辑页面
    344. @param {Object} ctx http请求上下文
    345. @return {Object} 返回html页面
    346. """
    347. query = dict(ctx.query)
    348. config_plus = {}
    349. if "field" in query:
    350. field = query.pop("field")
    351. config_plus["field"] = field
    352. obj_result = self.service.Get_obj(query,
    353. obj_update(self.config, config_plus))
    354. obj_dict = {"obj": obj_result}
    355. model = self.model(ctx, obj_dict)
    356. return ctx.render(self.config["tpl"] + "edit" + ".html", model)
    357. # 增
    358. def Add(self, ctx):
    359. """
    360. @param {Object} ctx http请求上下文
    361. @return {Object} 返回json-rpc格式结果
    362. """
    363. body = ctx.body
    364. unique = self.config.get("unique")
    365. obj = None
    366. if unique:
    367. qy = {}
    368. for i in range(len(unique)):
    369. key = unique[i]
    370. qy[key] = body.get(key)
    371. obj = self.service.Get_obj(qy)
    372. if not obj:
    373. # 添加数据前
    374. error = self.Add_before(ctx)
    375. if error["code"]:
    376. return {"error": error}
    377. error = self.Events("add_before", ctx, None)
    378. if error["code"]:
    379. return {"error": error}
    380. # 添加数据
    381. result = self.service.Add(body, self.config)
    382. # 添加数据发生错误
    383. if self.service.error:
    384. return {"error": self.service.error}
    385. # 添加数据成功后
    386. res = self.Add_after(ctx, result)
    387. if res:
    388. result = res
    389. res = self.Events("add_after", ctx, result)
    390. if res:
    391. result = res
    392. return {"result": result}
    393. else:
    394. return {"error": {"code": 10000, "message": "已存在"}}
    395. # 删
    396. def Del(self, ctx):
    397. """
    398. @param {Object} ctx http请求上下文
    399. @return {Object} 返回json-rpc格式结果
    400. """
    401. if len(ctx.query) == 0:
    402. errorMsg = {"code": 30000, "message": "删除条件不能为空!"}
    403. return errorMsg
    404. result = self.service.Del(ctx.query, self.config)
    405. if self.service.error:
    406. return {"error": self.service.error}
    407. return {"result": result}
    408. # 改
    409. def Set(self, ctx):
    410. """
    411. @param {Object} ctx http请求上下文
    412. @return {Object} 返回json-rpc格式结果
    413. """
    414. # 修改数据前
    415. error = self.Set_before(ctx)
    416. if error["code"]:
    417. return {"error": error}
    418. error = self.Events("set_before", ctx, None)
    419. if error["code"]:
    420. return {"error": error}
    421. query = ctx.query
    422. if 'page' in query.keys():
    423. del ctx.query['page']
    424. if 'size' in query.keys():
    425. del ctx.query['size']
    426. if 'orderby' in query.keys():
    427. del ctx.query['orderby']
    428. # 修改数据
    429. result = self.service.Set(ctx.query, ctx.body, self.config)
    430. # 修改数据发生错误
    431. if self.service.error:
    432. return {"error": self.service.error}
    433. # 修改数据成功后
    434. res = self.Set_after(ctx, result)
    435. if res:
    436. result = res
    437. res = self.Events("set_after", ctx, result)
    438. if res:
    439. result = res
    440. return {"result": result}
    441. # 查多条
    442. def Get_list(self, ctx):
    443. """
    444. 查多条
    445. @param {Object} ctx http请求上下文
    446. @return {Object} 返回json-rpc格式结果
    447. """
    448. query = dict(ctx.query)
    449. config_plus = {}
    450. if "field" in query:
    451. field = query.pop("field")
    452. config_plus["field"] = field
    453. if "page" in query:
    454. config_plus["page"] = query.pop("page")
    455. if "size" in query:
    456. config_plus["size"] = query.pop("size")
    457. if "orderby" in query:
    458. config_plus["orderby"] = query.pop("orderby")
    459. if "like" in query:
    460. config_plus["like"] = query.pop("like")
    461. if "groupby" in query:
    462. config_plus["groupby"] = query.pop("groupby")
    463. count = self.service.Count(query)
    464. lst = []
    465. if self.service.error:
    466. return {"error": self.service.error}
    467. elif count:
    468. lst = self.service.Get_list(query,
    469. obj_update(self.config, config_plus))
    470. if self.service.error:
    471. return {"error": self.service.error}
    472. self.interact_list(ctx, lst)
    473. return {"result": {"list": lst, "count": count}}
    474. # 查一条
    475. def Get_obj(self, ctx):
    476. """
    477. 查一条
    478. @param {Object} ctx http请求上下文
    479. @return {Object} 返回json-rpc格式结果
    480. """
    481. query = dict(ctx.query)
    482. config_plus = {}
    483. if "field" in query:
    484. field = query.pop("field")
    485. config_plus["field"] = field
    486. obj = self.service.Get_obj(query, obj_update(self.config, config_plus))
    487. if self.service.error:
    488. return {"error": self.service.error}
    489. if obj:
    490. self.interact_obj(ctx, obj)
    491. return {"result": {"obj": obj}}
    492. # 饼图统计
    493. def List_group(self, ctx):
    494. """
    495. 饼图统计
    496. @param {Object} ctx http请求上下文
    497. @return {Object} 返回json-rpc格式结果
    498. """
    499. query = dict(ctx.query)
    500. config_plus = {}
    501. if "groupby" in query:
    502. groupby_t = query.pop("groupby")
    503. config_plus["groupby"] = groupby_t
    504. else:
    505. err = {"error": 30000, "message": "groupby的值不能为空!"}
    506. return err
    507. lt = self.service.Count_group(query,obj_update(self.config, config_plus))
    508. for o in lt:
    509. o[1] = o[groupby_t]
    510. o[0] = o["count"]
    511. if self.service.error:
    512. return {"error": self.service.error}
    513. return {"result": { "list": lt }}
    514. # 柱状图统计
    515. def Bar_group(self, ctx):
    516. """
    517. 柱状图统计
    518. @param {Object} ctx http请求上下文
    519. @return {Object} 返回json-rpc格式结果
    520. """
    521. query = dict(ctx.query)
    522. config_plus = {}
    523. if "field" in query:
    524. field = query.pop("field")
    525. config_plus["field"] = field
    526. else:
    527. err = {"error": 30000, "message": "field的值不能为空!"}
    528. return err
    529. if "groupby" in query:
    530. groupby_t = query.pop("groupby")
    531. config_plus["groupby"] = groupby_t
    532. else:
    533. err = {"error": 30000, "message": "groupby的值不能为空!"}
    534. return err
    535. lt = self.service.Bar_group(query,obj_update(self.config, config_plus))
    536. for k,v in enumerate(lt):
    537. new = list(v.values())
    538. lt[k] = new
    539. if self.service.error:
    540. return {"error": self.service.error}
    541. return {"result": { "list": lt }}
    542. # 总数
    543. def Count(self, ctx):
    544. """
    545. 总数
    546. @param {Object} ctx http请求上下文
    547. @return {Object} 返回json-rpc格式结果
    548. """
    549. result = self.service.Count(ctx.query, self.config)
    550. if self.service.error:
    551. return {"error": self.service.error}
    552. return {"result": result}
    553. # 分组总计条数
    554. def Count_group(self, ctx):
    555. """
    556. 分组总计条数
    557. @param {Object} ctx http请求上下文
    558. @return {Object} 返回json-rpc格式结果
    559. """
    560. query = dict(ctx.query)
    561. config_plus = {}
    562. if "groupby" in query:
    563. groupby_t = query.pop("groupby")
    564. config_plus["groupby"] = groupby_t
    565. else:
    566. err = {"error": 30000, "message": "groupby的值不能为空!"}
    567. return err
    568. lt = self.service.Count_group(query,
    569. obj_update(self.config, config_plus))
    570. if self.service.error:
    571. return {"error": self.service.error}
    572. return {"result": { "list": lt }}
    573. # 合计
    574. def Sum(self, ctx):
    575. """
    576. 合计
    577. @param {Object} ctx http请求上下文
    578. @return {Object} 返回json-rpc格式结果
    579. """
    580. query = dict(ctx.query)
    581. config_plus = {}
    582. if "field" in query:
    583. field = query.pop("field")
    584. config_plus["field"] = field
    585. else:
    586. err = {"error": 30000, "message": "field的值不能为空!"}
    587. return err
    588. result = self.service.Sum(query, obj_update(self.config, config_plus))
    589. if self.service.error:
    590. return {"error": self.service.error}
    591. return {"result": result}
    592. # 分组求和
    593. def Sum_group(self, ctx):
    594. """
    595. 分组求和
    596. @param {Object} ctx http请求上下文
    597. @return {Object} 返回json-rpc格式结果
    598. """
    599. query = dict(ctx.query)
    600. config_plus = {}
    601. if "field" in query:
    602. field = query.pop("field")
    603. config_plus["field"] = field
    604. else:
    605. err = {"error": 30000, "message": "field的值不能为空!"}
    606. return err
    607. if "groupby" in query:
    608. groupby_t = query.pop("groupby")
    609. config_plus["groupby"] = groupby_t
    610. else:
    611. err = {"error": 30000, "message": "groupby的值不能为空!"}
    612. return err
    613. lt = self.service.Sum_group(query,
    614. obj_update(self.config, config_plus))
    615. if self.service.error:
    616. return {"error": self.service.error}
    617. return {"result": { "list": lt }}
    618. # 求平均数
    619. def Avg(self, ctx):
    620. """
    621. 求平均数
    622. @param {Object} ctx http请求上下文
    623. @return {Object} 返回json-rpc格式结果
    624. """
    625. query = dict(ctx.query)
    626. config_plus = {}
    627. if "field" in query:
    628. field = query.pop("field")
    629. config_plus["field"] = field
    630. else:
    631. err = {"error": 30000, "message": "field的值不能为空!"}
    632. return err
    633. result = self.service.Avg(query, obj_update(self.config, config_plus))
    634. if self.service.error:
    635. return {"error": self.service.error}
    636. return {"result": result}
    637. # 分组平均数
    638. def Avg_group(self, ctx):
    639. """
    640. 分组平均数
    641. @param {Object} ctx http请求上下文
    642. @return {Object} 返回json-rpc格式结果
    643. """
    644. query = dict(ctx.query)
    645. config_plus = {}
    646. if "field" in query:
    647. field = query.pop("field")
    648. config_plus["field"] = field
    649. else:
    650. err = {"error": 30000, "message": "field的值不能为空!"}
    651. return err
    652. if "groupby" in query:
    653. groupby_t = query.pop("groupby")
    654. config_plus["groupby"] = groupby_t
    655. else:
    656. err = {"error": 30000, "message": "groupby的值不能为空!"}
    657. return err
    658. lt = self.service.Avg_group(query,
    659. obj_update(self.config, config_plus))
    660. if self.service.error:
    661. return {"error": self.service.error}
    662. return {"result": { "list": lt }}
    663. # 导入数据
    664. def Import_db(self, ctx):
    665. """
    666. 导入数据
    667. @param {Object} ctx http请求上下文
    668. @return {Object} 返回json-rpc格式结果
    669. """
    670. body = {"error": {"code": 10000, "message": "未定义表名!"}}
    671. return body
    672. # 导出数据
    673. def Export_db(self, ctx):
    674. """
    675. 导出数据
    676. @param {Object} ctx http请求上下文
    677. @return {Object} 返回json-rpc格式结果
    678. """
    679. message = {
    680. "id": 1,
    681. "jsonrpc": "2.0",
    682. }
    683. query = ctx.query
    684. # 获取表名
    685. table = self.config["service"]
    686. path = ""
    687. if "path" in query:
    688. path = query.pop("path")
    689. if "name" in query:
    690. name = query.pop("name")
    691. # 通过服务获得数据
    692. service = service_select(table)
    693. lst = service.Export_db(query)
    694. # 1.创建文件对象
    695. f = open(str(path) + str(name) + ".csv",
    696. "w",
    697. newline="",
    698. encoding="utf-8")
    699. # 2.基于文件对象构建 csv写入对象
    700. csv_writer = csv.writer(f)
    701. for row in lst:
    702. csv_writer.writerow(row)
    703. return message
    704. # 上传
    705. def Upload(self, ctx):
    706. """
    707. 上传
    708. @param {Object} ctx http请求上下文
    709. @return {Object} 返回json-rpc格式结果
    710. """
    711. file_obj = ctx.request.FILES.get("file", None)
    712. if file_obj is None:
    713. error = {"code": 10000, "message": "上传的文件(file)不能为空"}
    714. return error
    715. try:
    716. file_obj = ctx.request.FILES.get("file", None)
    717. u = "/static/upload/" + file_obj.name
    718. fe = os.getcwd() + u
    719. with open(fe, "wb") as f:
    720. for line in file_obj.chunks():
    721. f.write(line)
    722. f.close()
    723. except (Exception):
    724. print("上传失败:", Exception)
    725. else:
    726. return {"result": {"url": u}}
    727. # 鉴权
    728. def Auth(self, ctx):
    729. if len(dict_auth.keys()) == 0:
    730. service = service_select("auth")
    731. lst = service.Get_list({}, {"page": 0})
    732. for o in lst:
    733. if "option" in o:
    734. o["option"] = ast.literal_eval(o["option"])
    735. else:
    736. o["option"] = {}
    737. path = o["path"]
    738. if not dict_auth[path]:
    739. dict_auth[path] = {}
    740. dict_auth[path][o["user_group"]] = o
    741. return dict_auth
    742. # 添加前
    743. def Add_before(self, ctx):
    744. # print("添加", ctx)
    745. return { "code": 0 }
    746. # 添加后
    747. def Add_after(self, ctx, result):
    748. # print("结果", ctx)
    749. return result
    750. # 修改前
    751. def Set_before(self, ctx):
    752. # print("修改前", ctx)
    753. return { "code": 0 }
    754. #分类推荐
    755. def Get_hits_list(self, ctx):
    756. return { "code": 0 }
    757. # 修改前
    758. def Set_after(self, ctx, result):
    759. return result
    760. # 事件
    761. def Events(self, event_name, param, paramB):
    762. if event_name == "add_before":
    763. return { "code": 0 }
    764. elif event_name == "del_before":
    765. return { "code": 0 }
    766. elif event_name == "set_before":
    767. return { "code": 0 }
    768. elif event_name == "get_obj_before":
    769. return { "code": 0 }
    770. elif event_name == "get_list_before":
    771. return { "code": 0 }
    772. elif event_name == "add_after":
    773. return paramB
    774. elif event_name == "del_after":
    775. return paramB
    776. elif event_name == "set_after":
    777. return paramB
    778. elif event_name == "get_obj_after":
    779. return paramB
    780. elif event_name == "get_list_after":
    781. return paramB
    782. else:
    783. return paramB

    七、更多学习目录:

    1.基于ssm的甘肃旅游系统
    2.基于SSM的旅游企业财务管理系统
    3.基于SSM的疫情防疫项目(带爬虫)
    4.基于springboot的人力资源管理系统
    5.基于SSM的民生置业有限公司信息管理系统
    6.基于ssm的在线挂号小程序系统
    7.基于Java(spring boot框架)新冠疫苗预约管理系统
    8.基于SSM的校园小助手系统
    9.基于springboot的点餐小程序系统
    10.基于ssm的健康食谱推荐小程序
    11.基于ssm的健康食谱小程序
    12.基于ssm的二手汽车拍卖系统小程序
    13.基于ssm的二手汽车拍卖系统app
    14.基于springboot的客户关系管理系统
    15.基于SSM的校园活动管理小程序
    16.基于SSM的个人健康饮食管理小程序系统
    17.基于ssm的微信小程序水果商城
    18.基于微信小程序的一起运动吧活动管理系统
    19.基于springboot的微信小程序的在线商城系统(根据收藏类别推荐+点击率推荐)
    20.基于SSM新闻网站
    21.基于ssm的在线租房网站
    22.基于springboot的中学校园管理微信小程序
    23.基于Springboot学生在线考试系统
    24.基于SSM的网上奶茶购买平台 
    25.基于springboot的高校社团管理系统(多用户角色)
    26.基于springboot个性化学习推荐网站
    27.基于微信小程序的西藏特产在线商城系统
    28.基于SSM的微信小程序的查寝系统
    29.基于ssm的微信小程序的口袋故事系统
    30.基于SSM的小区物业管理系统
    31.基于SSM的小程序任务调度管理信息系统
    32.基于SSM的团员信息管理系统
    33.基于SSM框架的法律学习小程序
    34.基于springboot的学校监考小程序
    35.基于SSM的超市财务管理系统 
    36.基于springboot的学生宿舍管理系统
    37.基于SSM的课程设计管理系统
    38.基于SSM的课设管理小程序
    39.基于springboot的果蔬交易与物流微信小程序
    40.基于ssm的果蔬交易与物流微信小程序
    41.基于SSM的红色文化展示小程序系统
    42.基于SSM的小区物业管理系统
    43.基于javaweb的机械博物馆展品管理系统
    44.基于springboot的实验室设备管理系统
    45.基于SSM企业人力资源管理系统
    46.基于springboot的实验室物资管理小程序
    47.基于springboot的高校选课系统
    48.基于SSM小程序蔬菜水果零食销售系统
    49.基于SSM的园第二课堂小程序
    50.基于ssm的全球地震数据信息管理系统
    51.基于ssm的足球联赛管理系统
    52.基于SSM的小程序的人工智能类竞赛管理系统
    53.基于SSM的智慧医疗问诊小程序
    54.基于SSM的微信小程序直播在线教育平台
    55.基于springboot+爬虫的新闻网站系统
    56.基于SSM的自驾游小程序
    57.基于SSM的高校宿舍管理小程序系统
    58.基于SSM的微信小程序在线学习平台
    59.基于Android的防疫信息管理系统
    60.基于springboot的患者术后康复的小程序
    61.基于ssm微信小程序的校园换物系统
    62.基于SSM微信小程序的智慧党史系统
    63.基于SSM的家庭理财系统
    64.基于SSM的高校学籍信息管理系统
    65.基于SSM微信小程序的航班查询和订票系统
    66.基于ssm的医院挂号系统
    67.基于SSM的在线阅读系统
    68.基于SSM的疫情社区物资配送系统
    69.基于ssm的加油服务系统小程序系统
    70.基于ssm的XX学院校友录小程序系统
    71.基于ssm的药店管理系统微信小程序系统
    72.基于ssm的装潢应用系统小程序系统
    73.基于ssm的学生公寓生活管理系统
    74.基于ssm的计算机维修服务微信小程序
    75.基于ssm的微信音乐播放器小程序
    76.基于ssm的中医药配方小程序
    77.基于ssm的二手交易微信小程序
    78.基于ssm的的家教信息小程序管理系统
    79.基于ssm的鲜花销售小程序系统
    80.基于ssm的预约挂号小程序系统
    81.基于ssm的在线考试小程序系统
    82.基于ssm的慢性疾病管理微信小程序
    83.基于springboot的在线考试系统小程序
    84.基于springboot的批发零售业商品管理小程序系统
    85.基于ssm的图书借阅到期提醒小程序系统
    86.基于springboot的服装企业人事管理小程序系统
    87.基于nodejs的电商管理系统
    88.基于nodejs的知识分享网站
    89.基于nodejs的宠物医生预约平台
    90.基于nodejs的外卖平台
    91.基于nodejs的大学生心理咨询微信小程序
    92.基于nodejs的房屋租赁管理系统
    93.基于nodejs的拼车网站
    94.基于nodejs的博客系统
    95.基于nodejs的家政服务微信小程序
    96.基于nodejs的物物交换平台
    97.基于php的实验室安全系统
    98.基于php的单招志愿采集系统
    99.基于php的网上买卖管理系统
    100.基于php的XX学院兼职小程序系统
    101.基于php的计算机信息管理学院网站
    102.基于python+Django图书馆智能推荐系统python3.85版本
    103.基于Python的个性化电影推荐的算法
    104.基于python+django图书推荐系统
    105.基于Python的个性化电影推荐的算法
    106.基于django的爬虫新闻网站系统
    107.基于Python的人事档案管理系统 
    108.基于python的汽车销售系统
    109.基于python的《C语言程序设计》课程案例库研究
    110.基于python的飞机票销售系统
    111.基于python的旧衣物捐赠系统
    112.基于python的超市进销存
    113.基于python的在线办公系统
    114.基于python的大学生职业推荐平台
    115.基于python的个性化服装系统
    116.基于python的酒店住房管理系统
    117.基于python的三甲妇幼保健院网站
    118.基于python的大学生生活信息交互平台
    119.基于python的学生兼职平台系统
    120.基于python的主机硬件配置推荐系统
    121.基于python的本地健康宝微信小程序
    122.基于python的鲜花销售小程序
    123.基于JSP的网上订餐管理系统
    124.基于jAVAWeb停车场管理系统
    125.基于SSM幼儿园信息管理系统
    126.基于Springboot电影订票系统
    127.基于ssm人力资源考勤系统
    128.基于javaweb作业管理系统
    129.基于javaweb校园二手物品交易
    130.基于javaweb的停车场管理系统
    131.基于javaweb学生选课系统
    132.基于SSM实现的人力资源管理系统
    133.基于javaweb项目疫情宿舍管理
    134.基于SSM的图书商城系统
    135.基于ssm的微信小程序家教系统
    136.基于ssm的旅游管理系统travel
    137.基于SSM的微信小程序图书借阅系统
    138.基于web的微信小程序家政预约系统
    139.基于web的微信小程序菜谱系统
    140.基于web的微信小程序服装商城系统
    141.基于web的微信小程序校园活动管理系统
    142.基于web的微信小程序记事本系统
    143.基于ssm的基于微信小程序的农产品销售系统
    144.基于ssm的微信小程序旅游服务系统
    145.基于springboot的微信小程序在线考试管理系统
    146.基于ssm的微信小程序电影院购票系统
    147.基于ssm的微信小程序房屋交易系统
    148.基于ssm的微信小程序培训机构管理系统
    149.基于web的微信小程序电影购票系统
    150.基于ssm的酒店管理系统
    151.基于javaweb点餐系统
    152.基于javaweb宿舍管理系统
    153.基于springboot的信息化管理系统
    154.基于SSM的美妆商城系统
    155.基于javaweb学生成绩管理系
    156.基于SSM的新闻发布系统
    157.基于SSM实现的小区物业管理系统
    158.基于SSH的城市公交查询系统
    159.基于S2SH的人力资源管理系统
    160.基于S2SH酒店点餐收款系统
    161.基于JSP的在线调查问卷系统
    162.基于JSP的网上订餐管理系统
    163.基于JSP实现的飞机票售票管理系统
    164.基于SSM农场信息管理系统
    165.基于javaweb花店管理系统
    166.基于javaweb药房库存管理系统
    167.基于SSM的甜品店系统
    168.基于S2SH的药膳馆会员管理系统
    169.基于javaweb的学籍管理系统
    170.基于web的网上书城系统
    171.基于web的学生成绩系统
    172.基于SSH的客运站网上售票系统
    173.基于S2SH校园论坛系统
    174.基于javaweb旅游管理系统
    175.基于SSH的旅游管理系统
    176.基于SSM垃圾分类管理系统
    177.基于ssm宠物销售系统
    178.基于javaweb的在线人才招聘系统
    179.基于S2SH小区物业系统
    180.基于ssm人事管理系统
    181.基于web的淘淘商城系统

    八、互动留言

  • 相关阅读:
    什么是探索性测试?探索性测试有哪些方法?
    从零到一python爬虫实战:框架选择>查找爬虫参数>写代码>打包运行
    linux入门---信号量
    兴趣社如何搭建一个兴趣社区?
    20.1 OpenSSL 字符BASE64压缩算法
    PostgreSQL 查询某个属性相同内容出现的次数
    HBase数据模型与整体架构
    kafka复习:(25)kafka stream
    leetcode82-Remove Duplicates from Sorted List II
    Spring异步核心@Async注解的前世今生
  • 原文地址:https://blog.csdn.net/aicood/article/details/126099027