Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
0c41945d
Commit
0c41945d
authored
Aug 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间轴-撤销成交报告修改
parent
60f1c7ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
3 deletions
+108
-3
MPushMessage.php
application/model/MPushMessage.php
+103
-0
OFinancialAudit.php
application/model/OFinancialAudit.php
+5
-3
No files found.
application/model/MPushMessage.php
0 → 100644
View file @
0c41945d
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/8/27
* Time: 17:24
*/
namespace
app\model
;
use
think\Db
;
class
MPushMessage
{
protected
$table
=
"o_bargain"
;
private
$db_
;
public
function
__construct
()
{
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* 根据楼盘id批量插入数据
*
* @param array $house_id 楼盘id
* @param int $operation_id 操作人id
* @param int $type 消息类型:0群推 1商铺下架 2修改客方 3盘方修改
* @param $data
* @return int|string
*/
public
function
addHouseIdArray
(
array
$house_id
,
int
$operation_id
,
int
$type
,
$data
)
{
if
(
is_array
(
$house_id
))
{
return
false
;
}
$insert_data
=
[];
foreach
(
$house_id
as
$k
=>
$v
)
{
$insert_data
[
$k
][
'house_id'
]
=
$v
;
if
(
isset
(
$data
[
'message'
]))
{
$insert_data
[
$k
][
'message'
]
=
$data
[
'message'
];
}
if
(
isset
(
$data
[
'user_id'
]))
{
$insert_data
[
$k
][
'user_id'
]
=
$data
[
'user_id'
];
}
if
(
isset
(
$data
[
'addressee_id'
]))
{
$insert_data
[
$k
][
'addressee_id'
]
=
$data
[
'addressee_id'
];
}
$insert_data
[
$k
][
'type'
]
=
$type
;
$insert_data
[
$k
][
'status'
]
=
0
;
$insert_data
[
$k
][
'operation_id'
]
=
$operation_id
;
}
return
$this
->
db_
->
insertAll
(
$insert_data
);
}
/**
* 根据经纪人id批量插入数据
*
* @param array $agent_id 楼盘id
* @param int $operation_id 操作人id
* @param int $type 消息类型:0群推 1商铺下架 2修改客方 3盘方修改
* @param $data
* @return int|string
*/
public
function
addAgentIdArray
(
array
$agent_id
,
int
$operation_id
,
int
$type
,
$data
)
{
if
(
is_array
(
$agent_id
))
{
return
false
;
}
$insert_data
=
[];
foreach
(
$agent_id
as
$k
=>
$v
)
{
$insert_data
[
$k
][
'addressee_id'
]
=
$v
;
if
(
isset
(
$data
[
'message'
]))
{
$insert_data
[
$k
][
'message'
]
=
$data
[
'message'
];
}
if
(
isset
(
$data
[
'user_id'
]))
{
$insert_data
[
$k
][
'user_id'
]
=
$data
[
'user_id'
];
}
if
(
isset
(
$data
[
'house_id'
]))
{
$insert_data
[
$k
][
'house_id'
]
=
$data
[
'house_id'
];
}
$insert_data
[
$k
][
'type'
]
=
$type
;
$insert_data
[
$k
][
'status'
]
=
0
;
$insert_data
[
$k
][
'operation_id'
]
=
$operation_id
;
}
return
$this
->
db_
->
insertAll
(
$insert_data
);
}
}
\ No newline at end of file
application/model/OFinancialAudit.php
View file @
0c41945d
...
...
@@ -41,11 +41,12 @@ class OFinancialAudit extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getLastStep
(
$bargain_id
)
public
function
getLastStep
(
$bargain_id
,
$source
)
{
return
$this
->
field
(
'id,audit_level'
)
->
where
([
'bargain_id'
=>
$bargain_id
,
'status'
=>
1
,
'source'
=>
$source
,
'is_del'
=>
0
])
->
order
(
'id desc'
)
->
find
();
}
...
...
@@ -85,8 +86,8 @@ class OFinancialAudit extends BaseModel
return
false
;
}
$this
->
startTrans
();
$data
[
'is_del'
]
=
1
;
//去除之前的审核记录
$this
->
editData
(
$data
,
$bargain_id
,
'bargain_id'
);
//
$data['is_del'] = 1; //去除之前的审核记录
//
$this->editData($data, $bargain_id, 'bargain_id');
$m_bargain
=
new
OBargainModel
();
$update_data
[
'status'
]
=
20
;
...
...
@@ -122,6 +123,7 @@ class OFinancialAudit extends BaseModel
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
}
$where_
[
"is_del"
]
=
0
;
$where_
[
"source"
]
=
3
;
$data
=
$this
->
field
(
$filed
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment