|
@@ -15,8 +15,9 @@ import java.util.List;
|
|
|
public interface CommentsDao {
|
|
|
@Select("select * from " +
|
|
|
"(SELECT ROW_NUMBER() OVER(ORDER BY id) AS idx,*, " +
|
|
|
- "department=(select rtrim(d.dept_code) from a_employee_mi d where d.code=doctor_code) " +
|
|
|
- "from t_wechat_patient_comment ${ew.customSqlSegment}) t " +
|
|
|
+ "department=(select rtrim(d.dept_code) from a_employee_mi d where d.code=doctor_code), " +
|
|
|
+ "patPhoneNo=(select top 1 d.phone from t_wechat_patient_bind d where d.patient_id=a.patient_id and d.phone is not null) " +
|
|
|
+ "from t_wechat_patient_comment a ${ew.customSqlSegment}) t " +
|
|
|
"where t.idx>(#{page}-1)*#{size} and t.idx<=#{page}*#{size}")
|
|
|
List<WechatPatientComment> selectComments(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper,
|
|
|
@Param("page") int page, @Param("size") int size);
|
|
@@ -24,9 +25,6 @@ public interface CommentsDao {
|
|
|
@Select("select count(1) from t_wechat_patient_comment ${ew.customSqlSegment}")
|
|
|
int selectValidCount(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
|
|
|
|
|
|
- @Select("select top 1 phone from t_wechat_patient_bind where patient_id=#{patNo} and phone is not null ")
|
|
|
- String selectPatientPhoneNo(String patNo);
|
|
|
-
|
|
|
@Update("update t_wechat_patient_comment set deleted=#{val},delete_staff=#{staff},delete_time=#{date} where id=#{id}")
|
|
|
int updateCommentStatus(int id, int val, String staff, Date date);
|
|
|
}
|