vendor/codeages/biz-order-pay/src/Order/Dao/Impl/OrderItemDaoImpl.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Codeages\Biz\Order\Dao\Impl;
use Codeages\Biz\Order\Dao\OrderItemDao;
use Codeages\Biz\Framework\Dao\GeneralDaoImpl;
class OrderItemDaoImpl extends GeneralDaoImpl implements OrderItemDao
{
protected $table = 'biz_order_item';
public function findByOrderId($orderId)
{
return $this->findByFields(array(
'order_id' => $orderId,
));
}
public function findByOrderIds($orderIds)
{
return $this->findInField('order_id', $orderIds);
}
public function getOrderItemByOrderIdAndTargetIdAndTargetType($orderId, $targetId, $targetType)
{
return $this->getByFields(array(
'order_id' => $orderId,
'target_type' => $targetType,
'target_id' => $targetId,
));
}
public function sumPayAmount($conditions)
{
$builder = $this->createQueryBuilder($conditions)
->select('sum(`pay_amount`)')
->andWhere('target_id = :target_id')
->andWhere('target_type = :target_type')
->andWhere('pay_time >= :pay_time_GE')
->andWhere('pay_time <= :pay_time_LE')
->andWhere('status IN (:statuses)')
->andWhere('status = :status');
return (int) $builder->execute()->fetchColumn(0);
}
public function findByConditions($conditions)
{
$builder = $this->createQueryBuilder($conditions)
->select('*');
return $builder->execute()->fetchAll();
}
public function declares()
{
return array(
'timestamps' => array('created_time', 'updated_time'),
'orderbys' => array(
'id',
'created_time',
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。