Commit aeeae610 authored by pengfei's avatar pengfei

Merge branch 'colonel' into develop

parents ab60db4e 64abe898
......@@ -3,6 +3,7 @@
namespace App\Models\marketing\mysql;
use Api\PhpUtils\Mysql\MysqlBase;
use App\Services\marketing\MarketingService;
/**
* 自提点
......@@ -25,7 +26,7 @@ class TakePlace extends MysqlBase
*/
public static function searchList($params)
{
$lifeAccountId = $params['life_account_id'] ?? 0;
$lifeAccountId = $params['life_account_id'] ?? MarketingService::getPublicLifeAccountId();
$keywords = $params['keywords'] ?? '';
$offset = $params['offset'] ?? 0;
$limit = $params['limit'] ?? 20;
......
......@@ -160,7 +160,7 @@ class ColonelService
ColonelDistributorColonelApply::beginTransaction();
// 修改申请状态
$updateStatus = ColonelDistributorColonelApply::updateRecord(['audit_status' => $auditStatus],
['colonel_apply_id' => $applyId, 'audit_status' => ColonelDistributorColonelApply::STATUS_AUDIT]
['colonel_apply_id' => $applyId, 'audit_status' => [ColonelDistributorColonelApply::STATUS_AUDIT,ColonelDistributorColonelApply::STATUS_REJECT]]
);
if (empty($updateStatus)) {
throw new MarketingException(MarketingException::COLONEL_AUDIT_STATUS_FAILED);
......
......@@ -171,7 +171,9 @@ class MarketingService
foreach ($lists as &$val) {
if($capitalPoolList[$val['capital_pool_id']]) {
$val['capital_pool'] = $capitalPoolList[$val['capital_pool_id']];
foreach (['capital_pool_total','capital_pool_lock','capital_pool_used'] as $key){
$val['capital_pool'][$key] = sprintf("%0.02f",$val['capital_pool'][$key]/100);
}
$poolTotal += $val['capital_pool']['capital_pool_total'];
$poolUsed += $val['capital_pool']['capital_pool_used'];
$poolLock += $val['capital_pool']['capital_pool_lock'];
......
......@@ -23,9 +23,11 @@ class PindanActivityColonelConfigService
{
$date = $params["date"];
$today = date("Y-m-d");
if ($date <= $today) {
$hour = date("H");
if ($date < $today || ($date == $today && $hour >= 12)) {
throw new MarketingException(['cus' => MarketingException::COLONEL_DATE_ERROR]);
}
$type = empty($params["type"]) ? ColonelDistributorConfig::TYPE_COLONEL : $params["type"];
$configList = $params["config"];
$marketingId = $params["marketing_id"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment