当前位置:网站首页>About I double-checked and reviewed the About staff page, returning an industry question
About I double-checked and reviewed the About staff page, returning an industry question
2022-08-05 00:20:00 【Jingxing three thousand】
About me double-checked and reviewed the About staff page, returning an industry question
Here's the thing, last night I received a - so-called small request - staff page, returning an industry question
So record it.
First of all, the database cd_workers table does not have an industry field, so it is impossible to return it through ordinary methods. There is indeed a personnel category id
However,
The original person category id is strange, it does not correspond to the database-person category table- at all, it is simply wrong.Regarding this point, you can go directly to the gldgwid field of the cd_workers table, and then go to the cd_personnel_categories table for comparison, but some of the data are correct, and the correct data is correct after I wrote the personnel category table, that is to say, I currently estimate80% of the data (the so-called original) are not controlled.That is, the data in the first 9 pages or so of the database are not compared.
Assuming that everything is correct, then go through -person category table- to get the industry you belong to. It's no problem to get it (that is, to get the industry you belong to by getting gldgwid to cd_personnel_categories), but it can't be returned, the reasonThe return value type in the pageworkelist method is cd_worker, why is it cd_worker, because this table must be checked, this page is a worker, so all fields are from cd_worker, which is why the code checks this table, each piece of data is cd_workerAll fields of cd_worker, so it can return the data of all fields under cd_worker, but no fields cannot be returned, because multiple returned fields will cause type mismatch, which is simply not possible (db.table("cd_workers").Find(&abc)), abc is a slice with one more field than cd_workers.
Sounds, then we just add an Industry field to the cd_workers table, right?
Wrong, not only, for the staff module, adding a new field is very expensive, and it is necessary to change multiple related methods, such as crud, pagelist, etc.And there is a serious difficulty.At first, this table did not belong to the industry, and now a new one is added. How can the previously registered account get the industry it belongs to?You will definitely say: go to the cd_personnel_categories table and get it, just get it, wrong, as mentioned earlier, 80% of the data are wrong, and regardless of whether this method can be implemented, what will happen if it is implemented?Yes, 80% of the staff data will get a fake industry. What does it mean? For example: classmate a was originally an underground worker, working for rice. This category of staff may get a pick because of the wrong gldgwid before.Dung - Person Category.Isn't this messed up?Originally, I wanted to obtain the industry to which I belonged, but now I have achieved it. The industry is not my own industry, and the category of personnel is wrong.
So is there really no way to improve it?
Of course not, there must be a solution to any problem, but there is a price to pay. We can force this function, and there will be a minimum cost, but even the minimum cost is very dangerous. Let's take a look at the solution
/p>
As 04 said, there will be no problem with the newly added staff in the future. If we don't tangle with the previous data, in fact, no one pays attention to the industry of the staff member, and everyone does not write it for registration.The personnel category and industry of this registration information, then change it. Now let’s talk about this technology. Under the pageworkerlist method, we can get the industry to which we belong, and when we return, we will not report an error that the type does not match.The task is completed, and the cost: adding a new field, crud method and pageworkerlist and other methods may need to be changed accordingly, and the inspection cost is very high.Other potential dangers have not been discovered for the time being.
边栏推荐
- The applicable scenarios and common product types of the KT148A electronic voice chip ic solution
- How to automatically push my new articles to my fans (very simple, can't learn to hit me)
- 《MySQL入门很轻松》第2章:MySQL管理工具介绍
- 游戏3D建模入门,有哪些建模软件可以选择?
- KT148A voice chip ic working principle and internal architecture description of the chip
- Chinese and Japanese color style
- tiup update
- 典型相关分析CCA计算过程
- could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
- First, the basic concept of reptiles
猜你喜欢

10 个关于 Promise 和 setTimeout 知识的面试题,通过图解一次说透彻

Privacy Computing Overview
![[LeetCode] Summary of Matrix Simulation Related Topics](/img/80/bd71ca5211cce5805909015a642893.jpg)
[LeetCode] Summary of Matrix Simulation Related Topics

KT6368A Bluetooth certification problem_FCC and BQB_CE_KC certification or other instructions

oracle创建表空间

How to burn the KT148A voice chip into the chip through the serial port and the tools on the computer

First, the basic concept of reptiles

【无标题】线程三连鞭之“线程池”

【CVA估值训练营】财务建模指南——第一讲

入门3D游戏建模师知识必备
随机推荐
【无标题】线程三连鞭之“线程池”
Three tips for you to successfully get started with 3D modeling
MAUI Blazor 权限经验分享 (定位,使用相机)
uinty lua 关于异步函数的终极思想
情侣牵手[贪心 & 抽象]
KT148A语音芯片ic工作原理以及芯片的内部架构描述
SQL关联表更新
2 用D435i运行VINS-fusion
canvas 高斯模糊效果
【数据挖掘概论】数据挖掘的简单描述
软件开发工具的技术要素
[230]连接Redis后执行命令错误 MISCONF Redis is configured to save RDB snapshots
资深游戏建模师告知新手,游戏场景建模师必备软件有哪些?
数据类型及输入输出初探(C语言)
First, the basic concept of reptiles
一、爬虫基本概念
倒计时1天!8月2日—4日与你聊聊开源与就业那些事!
什么是次世代建模(附学习资料)
#yyds干货盘点#交换设备丢包严重的故障处理
Detailed explanation of common DNS resource record types