<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Util; use Carbon\Carbon; use ModStart\Core\Dao\ModelUtil; class MemberMetaUtil { public static function set($shbIl, $zO6V5, $jkY57 = null) { $dNpGx = array('memberUserId' => $shbIl, 'name' => $zO6V5); if (is_null($jkY57)) { ModelUtil::delete('member_meta', $dNpGx); } else { if (ModelUtil::update('member_meta', $dNpGx, array('value' => $jkY57, 'updated_at' => Carbon::now())) <= 0) { goto uxfwf; bLebh: $vetOJ = ModelUtil::getWithLock('member_meta', $dNpGx); goto FnOSj; PIZ5d: ModelUtil::transactionCommit(); goto G0t9l; uxfwf: ModelUtil::transactionBegin(); goto bLebh; FnOSj: if (empty($vetOJ)) { ModelUtil::insert('member_meta', array_merge($dNpGx, array('value' => $jkY57))); } goto PIZ5d; G0t9l: } } } public static function get($shbIl, $zO6V5) { goto Cftvt; MlrB9: return null; goto YE3kc; at3Wq: $x2Ey1 = ModelUtil::get('member_meta', $dNpGx); goto HBz5r; HBz5r: if ($x2Ey1) { return $x2Ey1['value']; } goto MlrB9; Cftvt: $dNpGx = array('memberUserId' => $shbIl, 'name' => $zO6V5); goto at3Wq; YE3kc: } }