shish 5 years ago
parent
commit
b8e8aabbb1

+ 1 - 1
app-pt/controllers/DrawCashController.php

@@ -97,7 +97,7 @@ class DrawCashController extends PlatformController
 		if (!empty($resultCode) && $resultCode == 10000) {
 			xhDrawCashService::updateById($id, ['thirdSerialNumber' => $returnOrderId, 'status' => 1]);
 			$remainAmount = stringUtil::calcSub($asset['freezeBalance'], $drawAmount);
-			xhMerchantAssetService::updateByMerchantId($sjId, ['freezeBalance' => $remainAmount]);
+			xhMerchantAssetService::updateBySjId($sjId, ['freezeBalance' => $remainAmount]);
 			/*
 			$openId = $admin['openId'];
 			$openMerchant = xhWxOpenService::getMerchant();//取平台绑定的商家

+ 1 - 1
app-pt/controllers/WxOpenController.php

@@ -181,7 +181,7 @@ class WxOpenController extends PublicController
                 WxMiniBaseClass::updateById($wxMiniBaseId, $miniData);
                 util::stop($msg);
             } else {
-                xhMerchantExtendService::updateByMerchantId($id, $miniData);
+                xhMerchantExtendService::updateBySjId($id, $miniData);
                 MerchantService::updateById($id, ['miniAppId' => $authorizeAppId]);
                 Yii::info('小程序信息更新成功:' . json_encode($authorize_info));
                 util::stop("小程序信息更新成功");

+ 1 - 1
biz-ghs/merchant/classes/MerchantInitClass.php

@@ -22,7 +22,7 @@ class MerchantInitClass extends BaseClass
 		return self::getByCondition(['sjId' => $id]);
 	}
 
-	public static function updateByMerchantId($id, $data)
+	public static function updateBySjId($id, $data)
 	{
 		return self::updateByCondition(['sjId' => $id], $data);
 	}

+ 1 - 1
biz-ghs/merchant/services/MerchantAssetService.php

@@ -36,7 +36,7 @@ class MerchantAssetService extends BaseService
 	}
 	
 	//根据商家id批量取商家资产 ssh 2019.12.20
-	public static function getAssetByMerchantIds($ids)
+	public static function getAssetBySjIds($ids)
 	{
 		return MerchantAssetClass::getAllByCondition(['sjId' => ['in', $ids]], null, '*', 'sjId');
 	}

+ 1 - 1
biz-ghs/merchant/services/MerchantService.php

@@ -91,7 +91,7 @@ class MerchantService extends BaseService
         $admin = AdminService::getAdminByIds($adminIdList, null, 'id');
         //商家资产
         $sjIdList = array_column($list, 'id');
-        $asset = MerchantAssetService::getAssetByMerchantIds($sjIdList);
+        $asset = MerchantAssetService::getAssetBySjIds($sjIdList);
         //套餐
         $setIdList = array_column($list, 'setId');
         $set = SetMealService::getSetByIds($setIdList);

+ 1 - 1
biz-mall/merchant/classes/MerchantInitClass.php

@@ -22,7 +22,7 @@ class MerchantInitClass extends BaseClass
 		return self::getByCondition(['sjId' => $id]);
 	}
 
-	public static function updateByMerchantId($id, $data)
+	public static function updateBySjId($id, $data)
 	{
 		return self::updateByCondition(['sjId' => $id], $data);
 	}

+ 1 - 1
biz-mall/merchant/services/MerchantAssetService.php

@@ -25,7 +25,7 @@ class MerchantAssetService extends BaseService
 
 	
 	//根据商家id批量取商家资产 ssh 2019.12.20
-	public static function getAssetByMerchantIds($ids)
+	public static function getAssetBySjIds($ids)
 	{
 		return MerchantAssetClass::getAllByCondition(['sjId' => ['in', $ids]], null, '*', 'sjId');
 	}

+ 1 - 1
biz-mall/merchant/services/MerchantService.php

@@ -91,7 +91,7 @@ class MerchantService extends BaseService
         $admin = AdminService::getAdminByIds($adminIdList, null, 'id');
         //商家资产
         $sjIdList = array_column($list, 'id');
-        $asset = MerchantAssetService::getAssetByMerchantIds($sjIdList);
+        $asset = MerchantAssetService::getAssetBySjIds($sjIdList);
         //套餐
         $setIdList = array_column($list, 'setId');
         $set = SetMealService::getSetByIds($setIdList);

+ 1 - 1
biz/sj/classes/MerchantInitClass.php

@@ -22,7 +22,7 @@ class MerchantInitClass extends BaseClass
 		return self::getByCondition(['sjId' => $id]);
 	}
 
-	public static function updateByMerchantId($id, $data)
+	public static function updateBySjId($id, $data)
 	{
 		return self::updateByCondition(['sjId' => $id], $data);
 	}

+ 1 - 1
biz/sj/services/MerchantAssetService.php

@@ -36,7 +36,7 @@ class MerchantAssetService extends BaseService
 	}
 	
 	//根据商家id批量取商家资产 ssh 2019.12.20
-	public static function getAssetByMerchantIds($ids)
+	public static function getAssetBySjIds($ids)
 	{
 		return MerchantAssetClass::getAllByCondition(['sjId' => ['in', $ids]], null, '*', 'sjId');
 	}

+ 1 - 1
common/components/miniUtil.php

@@ -749,7 +749,7 @@ class miniUtil
                     }
                 } else {
                     //其它
-                    xhMerchantExtendService::updateByMerchantId($sjId, $uData);
+                    xhMerchantExtendService::updateBySjId($sjId, $uData);
                 }
                 return $miniAccessToken;
             }

+ 1 - 1
common/components/wxUtil.php

@@ -745,7 +745,7 @@ class wxUtil
                         WxMiniBaseService::updateById($wxMiniBaseId, $uData);
                     }
                 } else {
-                    xhMerchantExtendService::updateByMerchantId($sjId, $uData);
+                    xhMerchantExtendService::updateBySjId($sjId, $uData);
                 }
                 return $miniAccessToken;
             }

+ 1 - 1
common/services/xhGoodsSettingService.php

@@ -19,7 +19,7 @@ class xhGoodsSettingService {
 		return $return;
 	}
 
-	public static function updateByMerchantId($sjId,$data)
+	public static function updateBySjId($sjId,$data)
 	{
 		xhGoodsSetting::updateByCondition(['sjId'=>$sjId], $data);
 	}

+ 5 - 5
common/services/xhMerchantAssetService.php

@@ -46,10 +46,10 @@ class xhMerchantAssetService
         //计算总交易量
         $totalDeal = xhSjCapital::find()->andWhere(['io' => 1, 'sjId' => $sjId])->count('id');
         $data = ['totalDeal' => $totalDeal, 'totalVisit' => $totalVisit, 'totalFans' => $totalFans, 'totalIncome' => $totalIncome];
-        self::updateByMerchantId($sjId, $data);
+        self::updateBySjId($sjId, $data);
     }
 
-    public static function updateByMerchantId($sjId, $data)
+    public static function updateBySjId($sjId, $data)
     {
         xhMerchantAsset::updateByCondition(['sjId' => $sjId], $data);
         return self::refreshByMerchantId($sjId);
@@ -93,7 +93,7 @@ class xhMerchantAssetService
                 break;
             default:
         }
-        self::updateByMerchantId($sjId, $updateData);
+        self::updateBySjId($sjId, $updateData);
 
         if ($isRecharge == false) {
             //数据统计,以下一定要排后面,否则数据不准确
@@ -139,7 +139,7 @@ class xhMerchantAssetService
                 $cashData = ['id' => $id, 'amount' => $amount, 'sjId' => $sjId, 'balance' => $mBalance, 'addTime' => time(), 'createTime' => $date];
                 $order = xhDrawCashService::add($cashData);
                 $orderId = $order['id'];
-                xhMerchantAssetService::updateByMerchantId($sjId, ['balance' => $mBalance, 'freezeBalance' => $newFreezeBalance]);
+                xhMerchantAssetService::updateBySjId($sjId, ['balance' => $mBalance, 'freezeBalance' => $newFreezeBalance]);
 
                 $now = time();
                 $capitalTypeArray = dict::getDict('capitalType', 'xhDrawCash');
@@ -244,7 +244,7 @@ class xhMerchantAssetService
                 if (!empty($resultCode) && $resultCode == 10000) {
                     xhDrawCashService::updateById($id, ['thirdSerialNumber' => $returnOrderId, 'status' => 1]);
                     $remainAmount = stringUtil::calcSub($asset['freezeBalance'], $drawAmount);
-                    xhMerchantAssetService::updateByMerchantId($sjId, ['freezeBalance' => $remainAmount]);
+                    xhMerchantAssetService::updateBySjId($sjId, ['freezeBalance' => $remainAmount]);
                     $transaction->commit();
                     /*
                     $openId = $admin['openId'];

+ 1 - 1
common/services/xhMerchantExtendService.php

@@ -40,7 +40,7 @@ class xhMerchantExtendService
 	/**
 	 * 更新数据
 	 */
-	public static function updateByMerchantId($sjId, $data)
+	public static function updateBySjId($sjId, $data)
 	{
 		xhMerchantExtend::updateByCondition(['sjId' => $sjId], $data);
 		$cacheKey = dict::getCacheKey('merchantExtend') . $sjId;

+ 2 - 2
common/services/xhRecommendService.php

@@ -70,7 +70,7 @@ class xhRecommendService {
 			$arr		= explode(',',$goods);
 			$newGoods	= array_diff($arr,[$id]);
 			$string		= implode(',',$newGoods);
-			xhRecommendService::updateByMerchantId($sjId, ['goods' =>$string]);
+			xhRecommendService::updateBySjId($sjId, ['goods' =>$string]);
 		}
 	}
 
@@ -96,7 +96,7 @@ class xhRecommendService {
 		self::refreshRecommend($sjId);
 	}
 
-	public static function updateByMerchantId($sjId,$data)
+	public static function updateBySjId($sjId,$data)
 	{
 		xhRecommend::updateByCondition(['sjId' => $sjId], $data);
 		self::refreshRecommend($sjId);

+ 1 - 1
common/services/xhTMessageService.php

@@ -99,7 +99,7 @@ class xhTMessageService
 				TMessageClass::add($data);
 			}
 		}
