1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- * Created by PhpStorm.
- * User: sicilon_IT
- * Date: 2021/11/18
- * Time: 14:25
- */
- namespace app\index\model;
- use think\Model;
- class feedbackmodel extends Model
- {
- protected $table = 't_feedback';
- /*
- * 20211118
- *
- */
- public function insinfo($arr)
- {
- $this->setAttr('id', null)->isUpdate(false)->allowField(true)->save($arr);
- return $this->id;
- }
- /*
- * 20211227
- * wj
- */
- public function getList($where = [], $field = "*", $page = 1, $size = 10, $order = "id desc", $group = "", $row = false)
- {
- $sqlObj = $this->alias('fb')->join("t_userinfo u", "fb.userid=u.id")->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;
- }
- }
|