Commit 1e6d66b67b41f5504357ebaa1c2dd809945c69dd
1 parent
13c5b38734
Exists in
master
update
Showing 2 changed files with 22 additions and 1 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java
View file @
1e6d66b
| ... | ... | @@ -2,6 +2,8 @@ |
| 2 | 2 | |
| 3 | 3 | import com.alibaba.fastjson.JSONArray; |
| 4 | 4 | import com.alibaba.fastjson.JSONObject; |
| 5 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 6 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
| 5 | 7 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | 9 | import com.lyms.talkonlineweb.domain.*; |
| ... | ... | @@ -10,6 +12,7 @@ |
| 10 | 12 | import com.lyms.talkonlineweb.util.Constant; |
| 11 | 13 | import com.lyms.talkonlineweb.util.HXService; |
| 12 | 14 | import com.lyms.talkonlineweb.util.JwtUtils; |
| 15 | +import com.lyms.talkonlineweb.util.StringUtil; | |
| 13 | 16 | import org.springframework.beans.factory.annotation.Autowired; |
| 14 | 17 | import org.springframework.validation.BindingResult; |
| 15 | 18 | import org.springframework.validation.annotation.Validated; |
| 16 | 19 | |
| ... | ... | @@ -234,8 +237,15 @@ |
| 234 | 237 | @GetMapping("appGetDoctorList") |
| 235 | 238 | public BaseResponse appGetDoctorList(AppgetdoctorlistInfo appgetdoctorlistInfo, int current, int size){ |
| 236 | 239 | BaseResponse baseResponse=new BaseResponse(); |
| 240 | + LambdaQueryWrapper<AppgetdoctorlistInfo> queryWrapper = new QueryWrapper().lambda(); | |
| 241 | + queryWrapper.setEntity(appgetdoctorlistInfo); | |
| 242 | + if(StringUtil.isNotEmpty(appgetdoctorlistInfo.getSearchinfo())){ | |
| 243 | + queryWrapper.eq(AppgetdoctorlistInfo::getDname, appgetdoctorlistInfo.getSearchinfo()) | |
| 244 | + .or().eq(AppgetdoctorlistInfo::getDpname,appgetdoctorlistInfo.getSearchinfo()) | |
| 245 | + .or().eq(AppgetdoctorlistInfo::getLvlname, appgetdoctorlistInfo.getSearchinfo()); | |
| 246 | + } | |
| 237 | 247 | Page<AppgetdoctorlistInfo> page=new Page<>(current,size); |
| 238 | - Page<AppgetdoctorlistInfo> appgetdoctorlistInfoPage=appgetdoctorlistInfoService.page(page,Wrappers.query(appgetdoctorlistInfo)); | |
| 248 | + Page<AppgetdoctorlistInfo> appgetdoctorlistInfoPage=appgetdoctorlistInfoService.page(page,queryWrapper); | |
| 239 | 249 | baseResponse.setObject(appgetdoctorlistInfoPage); |
| 240 | 250 | |
| 241 | 251 | return baseResponse; |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/AppgetdoctorlistInfo.java
View file @
1e6d66b
| ... | ... | @@ -27,6 +27,12 @@ |
| 27 | 27 | private Integer hid; |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | + * 医生头像 | |
| 31 | + */ | |
| 32 | + @TableField(value = "headimg") | |
| 33 | + private String headimg; | |
| 34 | + | |
| 35 | + /** | |
| 30 | 36 | * 医生名称 |
| 31 | 37 | */ |
| 32 | 38 | @TableField(value = "dname") |
| ... | ... | @@ -55,6 +61,11 @@ |
| 55 | 61 | */ |
| 56 | 62 | @TableField(value = "intro") |
| 57 | 63 | private String intro; |
| 64 | + /** | |
| 65 | + * 搜索内容 | |
| 66 | + */ | |
| 67 | + @TableField(exist = false) | |
| 68 | + private String searchinfo; | |
| 58 | 69 | |
| 59 | 70 | @TableField(exist = false) |
| 60 | 71 | private static final long serialVersionUID = 1L; |