-		xhMerchantExtendService::updateByMerchantId($sjId, ['wxTMessageInit' => 1]);
+		xhMerchantExtendService::updateBySjId($sjId, ['wxTMessageInit' => 1]);
 	}
 
 	//发送到手机上 ssh 2019.8.11

+ 1 - 1
common/services/xhUserService.php

@@ -123,7 +123,7 @@ class xhUserService
 		if ($subscribe == 1) {
 			$mAsset = xhMerchantAssetService::getBySjId($sjId);
 			$totalFans = $mAsset['totalFans'] + 1;
-			$asset = xhMerchantAssetService::updateByMerchantId($sjId, ['totalFans' => $totalFans]);
+			$asset = xhMerchantAssetService::updateBySjId($sjId, ['totalFans' => $totalFans]);
 			xhUserByMonthService::replace($sjId, 1, $asset);//月粉丝量 +1
 			xhUserByDayService::replace($sjId, 1, $asset);//每天增加粉丝 +1
 		}

+ 1 - 1
common/services/xhWxMenuService.php

@@ -79,7 +79,7 @@ class xhWxMenuService
 		$info = $wxUtil->userMenuToWeiXin($menu);
 		$info = json_decode($info, true);
 
-		xhMerchantExtendService::updateByMerchantId($sjId, ['wxMenuInit' => 1]);
+		xhMerchantExtendService::updateBySjId($sjId, ['wxMenuInit' => 1]);
 		$now = time();
 		$date = date("Y-m-d H:i:s", $now);
 		$mapped = dict::getDict('commonUseUrlMapped');

+ 1 - 1
console/controllers/InitController.php

@@ -102,7 +102,7 @@ class InitController extends Controller
 		$sjId = 12359;
 		$return = UserService::syncWxAllUser($sjId);
 		$total = isset($return['data']['total']) ? $return['data']['total'] : 0;
-		xhMerchantAssetService::updateByMerchantId($sjId, ['totalFans' => $total]);
+		xhMerchantAssetService::updateBySjId($sjId, ['totalFans' => $total]);
 	}
 
 	//更新用户名称