浏览代码

一对一聊天接口、咨询列表查询

lyr 8 年之前
父节点
当前提交
fc5622eda4

+ 8 - 0
src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java

@ -45,6 +45,14 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 0 and a.del = '1' and b.del = '1' and a.type<3 ")
	Page<ConsultTeam> findDoctorPointList(String doctor, long id, Pageable pageRequest);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 0 and a.del = '1' and b.del = '1' and (a.type = 1 or a.type = 2 or a.type = 6) ")
	Page<ConsultTeam> findDoctorAllList(String doctor, long id, Pageable pageRequest);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 0 and a.del = '1' and b.del = '1' and (a.type = 1 or a.type = 2 or a.type = 6) ")
	Page<ConsultTeam> findDoctorAllList(String doctor, Pageable pageRequest);
	// 医生参与且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 0 and b.reply = 1 and a.del = '1' and b.del = '1' and a.type<3")
	Page<ConsultTeam> findDoctorJoinList(String doctor, Pageable pageRequest);

+ 22 - 1
src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -87,7 +87,7 @@ public class ConsultTeamService extends ConsultService {
    /**
     * 查詢醫生網絡諮詢列表
     *
     * @param type     咨询类型:1、咨询我的,2、公共的, 3、参与过的,4、已结束的 5 名医咨询 全部  6 名医咨询 进行中 7 名医咨询 已结束
     * @param type     咨询类型:1、咨询我的,2、公共的, 3、参与过的,4、已结束的 5 名医咨询 全部  6 名医咨询 进行中 7 名医咨询 已结束 8名医咨询 待处理 9咨询我的三师 + 家庭 + 名医
     * @param id
     * @param pagesize 每页显示数,默认为10
     * @return
@ -126,6 +126,8 @@ public class ConsultTeamService extends ConsultService {
                return findByDoctorType6(uid, 1, id, pagesize, title);
            case 8:
                return findByDoctorType8(uid, id, pagesize, title);
            case 9:
                return findByDoctorType9(uid, id, pagesize);
        }
        return null;
    }
@ -251,6 +253,25 @@ public class ConsultTeamService extends ConsultService {
        }
    }
    /**
     * 指定医生三师咨询列表查询
     *
     * @param uid      医生标识
     * @param pagesize
     * @return
     */
    public Page<ConsultTeam> findByDoctorType9(String uid, long id, int pagesize) {
        // 排序
        Sort sort = new Sort(Direction.DESC, "id");
        // 分页信息
        PageRequest pageRequest = new PageRequest(0, pagesize, sort);
        if (id > 0) {
            return consultTeamDao.findDoctorAllList(uid, id, pageRequest);
        } else {
            return consultTeamDao.findDoctorAllList(uid, pageRequest);
        }
    }
    /**
     * 公共三师咨询列表查询
     *

+ 1 - 0
src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -1052,6 +1052,7 @@ public class FamilyContractService extends BaseService {
        } else {
            // 医生拒绝
            sf.setStatus(-2);
            sf.setCzrq(new Date());
            // 拒绝签约
            JSONObject json = new JSONObject();
            json.put("first", "签约失败通知");

+ 2 - 2
src/main/java/com/yihu/wlyy/service/app/talk/TalkGroupService.java

@ -363,8 +363,8 @@ public class TalkGroupService extends BaseService {
                        }
                    }
                    objRe.put("uid",obj.getString("uid"));
                    objRe.put("fromUid",obj.getString("peer_uid"));
                    objRe.put("uid",obj.getString("uid") != null ? obj.getString("uid") :"");
                    objRe.put("fromUid",obj.getString("peer_uid") != null ? obj.getString("peer_uid") : "");
                    objRe.put("fromName",fromDoctor.getName());
                    objRe.put("fromLevel",fromDoctor.getLevel());
                    objRe.put("photo",StringUtils.isEmpty(fromDoctor.getPhoto())?"":fromDoctor.getPhoto());

+ 1 - 1
src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -54,7 +54,7 @@ public class DoctorConsultController extends WeixinBaseController {
	/**
	 * 三师咨询列表查询
	 * @param type 咨询类型:0、全部,1、咨询我的,2、公共的, 3、参与过的,4、已结束的  5 名医咨询 全部  6 名医咨询 进行中 7 名医咨询 已结束 8名医咨询 待处理
	 * @param type 咨询类型:0、全部,1、咨询我的,2、公共的, 3、参与过的,4、已结束的  5 名医咨询 全部  6 名医咨询 进行中 7 名医咨询 已结束 8名医咨询 待处理 9咨询我的三师 + 家庭 + 名医
	 * @param id
	 * @param pagesize 每页显示数,默认为10
	 * @return

+ 2 - 2
src/main/resources/system.properties

@ -62,7 +62,7 @@ appSecret=2935b54b53a957d9516c920a544f2537
wechat_base_url=http%3a%2f%2fweixin.xmtyw.cn%2fwlyy
wechat_token=27eb3bb24f149a7760cf1bb154b08040
#是否签约检查和签约数据上传
sign_check_upload=http://192.168.131.10:8011
sign_check_upload=http://192.168.131.10:8011/wlyy_service
#im一对一列表获取
im_list_get=http://172.19.103.76:3000/
@ -76,7 +76,7 @@ im_list_get=http://172.19.103.76:3000/
#wechat_base_url=http%3a%2f%2fehr.yihu.com%2fwlyy
#wechat_token=27eb3bb24f149a7760cf1bb154b08040
##是否签约检查和签约数据上传
#sign_check_upload=http://172.19.103.85:8011
#sign_check_upload=http://172.19.103.85:8011/wlyy_service
##im一对一列表获取
#im_list_get=http://172.13.103.88:3000/