更新文字

This commit is contained in:
mkm 2024-02-21 18:09:22 +08:00
parent 49461d5efd
commit fbc6f697db
3 changed files with 7 additions and 7 deletions

View File

@ -27,7 +27,7 @@ class StoreConsumptionDao extends BaseDao
{ {
return StoreConsumption::whereIn('type', [StoreConsumption::TYPE_OWNER_CONSUMPTION, StoreConsumption::TYPE_PULL_CONSUMPTION])->where('status', StoreConsumption::STATUS_ENABLE) return StoreConsumption::whereIn('type', [StoreConsumption::TYPE_OWNER_CONSUMPTION, StoreConsumption::TYPE_PULL_CONSUMPTION])->where('status', StoreConsumption::STATUS_ENABLE)
->field('coupon_id,start_time,end_time,title')->select()->each(function ($item){ ->field('coupon_id,start_time,end_time,title')->select()->each(function ($item){
if($item['title']=='无门槛实物通用红包'){ if($item['title']=='无门槛实物通用补贴'){
$item['title'] = '用户推荐拉新活动'; $item['title'] = '用户推荐拉新活动';
}else{ }else{
$item['title'] = '用户消费补贴活动'; $item['title'] = '用户消费补贴活动';

View File

@ -233,7 +233,7 @@ class StoreConsumptionUserDao extends BaseDao
*/ */
public function send($consumption, float $rate, int $userId, string $groupOrderIds, float $amount, $status = -2, $type = 1) public function send($consumption, float $rate, int $userId, string $groupOrderIds, float $amount, $status = -2, $type = 1)
{ {
$title = $type == StoreConsumptionUser::TYPE_TWO ? '现金抵扣红包' : '无门槛实物通用红包'; $title = $type == StoreConsumptionUser::TYPE_TWO ? '现金抵扣补贴' : '无门槛实物通用补贴';
$model = StoreConsumptionUser::where('uid', $userId)->where('type', StoreConsumptionUser::TYPE_TWO)->find(); $model = StoreConsumptionUser::where('uid', $userId)->where('type', StoreConsumptionUser::TYPE_TWO)->find();
$couponPrice = bcmul($amount, $rate, 2); $couponPrice = bcmul($amount, $rate, 2);
if (!empty($model) && $model['type'] == $type) { if (!empty($model) && $model['type'] == $type) {
@ -432,7 +432,7 @@ class StoreConsumptionUserDao extends BaseDao
// 写入红包日志 // 写入红包日志
/** @var $userBillRepository UserBillRepository */ /** @var $userBillRepository UserBillRepository */
$userBillRepository = app()->make(UserBillRepository::class); $userBillRepository = app()->make(UserBillRepository::class);
$title = $model['type'] == StoreConsumptionUser::TYPE_TWO ? '现金抵扣红包' : '无门槛实物通用红包'; $title = $model['type'] == StoreConsumptionUser::TYPE_TWO ? '现金抵扣补贴' : '无门槛实物通用补贴';
$userBillRepository->incBill($refundOrder['uid'], 'red_pack', "red_pack_{$model['type']}", [ $userBillRepository->incBill($refundOrder['uid'], 'red_pack', "red_pack_{$model['type']}", [
'link_id' => $refundOrder['order_id'], 'link_id' => $refundOrder['order_id'],
'status' => 1, 'status' => 1,

View File

@ -12,12 +12,12 @@ class StoreConsumptionUser extends BaseModel
const STATUS_UNUSED = 0; //未使用 const STATUS_UNUSED = 0; //未使用
const STATUS_USED = 1; //已使用 const STATUS_USED = 1; //已使用
const STATUS_OVERDUE = 2; //过期的 const STATUS_OVERDUE = 2; //过期的
const TYPE_ONE = 1; //实物通用红包 const TYPE_ONE = 1; //实物通用补贴
const TYPE_TWO = 2; //现金抵扣红包 const TYPE_TWO = 2; //现金抵扣补贴
const TYPE_MAP = [ const TYPE_MAP = [
self::TYPE_ONE => '无门槛实物通用红包', self::TYPE_ONE => '无门槛实物通用补贴',
self::TYPE_TWO => '现金抵扣红包', self::TYPE_TWO => '现金抵扣补贴',
]; ];
public static function tablePk(): string public static function tablePk(): string