123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- /*
- * @Author: wang jun
- * @Date: 2021-10-29 16:06:41
- * @Last Modified by: wang jun
- * @Last Modified time: 2021-10-29 16:15:16
- */
- namespace app\index\model;
- use think\Db;
- use think\Model;
- class userapplylogmodel extends Model
- {
- protected $table = 't_userapplylog';
- public function insertData($data)
- {
- $id = $this->insertGetId($data);
- return empty($id) ? false : $id;
- }
- public function getInfo($where, $field = "*", $row = true)
- {
- $info = $this->field($field)->where($where);
- if ($row) {
- $info = $info->find();
- } else {
- $info = $info->select();
- }
- return empty($info) ? false : $info;
- }
- public function updateinfo($where, $updateData)
- {
- $row = $this->where($where)->update($updateData);
- return empty($row) ? false : $row;
- }
- public function deleteinfo($where)
- {
- $row = $this->where($where)->delete();
- return empty($row) ? false : $row;
- }
- public function getList($where = [], $field = "*", $page = 1, $size = 10, $order = "id desc", $group = "", $row = false)
- {
- $sqlObj = $this->where($where);
- if ("count" != $field) {
- $sqlObj = $sqlObj->field($field)->order($order)->group($group)->page($page, $size);
- if ($row) {
- $data = $sqlObj->find();
- } else {
- $data = $sqlObj->select();
- }
- } else {
- $data = $sqlObj = $sqlObj->count();
- }
- return $data;
- }
- public function newxuuser($info)
- {
- $id = Db::table('t_wxuser')->insertGetId($info);
- return $id;
- }
- public function getxuuser($where)
- {
- $info = Db::table('t_wxuser')->where($where)->find();
- return $info;
- }
- }
|