/** * 未达保留价支付金额 */ function failedPay() { $did = p('did'); $result = 0; $message = "未做任何操作"; if (is_numeric($did)) { lm('user_moneylog_model'); lm('bid_report_model'); $bidReport = $this->bid_report_model->getDidReportAndDomainArray($did); if (element('optstatus', $bidReport) == DOMAIN_BID_REPORT_OPTSTATUS_UNDONE) { $sellerId = element('uid', $bidReport); $firstUserId = element('uid1', $bidReport); $adminId = adminId(); $compensation = getCompensation($bidReport); $compensationUser = round($compensation / 2, 2); //$this->user_moneylog_model->addUserMoney($sellerId,0,$price,USER_MONEYLOG_LOGTYPE_GIVERESERVEFEE,'发放域名补偿金'); $this->user_moneylog_model->addUserMoney($firstUserId, 0, $compensationUser, USER_MONEYLOG_LOGTYPE_RECEIVERESERVEFEE, '收到域名' . element('domainname', $bidReport) . '小费'); $this->user_moneylog_model->addUserMoney($adminId, 0, $compensationUser, USER_MONEYLOG_LOGTYPE_RECEIVERESERVEFEE, '收到域名' . element('domainname', $bidReport) . '小费'); $this->bid_report_model->updateDidReportOptStatus($did, DOMAIN_BID_REPORT_OPTSTATUS_DONE); $result = 1; $message = "处理成功"; } else { $message = '已处理,无需重复处理。'; } } echo '{"code":"' . $result . '","message":"' . $message . '"}'; }
<ol class="square sepH_c open_bid"> <?php $count = 1; foreach ($bidListArray as $bidItem) { ?> <li> <div class="right"> <?php $finalPrice = element('price2', $bidReport); if ($count == 1 && $status == DOMAIN_SELL_SUCCESSED) { echo '得标'; } if ($count == 1 && element('uid', $bidItem) == element('uid1', $bidReport)) { if ($status == DOMAIN_SELL_FAILED && element('failreason', $bidReport) == DOMAIN_BID_REPORT_FAILREASON_RESERVEPRICE) { echo '+' . round(getCompensation($domain) / 2, 2); } ?> <span class="lbl neutral_bg" title="<?php echo '出价时间:' . date('Y-m-d H:i', element('pubdate', $bidItem)); ?> "><del>¥ <?php echo element('price', $bidItem); ?> </del></span> <?php } elseif ($count == 2 && element('uid', $bidItem) == element('uid2', $bidReport)) { if ($status != DOMAIN_SELL_FAILED) { echo '+' . getUserPrice($domain, $count, $finalPrice); } ?>