shish 4 년 전
부모
커밋
06d8c15158
2개의 변경된 파일3개의 추가작업 그리고 16개의 파일을 삭제
  1. 3 4
      biz-ghs/shop/services/ShopAdminService.php
  2. 0 12
      sql.txt

+ 3 - 4
biz-ghs/shop/services/ShopAdminService.php

@@ -58,8 +58,8 @@ class ShopAdminService extends BaseService
         $adminId = $admin['id'] ?? 0;
 
         sms::freeSend($mobile . ',' . $sjName, '欢迎加入{$var}大家庭');
-        $sjId = $shop['sjId'] ?? 0;
-        $shopAdmin = ShopAdminClass::getByCondition(['shopId' => $shopId, 'adminId' => $adminId], true);
+        $mainId = $shop['mainId'] ?? 0;
+        $shopAdmin = ShopAdminClass::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true);
         if (!empty($shopAdmin)) {
             //已删除员工补回
             if (isset($shopAdmin->delStatus) && $shopAdmin->delStatus == 1) {
@@ -80,15 +80,14 @@ class ShopAdminService extends BaseService
         } else {
             $addData = [
                 'adminId' => $adminId,
-                'shopId' => $shopId,
                 'roleId' => $roleId,
                 'remind' => $remind,
                 'status' => $status,
-                'sjId' => $sjId,
                 'name' => $name,
                 'mobile' => $mobile,
                 'avatar' => $avatar,
                 'super' => $super,
+                'mainId' => $mainId
             ];
             $shopAdmin = ShopAdminClass::add($addData);
             AdminRoleClass::counters(['num' => 1], ['id' => $roleId]);

+ 0 - 12
sql.txt

@@ -48,20 +48,8 @@ ALTER TABLE xhStatIncomeMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央i
 
 === 资产相关表中央化 shish 20220313
 
-
 执行供货商资产中央化 ./yii init/ghs-center 【库存也要中央化处理,要加入时来】!!!!
 
-DROP TABLE IF EXISTS `xhStaffMap`;
-CREATE TABLE `xhStaffMap` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  `staffId` INT(11) NOT NULL DEFAULT '0' COMMENT '员工id',
-  `sjId` INT(11) NOT NULL DEFAULT '0' COMMENT '商家id',
-  `shopId` INT(11) NOT NULL DEFAULT '0' COMMENT '门店id',
-  `ptStyle` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '所属平台 1花店 2供货商 请查看dict.php',
-  `addTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
-  `updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
-  PRIMARY KEY (`id`)
-) COMMENT='门店员工关系';
 ALTER TABLE xhStaff COMMENT '员工';
 
 ==== 员工中央化 shish 20223013