dev_oa/app/oa/model/WorkComment.php
hdm 18b2d60920 1、优化知识评论展示,取消编辑器模式评论。
2、新增工作汇报点评功能,接收人可以点评某工作汇报,汇报人可查看点评
3、合同api接口新增合同编码,客户名称字段展现
2023-05-21 10:57:56 +08:00

41 lines
1.1 KiB
PHP

<?php
/**
* @copyright Copyright (c) 2022 勾股工作室
* @license https://opensource.org/licenses/GPL-3.0
* @link https://www.gougucms.com
*/
declare (strict_types = 1);
namespace app\oa\model;
use think\Model;
class WorkComment extends Model
{
public function get_list($param = [])
{
$where = array();
$where['a.article_id'] = $param['tid'];
$where['a.delete_time'] = 0;
$content = \think\facade\Db::name('WorkComment')
->field('a.*,u.name,u.thumb,pu.name as pname')
->alias('a')
->join('Admin u', 'u.id = a.admin_id')
->leftjoin('Admin pu', 'pu.id = a.padmin_id')
->order('a.create_time desc')
->where($where)
->select()->toArray();
foreach ($content as $k => &$v) {
$v['times'] = time_trans($v['create_time']);
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
if($v['update_time']>0){
$v['update_time'] = ',最后编辑时间:'.time_trans($v['update_time']);
}
else{
$v['update_time'] = '';
}
}
return $content;
}
}