<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Edm\Util; use Carbon\Carbon; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Input\Response; class EdmMailUtil { public static function insertOrUpdate($kairD, $ber3G, $fYoEH = null) { goto TmThG; jSlBQ: if (!empty($fYoEH)) { $GpXwG['name'] = $fYoEH; } goto XZu9F; TmThG: $l970E = array('email' => $ber3G); goto N9dHv; XZu9F: try { if (ModelUtil::update('edm_email', $l970E, $GpXwG) <= 0) { ModelUtil::insert('edm_email', array_merge($l970E, $GpXwG)); return Response::generateSuccessData(array('inserted' => 1, 'updated' => 0)); } return Response::generateSuccessData(array('inserted' => 0, 'updated' => 1)); } catch (\Exception $re7gC) { return Response::generateSuccessData(array('inserted' => 0, 'updated' => 0)); } goto hsu0Q; N9dHv: $GpXwG = array('updated_at' => Carbon::now()); goto tV9PE; tV9PE: if (!empty($kairD)) { $GpXwG['tags'] = $kairD; } goto jSlBQ; hsu0Q: } }