|
|
@@ -7,6 +7,7 @@ import common.Controller;
|
|
|
import common.YosException;
|
|
|
import common.annotation.API;
|
|
|
import common.data.*;
|
|
|
+import common.data.cache.BaseCacheModel;
|
|
|
import common.data.cache.DataCachePool;
|
|
|
import restcontroller.R;
|
|
|
import utility.wechat.WeChatHelper;
|
|
|
@@ -16,7 +17,6 @@ import java.util.ArrayList;
|
|
|
|
|
|
import static utility.wechat.WeChatHelper.refund;
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
*
|
|
|
*/
|
|
|
@@ -138,15 +138,15 @@ public class payorder extends Controller {
|
|
|
// String sql = sqlFactory.getSQL();
|
|
|
// Rows rows = dbConnect.runSqlQuery(sql);
|
|
|
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_site_parameter", "sys_site_parameterid");
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_site_parameter", "sys_site_parameterid");
|
|
|
querySQL.setTableAlias("t0");
|
|
|
- querySQL.addJoinTable(JOINTYPE.right, sqlFactory, "t1", "t0.siteid='111'","*");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.right, sqlFactory, "t1", "t0.siteid='111'", "*");
|
|
|
querySQL.setPage(pageSize, pageNumber);
|
|
|
Rows rows = querySQL.query();
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
|
|
|
|
- @API(title = "付费订单列表",apiversion = R.ID20230904132202.v1.class)
|
|
|
+ @API(title = "付费订单列表", apiversion = R.ID20230904132202.v1.class)
|
|
|
public String list() throws YosException {
|
|
|
StringBuffer where = new StringBuffer(" 1=1 ");
|
|
|
if (content.containsKey("where")) {
|
|
|
@@ -184,12 +184,12 @@ public class payorder extends Controller {
|
|
|
// Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_payorder", "sys_payorderid", "orderno",
|
|
|
- "paymode","amount","ispaid","remarks","createdate");
|
|
|
+ "paymode", "amount", "ispaid", "remarks", "createdate");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
querySQL.addJoinTable(JOINTYPE.inner, "sys_enterprise_hr", "t2", "t2.userid = t1.createuserid and t2.siteid = t1.siteid");
|
|
|
querySQL.addJoinTable(JOINTYPE.inner, "sa_agents", "t3", "t3.sys_enterpriseid = t2.sys_enterpriseid");
|
|
|
- querySQL.addJoinTable(JOINTYPE.inner, "sys_enterprise", "t4", "t4.sys_enterpriseid = t3.sys_enterpriseid","enterprisename");
|
|
|
- querySQL.addQueryFields("paytime","ifnull(t1.paytime, '')");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.inner, "sys_enterprise", "t4", "t4.sys_enterpriseid = t3.sys_enterpriseid", "enterprisename");
|
|
|
+ querySQL.addQueryFields("paytime", "ifnull(t1.paytime, '')");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
querySQL.setWhere("t1.deleted = 0 and t1.ispaid!=2");
|
|
|
querySQL.setWhere(where.toString());
|
|
|
@@ -270,9 +270,9 @@ public class payorder extends Controller {
|
|
|
// Rows rows = dbConnect.runSqlQuery(sql);
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_enterprise_hr", "userid", "isleader");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
- querySQL.addJoinTable(JOINTYPE.inner, "sys_users", "t2", "t2.userid = t1.userid and t2.status!='DELETED'","name","accountno","phonenumber");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "sa_agents", "t5", "t5.sys_enterpriseid = t1.sys_enterpriseid and t5.siteid = t1.siteid","sa_agentsid");
|
|
|
- querySQL.addJoinTable(JOINTYPE.inner, "sys_enterprise", "t6", "t6.sys_enterpriseid = t5.sys_enterpriseid","enterprisename");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.inner, "sys_users", "t2", "t2.userid = t1.userid and t2.status!='DELETED'", "name", "accountno", "phonenumber");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sa_agents", "t5", "t5.sys_enterpriseid = t1.sys_enterpriseid and t5.siteid = t1.siteid", "sa_agentsid");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.inner, "sys_enterprise", "t6", "t6.sys_enterpriseid = t5.sys_enterpriseid", "enterprisename");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
querySQL.setWhere(where.toString());
|
|
|
querySQL.setPage(pageSize, pageNumber);
|
|
|
@@ -533,26 +533,24 @@ public class payorder extends Controller {
|
|
|
DataCachePool.Attached_Key key_siteid = new DataCachePool.Attached_Key("siteid", siteid);
|
|
|
DataCachePool.Attached_Key key_classpath = new DataCachePool.Attached_Key("classpath", "restcontroller.system.message.Message");
|
|
|
DataCachePool.Attached_Key key_method = new DataCachePool.Attached_Key("method", "queryMessage");
|
|
|
- for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey("yos","api", key_userid,key_siteid, key_classpath, key_method)) {
|
|
|
+ for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey(BaseCacheModel.api, key_userid, key_siteid, key_classpath, key_method)) {
|
|
|
cacheItem.remove();
|
|
|
}
|
|
|
DataCachePool.Attached_Key key_method2 = new DataCachePool.Attached_Key("method", "unReadMessageCount");
|
|
|
- for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey("yos","api", key_userid,key_siteid, key_classpath, key_method2)) {
|
|
|
+ for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey(BaseCacheModel.api, key_userid, key_siteid, key_classpath, key_method2)) {
|
|
|
cacheItem.remove();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
-
|
|
|
DataCachePool.Attached_Key key_userid = new DataCachePool.Attached_Key("userid", userid);
|
|
|
DataCachePool.Attached_Key key_siteid = new DataCachePool.Attached_Key("siteid", siteid);
|
|
|
DataCachePool.Attached_Key key_classpath = new DataCachePool.Attached_Key("classpath", "restcontroller.system.message.Message");
|
|
|
DataCachePool.Attached_Key key_method = new DataCachePool.Attached_Key("method", "queryMessage");
|
|
|
- for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey("yos","api", key_userid,key_siteid, key_classpath, key_method)) {
|
|
|
+ for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey(BaseCacheModel.api, key_userid, key_siteid, key_classpath, key_method)) {
|
|
|
cacheItem.remove();
|
|
|
}
|
|
|
DataCachePool.Attached_Key key_method2 = new DataCachePool.Attached_Key("method", "unReadMessageCount");
|
|
|
- for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey("yos","api", key_userid,key_siteid, key_classpath, key_method2)) {
|
|
|
+ for (DataCachePool.CacheItem cacheItem : DataCachePool.attachedKey(BaseCacheModel.api, key_userid, key_siteid, key_classpath, key_method2)) {
|
|
|
cacheItem.remove();
|
|
|
}
|
|
|
|