|
|
@@ -102,9 +102,16 @@ public class homepage extends Controller {
|
|
|
* @return
|
|
|
*/
|
|
|
public String agentList() {
|
|
|
- SQLFactory agentlistSql = new SQLFactory(this, "优质商户", pageSize, pageNumber, "t1.tagentsid");
|
|
|
- agentlistSql.addParameter("saleprodclass", content.getString("saleprodclass"));
|
|
|
- agentlistSql.addParameter("siteid", siteid);
|
|
|
+ SQLFactory agentlistSql = null;
|
|
|
+ if (content.containsKey("saleprodclass") && !"".equals(content.getString("saleprodclass"))) {
|
|
|
+ String saleprodclass = content.getString("saleprodclass");
|
|
|
+ agentlistSql = new SQLFactory(this, "优质商户", pageSize, pageNumber, "t1.tagentsid");
|
|
|
+ agentlistSql.addParameter("saleprodclass", saleprodclass);
|
|
|
+ agentlistSql.addParameter("siteid", siteid);
|
|
|
+ } else {
|
|
|
+ agentlistSql = new SQLFactory(this, "优质商户_全部", pageSize, pageNumber, "t1.tagentsid");
|
|
|
+ agentlistSql.addParameter("siteid", siteid);
|
|
|
+ }
|
|
|
Rows rows = agentlistSql.runSqlQuery();
|
|
|
RowsMap map = getAttachmentUrl("tagents", rows.toArrayList("tagentsid"));
|
|
|
for (Row row : rows) {
|