<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # DataEdit快捷操作類庫 ### DataEdit快捷操作類庫使用示范 此源碼截取某項目APP接口部分 >[danger] DataEdit快捷類庫支持鏈式操作 最新的類庫支持指向的模型分層 該示例指向到service層方法 ~~~ <?php /** * Created by PhpStorm. * User: Mikkle * QQ:776329498 * Date: 2017/11/18 * Time: 10:08 */ namespace app\api\controller\app; use app\api\controller\base\Base; use app\base\service\center\OptionsCenter; use mikkle\tp_tools\DataEdit; use mikkle\tp_tools\ShowCode; use think\Exception; use think\Log; /** * @title 設備類接口 * @description * @group APP接口 * Class Terminal * @package app\api\controller\app */ class Terminal extends Base { /** * @title 設備注冊 * @description 當狀態1001時,返回的type值 reg:表示機身碼和設備號和后臺的吻合 add:表示機身碼不存在并添加 differ:表示和后臺數據不符 * @author Mikkle * @url /api/app.terminal/register * @method POST * @param_send name:terminal_mac type:string require:1 default: other:40字符以內 desc:設備機身碼 * @param_send name:terminal_code type:int require:1 default:8888883020508882 other:8位數字 desc:設備號 * @param_return type:注冊狀態 */ public function register(){ try{ $operate = DataEdit::instance(); $result = $operate->setParameter([ OptionsCenter::$fieldTerminalCode =>"terminal_code/d", OptionsCenter::$fieldTerminalMac =>"terminal_mac", ])->setValidate(false) ->setModel("base/app/terminal") ->setModelType("service") ->execModelAction("terminalRegister"); if ($result===false){ throw new Exception($operate->getError()); } return $result; }catch (Exception $e){ Log::error($e->getMessage()); return ShowCode::jsonCodeWithoutData(1008,$e->getMessage()); } } /** * @title 設備簽到 * @description * @author Mikkle * @url /api/app.terminal/sign * @method POST * @param_send name:terminal_mac type:string require:1 default:40字符以內 other: desc: * @param_return park_list:站點列表 */ public function sign(){ try{ $operate = DataEdit::instance(); $result = $operate->setParameter([ OptionsCenter::$fieldTerminalMac =>"terminal_mac", ])->setValidate(false) ->setModel("base/app/terminal") ->setModelType("service") ->execModelAction("terminalSign"); if ($result===false){ throw new Exception($operate->getError()); } return $result; }catch (Exception $e){ Log::error($e->getMessage()); return ShowCode::jsonCodeWithoutData(1008,$e->getMessage()); } } } ~~~ 更多示例 ~~~ /** *$paramList = [ "company" => "company/s", "address" => "address/s", "contacts" => "contacts/s", "jobs" => "jobs/s", "mobile" => "mobile/s", "tencent_code" => "tencent_code/s", "desc" => "desc/s", "event_key" => "event_key/n", ]; $validate_name = "base/system/SystemApply"; $model_name = 'base/system/SystemApply'; $re = DataEdit::instance() ->setParameter($paramList) ->setAppend(["append" => "this is append"]) ->setValidate($validate_name) ->setModel($model_name) ->save();; return $re ? ReturnCode::jsonCode(1001) : ReturnCode::jsonCode(1003); * ~~~ >[info] 類庫源碼 http://www.hmoore.net/mikkle/thinkphp5_study/484720
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看