perf: PayPal收款, 显示wb记录

webht/payment
Lei OT 12 months ago
parent 6f91702704
commit be664ebc9c

@ -39,7 +39,7 @@ class Note_model extends CI_Model {
public function failnotec($topnum = 2) {
$this->init();
$this->topnum = $topnum;
$this->pn_send = " AND (pn_send='sendfail' OR pn_send='') AND pn_payment_status='Completed' ";
$this->pn_send = " AND (pn_send='sendfail' OR pn_send='') AND pn_payment_status COLLATE SQL_Latin1_General_CP1_CI_AS ='Completed' ";
// 1小时前
$date = date("Y-m-d H:i:s", time() - 1800);
$this->search = " AND pn_datetime < '$date' " ;
@ -95,10 +95,11 @@ class Note_model extends CI_Model {
public function search_date($date) {
$this->init();
$search_sql = " AND (pn.pn_datetime BETWEEN '$date 00:00:00' AND '$date 23:59:59' OR isnull(pn_send,'') in ('sendfail','unsend','')) AND pn_memo NOT LIKE '{\"id\":\"WH-%' "; // {"id":"WH-
$search_sql = " AND (pn.pn_datetime BETWEEN '$date 00:00:00' AND '$date 23:59:59' OR isnull(pn_send,'') in ('sendfail','unsend','')) AND pn_send NOT LIKE 'send-wh%' "; // {"id":"WH-
// AND pn_memo NOT LIKE '{\"id\":\"WH-%'
$this->search = $search_sql;
// $this->orderby=" ORDER BY CASE pn.pn_send WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.pn_sn DESC ";
$this->orderby=" ORDER BY CASE WHEN pn.pn_send='sendfail' AND pn.pn_payment_status='Completed' THEN 1 WHEN pn.pn_send = 'sendfail' THEN 2 ELSE 9 END, pn.pn_payment_date DESC ,pn.pn_sn DESC ";
$this->orderby=" ORDER BY CASE WHEN pn.pn_send='sendfail' AND pn.pn_payment_status COLLATE SQL_Latin1_General_CP1_CI_AS = 'Completed' THEN 1 WHEN pn.pn_send = 'sendfail' THEN 2 ELSE 9 END, pn.pn_payment_date DESC ,pn.pn_sn DESC ";
// WHEN pn.pn_send = 'sendfail' THEN 2
return $this->get_list();
@ -126,7 +127,8 @@ class Note_model extends CI_Model {
OR pn.pn_item_number like '%$search_key%'
OR pn.pn_payer like '%$search_key%'
OR pn.pn_payer_email like '%$search_key%'
OR SUBSTRING(pn_memo, CHARINDEX('parent_txn_id\"', pn_memo) + 16, 17) = '$search_key' ) ";
OR SUBSTRING(pn_memo, CHARINDEX('parent_txn_id\"', pn_memo) + 16, 17) = '$search_key'
) ";
}
$this->search = $search_sql;
return $this->get_list();

@ -86,9 +86,13 @@
</dl>
<dl class="dl-horizontal">
<dt><a href="javascript:void(0);" onclick="$('#note_original_data').toggle()">原始数据</a></dt>
<dd> <span style="display: none;" id="note_original_data">
<?php echo str_replace('","', '"<br/>"', $note->pn_memo); ?>
</span></dd>
<dd> </dd><span style="display: none;" id="note_original_data">
<?php
$array = json_decode($note->pn_memo, true);
$jsonPretty = json_encode($array, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
echo "<pre>$jsonPretty</pre>";
?>
</span>
</dl>
<input type="hidden" name="pn_txn_id" id="pn_txn_id" value="<?php echo $note->pn_txn_id ?>" />

Loading…
Cancel
Save