src/Biz/MemberOperation/Service/Impl/MemberOperationServiceImpl.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\MemberOperation\Service\Impl;
use AppBundle\Common\ArrayToolkit;
use Biz\BaseService;
use Biz\Common\CommonException;
use Biz\MemberOperation\Dao\MemberOperationRecordDao;
use Biz\MemberOperation\Service\MemberOperationService;
class MemberOperationServiceImpl extends BaseService implements MemberOperationService
{
public function getRecord($id)
{
return $this->getRecordDao()->get($id);
}
public function createRecord($record)
{
if (!ArrayToolkit::requireds($record, array('member_id', 'target_type', 'operate_type'))) {
$this->createNewException(CommonException::ERROR_PARAMETER_MISSING());
}
return $this->getRecordDao()->create($record);
}
public function countGroupByUserId($field, $conditions)
{
$result = $this->getRecordDao()->countGroupByUserId($field, $conditions);
return ArrayToolkit::index($result, 'user_id');
}
public function updateRefundInfoByOrderId($orderId, $info)
{
$record = $this->getRecordByOrderIdAndType($orderId, 'exit');
$field = ArrayToolkit::parts($info, array('refund_id', 'reason', 'reason_type'));
if (!empty($record['reason'])) {
unset($field['reason']);
unset($field['reason_type']);
}
return $this->getRecordDao()->update($record['id'], $field);
}
public function getJoinReasonByOrderId($orderId = 0)
{
$reason = array(
'reason' => 'site.join_by_free',
'reason_type' => 'free_join',
);
if (empty($orderId)) {
return $reason;
}
$order = $this->getOrderService()->getOrder($orderId);
if (empty($order)) {
return $reason;
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。