浏览代码

管理员优化

shish 6 年之前
父节点
当前提交
0b828853c4

+ 2 - 20
biz/admin/classes/AdminClass.php

@@ -180,30 +180,12 @@ class AdminClass extends BaseClass
 		}
 		self::updateById($id, $data);
 	}
-	
-	//取收款要通知的全部员工 shish 2019.12.24
-	public static function getRemindAdmin($merchantId)
-	{
-		$list = self::getAllByCondition(['merchantId' => $merchantId, 'delStatus' => 0, 'status' => 1, 'remind' => 1], null, '*');
-		if (empty($list)) {
-			return [];
-		}
-		$list = self::groupAdminBaseInfo($list);
-		return $list;
-	}
-	
-	//取商家的全部员工 shish 2019.12.24
-	public static function getAllAdmin($merchantId, $notice)
-	{
-		$list = self::getAllByCondition(['merchantId' => $merchantId, 'delStatus' => 0, 'status' => 1]);
-		return $list;
-	}
-	
+
 	public static function getByMiniOpenId($miniOpenId)
 	{
 		return self::getByCondition(['miniOpenId' => $miniOpenId]);
 	}
-	
+
 	//创建以及更新用户 shish 2020.2.7
 	public static function replaceAdmin($adminInfo, $source)
 	{

+ 0 - 12
biz/admin/services/AdminService.php

@@ -90,18 +90,6 @@ class AdminService extends BaseService
         return $data;
     }
 
-    //取商家的全部有效管理员 shish 2019.12.24
-    public static function getAllAdmin($merchantId, $notice = false)
-    {
-        AdminClass::getAllAdmin($merchantId, $notice);
-    }
-
-    //取收款要通知的全部员工 shish 2019.12.24
-    public static function getRemindAdmin($merchantId)
-    {
-        return AdminClass::getRemindAdmin($merchantId);
-    }
-
     //添加员工
     public static function addAdmin($data)
     {

+ 1 - 2
biz/admin/services/AdminShopService.php

@@ -110,11 +110,10 @@ class AdminShopService extends BaseService
 			$roleName = isset($roleList[$roleId]['roleName']) ? $roleList[$roleId]['roleName'] : '';
 			$list[$key]['roleName'] = $roleName;
 		}
-		
 		$data['list'] = $list;
 		return $data;
 	}
-	
+
 	//获取要通知的管理员 shish 2020.4.28
 	public static function getNoticeAdminList($shopId)
 	{

+ 4 - 2
biz/message/classes/InformAdminClass.php

@@ -3,6 +3,7 @@
 namespace biz\message\classes;
 
 use biz\admin\classes\AdminClass;
+use biz\admin\services\AdminShopService;
 use biz\user\classes\UserClass;
 use common\components\httpUtil;
 use common\components\wxUtil;
@@ -139,13 +140,14 @@ class InformAdminClass extends BaseClass
 	{
 		self::add($data);
 	}
-
+	
 	//订单完成通知店长 shish 2020.3.19
 	public static function sendComplete($order, $merchant)
 	{
 		$merchantId = $merchant['id'];
 		$orderId = $order['id'];
-		$adminList = AdminClass::getRemindAdmin($merchantId);
+		$shopId = $order['shopId'];
+		$adminList = AdminShopService::getNoticeAdminList($shopId);
 		$tm = xhTMessageService::getList($merchantId);
 		$shortTempId = 'OPENTM201205968';//订单送达通知
 		$tempId = $tm[$shortTempId];