<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Util; use Carbon\Carbon; use ModStart\Core\Dao\ModelUtil; class MemberMetaUtil { public static function set($nlOSA, $aVT3z, $qQcPQ = null) { $k3Pg0 = array('memberUserId' => $nlOSA, 'name' => $aVT3z); if (is_null($qQcPQ)) { ModelUtil::delete('member_meta', $k3Pg0); } else { if (ModelUtil::update('member_meta', $k3Pg0, array('value' => $qQcPQ, 'updated_at' => Carbon::now())) <= 0) { goto WWd9P; y0za5: if (empty($zB1g3)) { ModelUtil::insert('member_meta', array_merge($k3Pg0, array('value' => $qQcPQ))); } goto puWWg; WWd9P: ModelUtil::transactionBegin(); goto IggAr; IggAr: $zB1g3 = ModelUtil::getWithLock('member_meta', $k3Pg0); goto y0za5; puWWg: ModelUtil::transactionCommit(); goto QHV0X; QHV0X: } } } public static function get($nlOSA, $aVT3z) { goto dV29T; LgFKV: if ($Xd5Yh) { return $Xd5Yh['value']; } goto u9JmK; u9JmK: return null; goto fo_lf; dV29T: $k3Pg0 = array('memberUserId' => $nlOSA, 'name' => $aVT3z); goto Snvtq; Snvtq: $Xd5Yh = ModelUtil::get('member_meta', $k3Pg0); goto LgFKV; fo_lf: } }