1. 程式人生 > 實用技巧 >專案學習經驗記錄

專案學習經驗記錄

裝置資料上傳,平臺區分賬號list裝置資料

表結構設計

區分賬號list裝置資料

rm -rf /data/www/xxx.xxx/Runtime 

        $roleId    = $this->roleObj->getRoleId();
        if ($roleId == RoleInfo::Vendor) {
            $where['vendor_id'] = $this->mem_id;
        } else if ($roleId == RoleInfo::Channel) {
            $where['channel_id'] = $this->mem_id;
        }else if($roleId == RoleInfo::Merchant){
            $where['merchant_id'] = $this->mem_id;
        }

TP3.2.3 資料模型新增搜尋條件不生效問題解決。

[root@izbp18dv3a3metugyd02qxz _fields]# cat /data/www/xxx.xxx/Runtime/Data/_fields/zhihuo.zh_deviceuploadlog.php |grep -i 'channel_id'
a:13:{i:0;s:2:"id";i:1;s:2:"sn";i:2;s:9:"vendor_id";i:3;s:10:"channel_id";i:4;s:11:"merchant_id";i:5;s:4:"imei";i:6;s:4:"imsi";i:7;s:12:"dev_model_id";i:8;s:8:"log_name";i:9;s:8:"log_path";i:10;s:11:"create_time";s:3:"_pk";s:2:"id";s:5:"_type";a:11:{s:2:"id";s:19:"bigint(20) unsigned";s:2:"sn";s:12:"varchar(100)";s:9:"vendor_id";s:19:"bigint(20) unsigned";s:10:"channel_id";s:19:"bigint(20) unsigned";s:11:"merchant_id";s:19:"bigint(20) unsigned";s:4:"imei";s:12:"varchar(100)";s:4:"imsi";s:12:"varchar(100)";s:12:"dev_model_id";s:11:"varchar(50)";s:8:"log_name";s:12:"varchar(250)";s:8:"log_path";s:12:"varchar(250)";s:11:"create_time";s:16:"int(11) unsigned";}}

Array
(
    [0] => id
    [1] => sn
    [2] => vendor_id
    [3] => channel_id
    [4] => merchant_id
    [5] => imei
    [6] => imsi
    [7] => dev_model_id
    [8] => log_name
    [9] => log_path
    [10] => create_time
    [_pk] => id
    [_type] => Array
        (
            [id] => bigint(20) unsigned
            [sn] => varchar(100)
            [vendor_id] => bigint(20) unsigned
            [channel_id] => bigint(20) unsigned
            [merchant_id] => bigint(20) unsigned
            [imei] => varchar(100)
            [imsi] => varchar(100)
            [dev_model_id] => varchar(50)
            [log_name] => varchar(250)
            [log_path] => varchar(250)
            [create_time] => int(11) unsigned
        )

)