接口的开发:
查询所有的患者的信息
-
其中设计到单张表(TbUser表)
-
后台管理,直接显示出所有患者信息列表
-
Controller
-
/**
* 后台管理查询所有患者的信息
* @return
*/
-
-
ITbUserService
-
/**
* 查询用户患者所有信息
* @return 结果
*/
public List<TbUser> selectUserInfo();
-
-
TbUserServiceIpml
-
/**
* 查询所有的患者的信息
* @return
*/
-
模糊查询患者的信息
-
其中设计到单张表(TbUser表)
-
我在后台管理的中有一个功能是查询功能,这里就涉及到这个模糊的查询,填写的参数有三个
-
Controller
-
/**
* 模糊查询查询该用户的基本信息后台管理
*/
-
-
ITbUserService
-
/**
* 根据userID查询该用户的基本信息后台管理
* @param
* @return
*/
List<TbUser> getUserIdInfo(String name,String cardNumber,String phonenumber);
-
-
TbUserServiceIpml
-
/**
* 根据userID查询该用户的基本信息后台管理
* @return
*/
-
根据片区查询出其中的患者
-
其中设计到单张表(TbUser表)
-
后台管理的中有一个功能是筛选片区患者的功能,这里就涉及到这个查询,将返回给你的areaId到患者表中找了同一个片区的所有患者
-
Controller
-
修改用户的信息后台管理
-
其中设计到单张表(TbUser表)
-
后台管理的患者的信息有误,就要进行修改
-
Controller
-
/**
* 修改用户的信息后台管理
* @param userInfo
* @return
*/
-
-
ITbUserService
-
/**
* 修改后台管理的用户信息
* @param userInfo
* @return
*/
boolean updateUserIdInfo(UserInfo userInfo);
-
-
TbUserServiceIpml
-
/**
* 修改用户的个人信息后台管理
* @param userInfo
* @return
*/
-
问题及解决
没有该数据bug
分析:就是在user表中的字段要连接关联的一些表,当user表中的数据为空,根据找不到关联表中的数据了
学习重点及理解
查询所有患者的接口调用
-
user1.js
-
// 查询用户列表
export function listUser1(query) {
return request({
url: '/business/user/selectUserInfoList',
method: 'get',
params: query
})
}
-
-
user1.vue
-
/** 查询用户列表 */
getList() {
this.loading = true;
listUser1(this.queryParams).then(response => {
this.user1List = response.data.slice((this.queryParams.pageNum-1)*this.queryParams.pageSize,(this.queryParams.pageNum-1)*this.queryParams.pageSize+this.queryParams.pageSize);
this.total = response.total;
this.loading = false;
});
},
-
修改患者的接口调用
-
user1.js
-
// 修改用户
export function updateUser1(params) {
return request({
url: '/business/user/updataUserIdInfo',
method: 'put',
params
})
}
-
-
user1.vue
删除患者的接口调用
-
user1.js
-
// 删除用户
export function delUser1(params) {
return request({
url: '/business/user/deleteUserInfoAll',
method: 'delete',
params
})
}
-
-
user1.vue
-
/** 修改按钮操作 数据回显*/
handleUpdate(row) {
this.reset();
const userId = row.userId || this.ids
const name = row.name || this.ids
const cardNumber = row.cardNumber || this.ids
const sex = row.sex || this.ids
const birth = row.birth || this.ids
const phonenumber = row.phonenumber || this.ids
const homeAddress = row.homeAddress || this.ids
const workUnit = row.workUnit || this.ids
const nation = row.nation || this.ids
const liveAlone = row.liveAlone || this.ids
const height = row.height || this.ids
const weight = row.weight || this.ids
const chestMeasurement = row.chestMeasurement || this.ids
const bloodFat = row.bloodFat || this.ids
const totalCholesterol = row.totalCholesterol || this.ids
const highDensityLipoprotein = row.highDensityLipoprotein || this.ids
const lowDensityLipoprotein = row.lowDensityLipoprotein || this.ids
// getUser1(name).then(response => {
this.form.userId = userId;
this.form.name = name;
this.form.cardNumber = cardNumber;
this.form.sex = sex;
this.form.birth = birth;
this.form.phonenumber = phonenumber;
this.form.homeAddress = homeAddress;
this.form.workUnit = workUnit;
this.form.nation = nation;
this.form.liveAlone = liveAlone;
this.form.height = height;
this.form.weight = weight;
this.form.chestMeasurement = chestMeasurement;
this.form.
-