first commit
This commit is contained in:
73
pgserver/application/model/CebUrge.php
Normal file
73
pgserver/application/model/CebUrge.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
namespace app\model;
|
||||
use think\Db;
|
||||
use think\db\Where;
|
||||
|
||||
class CebUrge extends Base
|
||||
{
|
||||
/**
|
||||
* 获取光大银行催办列表
|
||||
* @Author llz
|
||||
* @DateTime 2023-03-20
|
||||
* @version 2.0
|
||||
* @param array $field 查询字段值
|
||||
* @param array $where 查询条件
|
||||
* @param array $paginate 分页设置
|
||||
* @return array
|
||||
*/
|
||||
public function getUrgeList($page,$limit, $handle_status){
|
||||
|
||||
|
||||
$where = new Where();
|
||||
/*if($handle_status != 'all') {
|
||||
$where['handle_status'] = $handle_status;
|
||||
}*/
|
||||
|
||||
$res = Db::name('ceb_urge')
|
||||
->field('*,if(update_time,update_time,create_time) as time')
|
||||
->order("time","desc")
|
||||
->where($where)
|
||||
// ->page($page)
|
||||
// ->limit($limit)
|
||||
->select();
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
public function addUrge(array $data){
|
||||
Db::startTrans();
|
||||
|
||||
$this->business_no = $data['businessNo'];
|
||||
$this->company_code = $data['companyCode'];
|
||||
$this->remind_type = $data['remindType'];
|
||||
|
||||
if (isset($data['estimateDealNo'])) {
|
||||
$this->estimate_deal_no = $data['estimateDealNo'];
|
||||
}
|
||||
|
||||
if (isset($data['field1'])) {
|
||||
$this->field1 = $data['field1'];
|
||||
}
|
||||
if (isset($data['field2'])) {
|
||||
$this->field2 = $data['field2'];
|
||||
}
|
||||
if (isset($data['field3'])) {
|
||||
$this->field3 = $data['field3'];
|
||||
}
|
||||
|
||||
$this->create_date = $data['createTime'];
|
||||
|
||||
|
||||
$this->handle_status = '01';
|
||||
$this->create_time = date('Y-m-d H:i:s');
|
||||
$this->update_time = date('Y-m-d H:i:s');
|
||||
|
||||
if (!$this->save()){
|
||||
Db::rollback();
|
||||
return false;
|
||||
}
|
||||
Db::commit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user