当前位置:网站首页>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.
边栏推荐
- .net (C#) get year month day between two dates
- 关于我仔细检查审核过关于工作人员页面,返回一个所属行业问题
- 怎样进行在不改变主线程执行的时候,进行日志的记录
- #yyds dry goods inventory #Switching equipment serious packet loss troubleshooting
- 什么是次世代建模(附学习资料)
- IDEA 文件编码修改
- 中日颜色风格
- D - I Hate Non-integer Number (选数的计数dp
- golang 协程的实现原理
- could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
猜你喜欢
"Relish Podcast" #397 The factory manager is here: How to use technology to empower the law?
倒计时1天!8月2日—4日与你聊聊开源与就业那些事!
KT6368A Bluetooth certification problem_FCC and BQB_CE_KC certification or other instructions
怎么将自己新文章自动推送给自己的粉丝(巨简单,学不会来打我)
看图识字,DELL SC4020 / SCv2000 控制器更换过程
软件开发工具的技术要素
统计单词(DAY 101)华中科技大学考研机试题
三、实战---爬取百度指定词条所对应的结果页面(一个简单的页面采集器)
电赛必备技能___定时ADC+DMA+串口通信
数据类型及输入输出初探(C语言)
随机推荐
2 用D435i运行VINS-fusion
入门3D游戏建模师知识必备
DNS常见资源记录类型详解
KT148A voice chip ic working principle and internal architecture description of the chip
翁恺C语言程序设计网课笔记合集
统计单词(DAY 101)华中科技大学考研机试题
Statistical words (DAY 101) Huazhong University of Science and Technology postgraduate examination questions
Mysql based
【云原生--Kubernetes】调度约束
How to automatically push my new articles to my fans (very simple, can't learn to hit me)
网站最终产品页使用单一入口还是多入口?
Couple Holding Hands [Greedy & Abstract]
Metasploit-域名上线隐藏IP
tensor.nozero(), mask, [mask]
10 个关于 Promise 和 setTimeout 知识的面试题,通过图解一次说透彻
D - I Hate Non-integer Number (选数的计数dp
#yyds干货盘点#交换设备丢包严重的故障处理
【云原生--Kubernetes】Pod控制器
Brainstorm: Complete Backpack
标识符、关键字、常量 和变量(C语言)