当前位置:网站首页>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.
边栏推荐
- Modelers experience sharing: model study method
- 统计单词(DAY 101)华中科技大学考研机试题
- The applicable scenarios and common product types of the KT148A electronic voice chip ic solution
- Cython
- 数据类型及输入输出初探(C语言)
- KT6368A蓝牙的认证问题_FCC和BQB_CE_KC认证或者其它说明
- 10 种常见的BUG分类
- SQL关联表更新
- [LeetCode] Summary of Matrix Simulation Related Topics
- [CVA Valuation Training Camp] Financial Modeling Guide - Lecture 1
猜你喜欢

Modelers experience sharing: model study method

数据类型及输入输出初探(C语言)

Essential knowledge for entry-level 3D game modelers

2022 Niu Ke Summer Multi-School Training Camp 5 (BCDFGHK)

一、爬虫基本概念

KT148A voice chip ic working principle and internal architecture description of the chip

软件质量评估的通用模型

10 种常见的BUG分类

怎样进行在不改变主线程执行的时候,进行日志的记录

统计单词(DAY 101)华中科技大学考研机试题
随机推荐
typeScript - Partially apply a function
KT148A voice chip ic working principle and internal architecture description of the chip
MAUI Blazor 权限经验分享 (定位,使用相机)
oracle创建用户以后的权限问题
MVCC是什么
机器学习(公式推导与代码实现)--sklearn机器学习库
情侣牵手[贪心 & 抽象]
jenkins send mail system configuration
tiup uninstall
00、数组及字符串常用的 API(详细剖析)
Some thoughts on writing
Ab3d.PowerToys and Ab3d.DXEngine Crack
入门3D游戏建模师知识必备
IDEA 文件编码修改
软件质量评估的通用模型
【LeetCode】Summary of Two Pointer Problems
ARC129E Yet Another Minimization 题解 【网络流笔记】
数据类型及输入输出初探(C语言)
Essential knowledge for entry-level 3D game modelers
【云原生--Kubernetes】调度约束