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
913d7b02
Commit
913d7b02
authored
May 22, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open time
parent
c627004b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
24 deletions
+38
-24
OrderLog.php
application/api_broker/controller/OrderLog.php
+1
-1
PayLogOpenService.php
application/api_broker/service/PayLogOpenService.php
+14
-2
Finance.php
application/index/controller/Finance.php
+3
-19
PayLogOpen.php
application/index/controller/PayLogOpen.php
+2
-2
OPayLogOpen.php
application/model/OPayLogOpen.php
+18
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
913d7b02
...
@@ -301,7 +301,7 @@ class OrderLog extends Basic
...
@@ -301,7 +301,7 @@ class OrderLog extends Basic
if
(
!
isset
(
$params
[
"submit_agent_id"
])
||
!
isset
(
$params
[
"submit_agent_name"
])
||
!
isset
(
$params
[
"report_id"
])
||
if
(
!
isset
(
$params
[
"submit_agent_id"
])
||
!
isset
(
$params
[
"submit_agent_name"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
||
!
isset
(
$params
[
"trade_type"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
||
!
isset
(
$params
[
"trade_type"
])
||
//!isset($params["estimated_receipt_date"]) ||
//!isset($params["estimated_receipt_date"]) ||
!
isset
(
$params
[
"house_number"
])
||
!
isset
(
$params
[
"i
s_open"
])
||
!
isset
(
$params
[
"i
ndustry_type"
])
||
!
isset
(
$params
[
"house_number"
])
||
!
isset
(
$params
[
"industry_type"
])
||
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
...
...
application/api_broker/service/PayLogOpenService.php
View file @
913d7b02
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\service
;
namespace
app\api_broker\service
;
use
app\model\OImg
;
use
app\model\OImg
;
use
app\model\OPayLogModel
;
use
app\model\OPayLogOpen
;
use
app\model\OPayLogOpen
;
use
app\model\OPayLogOpenLog
;
use
app\model\OPayLogOpenLog
;
...
@@ -17,12 +18,14 @@ class PayLogOpenService
...
@@ -17,12 +18,14 @@ class PayLogOpenService
private
$payLogOpenModel
;
private
$payLogOpenModel
;
private
$oImgModel
;
private
$oImgModel
;
private
$payLogOpenLogModel
;
private
$payLogOpenLogModel
;
private
$payLogModel
;
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
payLogOpenModel
=
new
OPayLogOpen
();
$this
->
payLogOpenModel
=
new
OPayLogOpen
();
$this
->
oImgModel
=
new
OImg
();
$this
->
oImgModel
=
new
OImg
();
$this
->
payLogOpenLogModel
=
new
OPayLogOpenLog
();
$this
->
payLogOpenLogModel
=
new
OPayLogOpenLog
();
$this
->
payLogModel
=
new
OPayLogModel
();
}
}
/**
/**
...
@@ -78,13 +81,22 @@ class PayLogOpenService
...
@@ -78,13 +81,22 @@ class PayLogOpenService
public
function
addOpenCheck
(
$open_id
,
$status
,
$remark
,
$operation_id
,
$operation_name
)
public
function
addOpenCheck
(
$open_id
,
$status
,
$remark
,
$operation_id
,
$operation_name
)
{
{
$id
=
$this
->
payLogOpenLogModel
->
getAllList
(
'open_id'
,
0
,
[
'status'
=>
$status
,
'open_id'
=>
$open_id
]);
//检查当前状态是否审核过
$id
=
$this
->
payLogOpenLogModel
->
getAllList
(
'open_id'
,
0
,
[
'status'
=>
$status
,
'open_id'
=>
$open_id
]);
//检查当前状态是否审核过
if
(
empty
(
$id
))
{
if
(
empty
(
$id
[
0
][
'id'
]
))
{
$num
=
$this
->
payLogOpenLogModel
->
addOpenCheck
(
$num
=
$this
->
payLogOpenLogModel
->
addOpenCheck
(
$this
->
OpenLogCheckBin
(
$open_id
,
$status
,
$remark
,
$operation_id
,
$operation_name
)
$this
->
OpenLogCheckBin
(
$open_id
,
$status
,
$remark
,
$operation_id
,
$operation_name
)
);
);
if
(
$num
>
0
)
{
if
(
$num
>
0
)
{
$this
->
payLogOpenModel
->
editData
([
'status'
=>
$status
],
$open_id
);
//更新状态
$this
->
payLogOpenModel
->
editData
([
'status'
=>
$status
],
$open_id
);
//更新状态
$pay_log_id
=
$this
->
payLogOpenModel
->
getFieldOneValue
(
'pay_log_id'
,
[
'id'
=>
$open_id
]);
if
(
$pay_log_id
)
{
$update_data
[
'id'
]
=
$pay_log_id
;
$update_data
[
'is_open'
]
=
1
;
$update_data
[
'open_time'
]
=
date
(
'Y-m-d H:i:s'
);
$this
->
payLogModel
->
updatePayLog
(
$update_data
);
}
//todo 推送
//todo 推送
$this
->
pushCheck
(
$open_id
,
$status
);
$this
->
pushCheck
(
$open_id
,
$status
);
}
}
...
@@ -124,7 +136,7 @@ class PayLogOpenService
...
@@ -124,7 +136,7 @@ class PayLogOpenService
}
}
$push_service
=
new
PushMessageService
();
$push_service
=
new
PushMessageService
();
$push_service
->
record
(
13
,
0
,
$push_agent
,
0
,
[
'message'
=>
$message
]);
$push_service
->
record
(
13
,
0
,
[
$push_agent
[
'agent_id'
]]
,
0
,
[
'message'
=>
$message
]);
return
true
;
return
true
;
}
}
...
...
application/index/controller/Finance.php
View file @
913d7b02
...
@@ -3653,25 +3653,16 @@ class Finance extends Basic
...
@@ -3653,25 +3653,16 @@ class Finance extends Basic
$pay_data
[
'current_agent_name'
]
=
rtrim
(
$name
,
','
);
$pay_data
[
'current_agent_name'
]
=
rtrim
(
$name
,
','
);
}
}
if
(
$pay_data
[
'type'
]
==
10
||
$pay_data
[
'type'
]
==
30
)
{
if
((
$pay_data
[
'type'
]
==
10
||
$pay_data
[
'type'
]
==
30
)
&&
isset
(
$house_data
[
0
][
'f_id'
]))
{
if
(
isset
(
$house_data
[
0
][
'f_id'
]))
{
$current_agent_name
=
$m_report
->
selectReportById
(
'report_agent_name,report_store_id'
,
[
'id'
=>
$house_data
[
0
][
'f_id'
]]);
$current_agent_name
=
$m_report
->
selectReportById
(
'report_agent_name,report_store_id'
,
[
'id'
=>
$house_data
[
0
][
'f_id'
]]);
$pay_data
[
'current_agent_name'
]
=
empty
(
$current_agent_name
[
0
][
'report_agent_name'
])
?
""
:
$current_agent_name
[
0
][
'report_agent_name'
];
$pay_data
[
'current_agent_name'
]
=
empty
(
$current_agent_name
[
0
][
'report_agent_name'
])
?
""
:
$current_agent_name
[
0
][
'report_agent_name'
];
}
}
}
$pay_data
[
'site_id'
]
=
''
;
$pay_data
[
'site_id'
]
=
''
;
if
(
$pay_data
[
'agent_id'
])
{
if
(
$pay_data
[
'agent_id'
])
{
// $m_agent = new AAgents();
// $pay_data['site_id'] = $m_agent->getPhoneById($pay_data['agent_id'], 'site_id');
$redis_service
=
new
RedisCacheService
();
$redis_service
=
new
RedisCacheService
();
$agent_data
=
$redis_service
->
getRedisCache
(
2
,
$pay_data
[
'agent_id'
]);
$agent_data
=
$redis_service
->
getRedisCache
(
2
,
$pay_data
[
'agent_id'
]);
$pay_data
[
'site_id'
]
=
$agent_data
[
'site_id'
];
$pay_data
[
'site_id'
]
=
$agent_data
[
'site_id'
];
}
}
if
(
empty
(
$pay_data
[
'open_time'
])
&&
$pay_data
[
'is_open'
]
==
1
)
{
$pay_data
[
'open_time'
]
=
$pay_data
[
'create_time'
];
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$msg
=
'内部错误:'
.
$e
->
getMessage
();
$msg
=
'内部错误:'
.
$e
->
getMessage
();
}
}
...
@@ -3701,7 +3692,6 @@ class Finance extends Basic
...
@@ -3701,7 +3692,6 @@ class Finance extends Basic
unset
(
$this
->
params
[
'receipt_number'
]);
unset
(
$this
->
params
[
'receipt_number'
]);
unset
(
$this
->
params
[
'transfer_name'
]);
unset
(
$this
->
params
[
'transfer_name'
]);
unset
(
$this
->
params
[
'pay_type'
]);
unset
(
$this
->
params
[
'pay_type'
]);
// return $this->response(101, '调整后收款不能修改');
}
else
{
}
else
{
$save_data
[
'transfer_name'
]
=
isset
(
$this
->
params
[
'transfer_name'
])
?
$this
->
params
[
'transfer_name'
]
:
''
;
$save_data
[
'transfer_name'
]
=
isset
(
$this
->
params
[
'transfer_name'
])
?
$this
->
params
[
'transfer_name'
]
:
''
;
$save_data
[
'money'
]
=
$this
->
params
[
'money'
];
$save_data
[
'money'
]
=
$this
->
params
[
'money'
];
...
@@ -3713,12 +3703,6 @@ class Finance extends Basic
...
@@ -3713,12 +3703,6 @@ class Finance extends Basic
}
}
}
}
// $m_pay_log = new OPayLogAdjustment();
// $id = $m_pay_log->getFieldValue('id', ['paylog_id'=>$this->params['pay_id']]);
// if ($id) {
// return $this->response(101, '收款存在调整不能修改');
// }
if
((
$id
[
0
][
'type'
]
==
10
&&
$this
->
params
[
'type'
]
==
30
)
||
(
$id
[
0
][
'type'
]
==
30
&&
$this
->
params
[
'type'
]
==
10
))
{
if
((
$id
[
0
][
'type'
]
==
10
&&
$this
->
params
[
'type'
]
==
30
)
||
(
$id
[
0
][
'type'
]
==
30
&&
$this
->
params
[
'type'
]
==
10
))
{
$save_data
[
'type'
]
=
$this
->
params
[
'type'
];
$save_data
[
'type'
]
=
$this
->
params
[
'type'
];
}
}
...
...
application/index/controller/PayLogOpen.php
View file @
913d7b02
...
@@ -202,8 +202,8 @@ class PayLogOpen extends Basic
...
@@ -202,8 +202,8 @@ class PayLogOpen extends Basic
$disc_time
=
$this
->
m_pay_open_log
->
getFieldOneValue
(
'create_time'
,
$log_where
);
$disc_time
=
$this
->
m_pay_open_log
->
getFieldOneValue
(
'create_time'
,
$log_where
);
if
(
$v
[
'status'
]
==
3
)
{
if
(
$v
[
'status'
]
==
3
)
{
$pay_log_data
=
$m_pay_log
->
selectPayLogByOrderNo
(
'
create
_time'
,
[
'id'
=>
$v
[
'pay_log_id'
]]);
$pay_log_data
=
$m_pay_log
->
selectPayLogByOrderNo
(
'
open
_time'
,
[
'id'
=>
$v
[
'pay_log_id'
]]);
$check_time
=
isset
(
$pay_log_data
[
0
][
'
create_time'
])
?
$pay_log_data
[
0
][
'create
_time'
]
:
''
;
$check_time
=
isset
(
$pay_log_data
[
0
][
'
open_time'
])
?
$pay_log_data
[
0
][
'open
_time'
]
:
''
;
}
else
{
}
else
{
$check_time
=
''
;
$check_time
=
''
;
}
}
...
...
application/model/OPayLogOpen.php
View file @
913d7b02
...
@@ -120,4 +120,21 @@ class OPayLogOpen extends BaseModel
...
@@ -120,4 +120,21 @@ class OPayLogOpen extends BaseModel
->
where
(
$params
)
->
where
(
$params
)
->
find
();
->
find
();
}
}
/**
* @param $params
* @param string $field
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getOpenLog
(
$params
,
$field
=
'a.id'
)
{
return
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_paylog_open_log b'
,
'a.id=b.open_id'
,
'left'
)
->
where
(
$params
)
->
find
();
}
}
}
\ No newline at end of file
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