prescript

This commit is contained in:
wangjinlei
2023-12-19 16:23:18 +08:00
parent 42cbc1155e
commit d12949549d
5 changed files with 41 additions and 5 deletions

View File

@@ -79,9 +79,7 @@ public class MyUserController {
@RequestMapping("/getUserList")
public R getUserList(@RequestBody PageIdDto p){
LambdaQueryWrapper<MyUserEntity> wrapper = new LambdaQueryWrapper<>();
if(!p.getKey().equals(null)&&p.getKey()!=""){
wrapper.eq(MyUserEntity::getTel,p.getKey()).or().eq(MyUserEntity::getName,p.getKey());
}
wrapper.and(p.getKey()!="",k->k.like(MyUserEntity::getName,p.getKey()).or().like(MyUserEntity::getTel,p.getKey()));
wrapper.orderByDesc(MyUserEntity::getCreateTime);
Page<MyUserEntity> myUserEntityPage = userService.getBaseMapper().selectPage(new Page<MyUserEntity>(p.getPage(), p.getLimit()), wrapper);
@@ -130,7 +128,6 @@ public class MyUserController {
*/
@RequestMapping("/update")
public R update(@RequestBody MyUserEntity user){
System.out.println(user.toString());
userService.updateById(user);
return R.ok();
}

View File

@@ -75,6 +75,19 @@ public class PrescriptController {
return R.ok();
}
/**
* 查找方药文章
* @param map
* @return
*/
@RequestMapping("/searchPrescript")
public R searchPrescript(@RequestBody Map<String,Object> map){
Integer type = Integer.valueOf(map.get("type").toString());
String keywords = map.get("keywords").toString();
List<PrescriptEntity> prescriptEntities = prescriptService.searchPrescripts(type, keywords);
return R.ok().put("list",prescriptEntities);
}
/**
* 修改方剂文章
* @param p