|
@@ -357,7 +357,7 @@ public class DesignPic extends Controller {
|
|
|
|
|
|
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, sat_sharematerial,
|
|
|
- "sat_sharematerialid", "title", "title_c", "commentcount", "likecount", "collectcount", "createuserid", "createby", "createdate")
|
|
|
+ "sat_sharematerialid", "title_c", "commentcount", "likecount", "collectcount", "createuserid", "createby", "createdate")
|
|
|
.setTableAlias("t1");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sys_datacollect", "t2", "t2.siteid=t1.siteid and t2.ownertable='sat_sharematerial' and t2.type=1 and t2.ownerid=t1.sat_sharematerialid and t2.userid='" + userid + "'");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t3", "t3.sys_enterpriseid=t1.sys_enterpriseid and t3.siteid=t1.siteid"
|
|
@@ -365,6 +365,7 @@ public class DesignPic extends Controller {
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sys_datacollect", "t4", "t4.siteid=t1.siteid and t4.ownertable='sat_sharematerial' and t4.type=2 and t4.ownerid=t1.sat_sharematerialid and t4.userid='" + userid + "'");
|
|
|
querySQL.addQueryFields("iscollect", "CASE WHEN t2.sys_datacollectid>0 THEN 1 ELSE 0 END");
|
|
|
querySQL.addQueryFields("islike", "CASE WHEN t4.sys_datacollectid>0 THEN 1 ELSE 0 END");
|
|
|
+ querySQL.addQueryFields("title", "CASE WHEN t1.title is null THEN t1.title_c ELSE t1.title END");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
querySQL.setWhere("classid", 5);
|
|
|
querySQL.setWhere("status='发布'");
|