Przeglądaj źródła

到取模板消息

shish 6 lat temu
rodzic
commit
0521512ea2

+ 6 - 5
biz/admin/services/AdminShopService.php

@@ -83,7 +83,8 @@ class AdminShopService extends BaseService
 	}
 	
 	//获取管理员 shish 2020.4.21
-	public static function getAdminList($where)
+	// $sensitive true 密码等敏感信息不显示
+	public static function getAdminList($where, $sensitive = true)
 	{
 		$data = AdminShopClass::getList('*', $where, 'addTime DESC');
 		$list = isset($data['list']) && !empty($data['list']) ? $data['list'] : [];
@@ -94,7 +95,7 @@ class AdminShopService extends BaseService
 		//管理员基础信息
 		$ids = array_column($list, 'adminId');
 		$adminInfo = AdminClass::getByIds($ids, null, 'id');
-		$adminBaseInfo = AdminClass::groupAdminBaseInfo($adminInfo);
+		$adminBaseInfo = AdminClass::groupAdminBaseInfo($adminInfo, $sensitive);
 		
 		$roleIds = array_column($list, 'roleId');
 		$roleIds = array_filter(array_unique($roleIds));
@@ -112,12 +113,12 @@ class AdminShopService extends BaseService
 		$data['list'] = $list;
 		return $data;
 	}
-
+	
 	//获取要通知的管理员 shish 2020.4.28
 	public static function getNoticeAdminList($shopId)
 	{
 		$where = ['shopId' => $shopId];
-		$respond = self::getAdminList($where);
+		$respond = self::getAdminList($where, false);
 		$list = isset($respond['list']) ? $respond['list'] : [];
 		if (!empty($list)) {
 			foreach ($list as $key => $val) {
@@ -128,7 +129,7 @@ class AdminShopService extends BaseService
 		}
 		return $list;
 	}
-
+	
 	public static function valid($adminShop, $shopId)
 	{
 		if (isset($adminShop['shopId']) == false || $adminShop['shopId'] != $shopId) {

+ 1 - 1
biz/message/services/InformAdminService.php

@@ -56,7 +56,7 @@ class InformAdminService extends BaseService
 		$noticeWay = 0;
 		if ($informWay == 'wx') {
 			$tMessage = json_decode($data['tMessage'], true);
-			$r = wxUtil::sendTaskInform($tMessage, $merchant, 1);
+			$r = wxUtil::sendTaskInform($tMessage, $merchant, $isOpen);
 			print_r($r);
 			$hasSend = 1;
 			$noticeWay = 0;