| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace app\store\model;
- use app\common\model\DtalkRobot as DtalkRobotModel;
- /**
- * 钉钉机器人
- *
- * @Author Mark
- * @DateTime 2024-08-09
- */
- class DtalkRobot extends DtalkRobotModel
- {
- /**
- * [getList]
- * 获取机器人列表
- *
- * @Author: Yeshihao
- * @DateTime: 2024/8/12 9:45
- * @return \think\Paginator
- * @throws \think\exception\DbException
- */
- public function getList()
- {
- $query = self::useGlobalScope(true);
- $query = $this->handlerSearch($query, request()->param());
- return $query->where('is_delete', '=', 0)
- ->order(['create_time' => 'desc'])
- ->paginate(15, false, ['query' => request()->request()]);
- }
- /**
- * [add]
- *
- * @Author: Yeshihao
- * @DateTime: 2024/8/12 9:53
- * @param $data
- * @return false|int
- */
- public function add($data)
- {
- $data['wxapp_id'] = self::$wxapp_id;
- return $this->allowField(true)->save($data);
- }
- /**
- * [edit]
- *
- * @Author: Yeshihao
- * @DateTime: 2024/8/12 9:54
- * @param $data
- * @return false|int
- */
- public function edit($data)
- {
- return $this->allowField(true)->save($data);
- }
- }
|