Commit f28a9afe by 任晓松

getAppInfoByAppkey

parent bbbf4433
......@@ -53,7 +53,7 @@ class APIBase {
async doexec(gname, methodname, pobj, query, req) {
req.requestId = this.getUUID();
try {
if (["getTokenByHosts", "receiveCallBackNotify", "getAppInfo", "getPayInfo", "verifyAliPayReturnSign", "test"].indexOf(methodname) < 0) {
if (["getTokenByHosts", "receiveCallBackNotify", "getAppInfo", "getAppInfoByAppKey", "getPayInfo", "verifyAliPayReturnSign", "test"].indexOf(methodname) < 0) {
if (!pobj.appInfo) {
return system.getResult(null, "pobj.appInfo can not be empty !");
}
......
......@@ -50,5 +50,9 @@ class PaymentAPI extends APIBase {
async getAppInfo(pobj, qobj, req) {
return await this.utilstlbankSve.getAppItem(pobj.uappId);
}
async getAppInfoByAppKey(pobj,qobj,req){
return await this.utilstlbankSve.getAppItemByAppkey(pobj.appKey)
}
}
module.exports = PaymentAPI;
\ No newline at end of file
......@@ -29,5 +29,13 @@ class AppDao extends Dao {
raw: true
});
}
async getItemByAppKey(appKey) {
return this.model.findOne({
where: {
uapp_key: appKey
},
raw: true
});
}
}
module.exports = AppDao;
......@@ -14,6 +14,9 @@ class ProductService extends ServiceBase {
*/
async getProductList(actionBody, appInfo) {
var sql = "select * from v_product where uapp_id=" + appInfo.uapp_id + " and path_code like '" + actionBody.pathCode + "%'";
if(actionBody.productName){
sql += " and item_name like '%"+ actionBody.productName+"%'"
}
var list = await this.customQuery(sql);
return system.getResultSuccess(list);
}
......
......@@ -31,6 +31,14 @@ class utilsTlBankSve extends AppServiceBase {
}
return system.getResultSuccess(item);
}
async getAppItemByAppkey(uappId) {//根据appKey获取应用信息
var item = await this.appDao.getItemByAppKey(uappId);
if (!item) {
return system.getResult(null, "应用数据为空");
}
return system.getResultSuccess(item);
}
//-------------------------------------------h5支付-----------------开始
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment