wujunjie 7 роки тому
батько
коміт
eb5dcfc978

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/template/DoctorTeamGuidanceTemplateDao.java

@ -67,8 +67,8 @@ public interface DoctorTeamGuidanceTemplateDao extends PagingAndSortingRepositor
    List<DoctorTeamGuidanceTemplate> countTeamListByTile(String doctor, String title);
    // 根据模板文章标题模糊搜索团队指导模板
    @Query("SELECT b FROM DoctorTeamGuidanceDetail a, DoctorTeamGuidanceTemplate b WHERE a.code = b.teamTemplateCode  " +
            " AND b.del = 1 AND b.creater = ?1 AND b.title LIKE ?2 order by b.useTimes desc ,b.createTime desc ")
    @Query("SELECT b FROM DoctorTeamGuidanceTemplate b ,DoctorTeamGuidanceDetail a WHERE a.code = b.teamTemplateCode  " +
            " AND b.del = 1 AND b.creater = ?1 AND b.title LIKE ?2 ")
    List<DoctorTeamGuidanceTemplate> getListByTile(String doctor, String title, Pageable pageRequest);
}

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/template/DoctorTeamGuidanceService.java

@ -269,7 +269,7 @@ public class DoctorTeamGuidanceService extends BaseService {
     * @throws Exception
     */
    public List getTeamGuidanceList(String doctor, String filter, Integer teamId, int pageNo, int pageSize) throws Exception {
        Sort sort = new Sort(Sort.Direction.DESC, "createTime");
        Sort sort = new Sort(Sort.Direction.DESC, "useTimes","createTime");
        PageRequest request = new PageRequest(pageNo, pageSize, sort);
        List list = new ArrayList();
        List<DoctorTeamGuidanceTemplate> listGuidances = null;
@ -288,6 +288,7 @@ public class DoctorTeamGuidanceService extends BaseService {
            map.put("teamTemplateCode", teamTemplateCode);
            map.put("title", title);
            map.put("useTimes", useTimes);
            map.put("createTime", guidance.getCreateTime());
            list.add(map);
        }