调整利息的错误

This commit is contained in:
luofei 2023-07-13 17:01:34 +08:00
parent 7d8b1fe9e5
commit 3b6902aaa2
5 changed files with 14 additions and 2 deletions

View File

@ -171,4 +171,10 @@ class Community extends BaseModel
$query->where('community_id', '<>',$value);
}
public function resale()
{
return $this->hasMany(Relevance::class, 'left_id','community_id')
->where('type',RelevanceRepository::TYPE_COMMUNITY_PRODUCT);
}
}

View File

@ -29,7 +29,7 @@ class StoreOrderInterest extends BaseModel
{
$days = ceil((time() - strtotime($this->start_time)) / 86400);
$days = max($days ,0);
$money = bcmul($this->total_price, ($this->rate / 100), 2);
$money = bcmul($this->total_price, ($this->rate / 100), 3);
return bcmul($days, $money, 2);
}

View File

@ -40,6 +40,8 @@ class CommunityRepository extends BaseRepository
public const COMMUNIT_TYPE_FONT = '1';
public const COMMUNIT_TYPE_VIDEO = '2';
public const COMMUNITY_TYPE_RESALE = 3; //转售贴
public const COMMUNITY_TYPE_ENTRUST = 4; //委托销售贴
/**
* CommunityRepository constructor.

View File

@ -35,6 +35,8 @@ class RelevanceRepository extends BaseRepository
const TYPE_COMMUNITY_REPLY_START = 'community_reply_start';
//商户权限
const TYPE_MERCHANT_AUTH = 'mer_auth';
//转售商品
const TYPE_COMMUNITY_RESALE = 'community_resale'; //转售贴关联
//指定范围类型
//0全部商品

View File

@ -18,12 +18,14 @@ use app\common\repositories\system\RelevanceRepository;
use app\common\repositories\user\UserHistoryRepository;
use app\common\repositories\user\UserRelationRepository;
use app\common\repositories\user\UserRepository;
use app\common\service\JgPush;
use app\validate\api\CommunityValidate;
use crmeb\basic\BaseController;
use crmeb\services\MiniProgramService;
use think\App;
use app\common\repositories\community\CommunityRepository as repository;
use think\exception\ValidateException;
use think\facade\Log;
class Community extends BaseController
{
@ -54,7 +56,7 @@ class Community extends BaseController
*/
public function lst()
{
$where = $this->request->params(['keyword','topic_id','is_hot','category_id','spu_id']);
$where = $this->request->params(['keyword','topic_id','is_hot','category_id','spu_id', 'is_type']);
if (!$where['category_id']) {
unset($where['category_id']);
} else if ($where['category_id'] == -1) {