|
@ -107,7 +107,8 @@ public class HealthEduArticleDoctorService extends BaseService {
|
|
|
sql.append(",(select count(1) from wlyy_health_edu_article_op_history c where c.code = a.article and c.status = 3) as repeatAmount");
|
|
|
if(StringUtils.isNotBlank(patient)) {
|
|
|
params.add(doctor);
|
|
|
sql.append(",(select count(1) from wlyy_health_edu_article_patient c where c.article = a.article and c.doctor=?) as send");
|
|
|
params.add(patient);
|
|
|
sql.append(",(select count(1) from wlyy_health_edu_article_patient c where c.article = a.article and c.doctor=? and c.patient = ?) as send");
|
|
|
}
|
|
|
sql.append(" from wlyy_health_edu_article_doctor a left join wlyy_health_edu_article b on a.article = b.code ");//内联取文章内容
|
|
|
String where = " where a.doctor = ?";
|
|
@ -124,7 +125,7 @@ public class HealthEduArticleDoctorService extends BaseService {
|
|
|
|
|
|
String pageInfo = " limit "+start+","+pagesize;
|
|
|
|
|
|
String orderBy = " order by a.id,a.czrq desc";
|
|
|
String orderBy = " order by a.czrq,a.id desc";
|
|
|
|
|
|
sql.append(where).append(orderBy).append(pageInfo);
|
|
|
List<Map<String, Object>> result = jdbcTemplate.queryForList(sql.toString(),params.toArray());
|