|
|
@@ -249,10 +249,11 @@ public class DesignPic extends Controller {
|
|
|
|
|
|
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, sat_sharematerial,
|
|
|
- "sat_sharematerialid", "title", "status", "type", "commentcount", "likecount", "collectcount", "sequence", "createby", "createdate", "checkdate", "renderingsclass","panoramaurl")
|
|
|
+ "sat_sharematerialid", "status", "type", "commentcount", "likecount", "collectcount", "sequence", "createby", "createdate", "checkdate", "renderingsclass","panoramaurl")
|
|
|
.setTableAlias("t1");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t3", "t3.sys_enterpriseid=t1.sys_enterpriseid and t3.siteid=t1.siteid"
|
|
|
, "enterprisename", "sys_enterpriseid");
|
|
|
+ querySQL.addQueryFields("title", "CASE WHEN length(t1.title)=0 THEN t1.title_c ELSE t1.title END");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
querySQL.setWhere("classid", 5);
|
|
|
querySQL.setWhere(where.toString());
|
|
|
@@ -365,7 +366,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.addQueryFields("title", "CASE WHEN length(t1.title)=0 THEN t1.title_c ELSE t1.title END");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
querySQL.setWhere("classid", 5);
|
|
|
querySQL.setWhere("status='发布'");
|