Commit feb7bf85 by 宋毅

tj

parent 684673ce
......@@ -58,7 +58,7 @@ class TmOrderAPI extends APIBase {
"tmConfirm", "updateTmInfo", "updateNclInfo", "updateContacts",
"updateCustomerInfo", "addOrderAndDelivery", "updateOrderPayStatus"].indexOf(action_type) >= 0) {
if (!action_body.channelUserId) {
return system.getResult(-99, "verify channelUserId is empty");
return system.getResultFail(-99, "verify channelUserId is empty");
}
}
switch (action_type) {
......
......@@ -67,19 +67,19 @@ class AccessAuthAPI extends APIBase {
case "userPinByLgoin":
opResult = await this.opPlatformUtils.getReqUserPinByLgoin(action_body, userpin);
if (opResult.status == 0) {
return system.getResultSuccess({ userpin: userpin, channelUserId: encryptStrResult.data, userName: opStr })
return system.getResultSuccess({ userpin: userpin, channelUserId: encryptStrResult.data, userName: opStr, isAdmin: opResult.data.isAdmin || 0 })
}
break;
case "userPinByLgoinVcode":
opResult = await this.opPlatformUtils.getReqUserPinByLgoinVcode(action_body, userpin, "login");
if (opResult.status == 0) {
return system.getResultSuccess({ userpin: userpin, channelUserId: encryptStrResult.data, userName: opStr })
return system.getResultSuccess({ userpin: userpin, channelUserId: encryptStrResult.data, userName: opStr, isAdmin: opResult.data.isAdmin || 0 })
}
break;
case "userPinByRegister":
opResult = await this.opPlatformUtils.getReqUserPinByLgoinVcode(action_body, userpin, "reg");
if (opResult.status == 0) {
return system.getResultSuccess({ userpin: userpin, channelUserId: encryptStrResult.data, userName: opStr })
return system.getResultSuccess({ userpin: userpin, channelUserId: encryptStrResult.data, userName: opStr, isAdmin: opResult.data.isAdmin || 0 })
}
break;
case "logout":
......
......@@ -21,6 +21,7 @@ class AppUserDao extends Dao {
"orgName",
"orgPath",
"isEnabled",
"isAdmin",
"loginNum",
"lastLoginTime"],
raw: true
......
......@@ -14,7 +14,8 @@ module.exports = (db, DataTypes) => {
orgPath : DataTypes.STRING(255), // 组织结构路径
isEnabled : DataTypes.INTEGER, // 是否启用
loginNum : DataTypes.INTEGER, // 登录次数
lastLoginTime : DataTypes.DATE, // 上次登录时间
lastLoginTime : DataTypes.DATE, // 上次登录时间
isAdmin : DataTypes.INTEGER, // 是否管理员
}, {
paranoid: false,//假的删除
underscored: true,
......
......@@ -654,6 +654,10 @@ class OrderTmProductService extends ServiceBase {
var sqlCount = "SELECT count(1) as dataCount FROM `b_order_tm_product` AS tm LEFT JOIN `b_order` AS o ON tm.`sourceOrderNo`=o.`orderNo` LEFT JOIN" +
" `b_customerinfo` AS c ON tm.`deliveryOrderNo`=c.`deliveryOrderNo` where tm.deleted_at is null ";
var paramWhere = {};
sql += " and tm.app_id=:app_id";
sqlCount += " and tm.app_id=:app_id";
paramWhere.app_id = req.app.id;
if (["1688", "jd", "gsbhome"].indexOf(pobj.actionProcess) >= 0) {
sql += " and o.orderPayStatus=:orderPayStatus";
sqlCount += " and o.orderPayStatus=:orderPayStatus";;
......@@ -661,7 +665,7 @@ class OrderTmProductService extends ServiceBase {
}
if (req.user) {
if (params.getListType && params.getListType == "getTmOrderListAdmin") {
if (["syaify", "jd_613f2fd04340f"].indexOf(req.user.channelUserId) < 0) {
if (["syaify", "jd_613f2fd04340f"].indexOf(req.user.channelUserId) < 0 && req.user.isAdmin != 1) {
sql += " and tm.createuser_id=:createuser_id";
sqlCount += " and tm.createuser_id=:createuser_id";
paramWhere.createuser_id = req.user.id;
......
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