feat : coupon
This commit is contained in:
@@ -22,7 +22,8 @@ use Hyperf\DbConnection\Model\Model;
|
||||
* @property string $appoint_value
|
||||
* @property string $use_scene_ids
|
||||
* @property int $validity_time_type
|
||||
* @property string $validity_time_value
|
||||
* @property string $validity_time_value
|
||||
* @property int $status
|
||||
* @property string $remark
|
||||
* @property string $create_time
|
||||
* @property string $update_time
|
||||
@@ -43,7 +44,7 @@ class CouponDispenseLog extends Model
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['id' => 'integer', 'coupon_template_id' => 'integer', 'send_count' => 'integer', 'receive_count' => 'integer', 'left_count' => 'integer', 'item_count' => 'integer', 'appoint_group' => 'integer', 'claim_rule' => 'integer', 'appoint_city_id' => 'integer', 'validity_time_type' => 'integer'];
|
||||
protected array $casts = ['id' => 'integer', 'coupon_template_id' => 'integer', 'send_count' => 'integer', 'receive_count' => 'integer', 'left_count' => 'integer', 'item_count' => 'integer', 'appoint_group' => 'integer', 'claim_rule' => 'integer', 'appoint_city_id' => 'integer', 'validity_time_type' => 'integer','status' => 'integer'];
|
||||
|
||||
const string CREATED_AT = 'create_time';
|
||||
const string UPDATED_AT = 'update_time';
|
||||
@@ -85,12 +86,14 @@ class CouponDispenseLog extends Model
|
||||
->where('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS)
|
||||
->whereColumn('total_count','!=','receive_count')
|
||||
->where('appoint_group',CouponCode::DISPENSE_APPOINT_GROUP_ALL_PEOPLE)
|
||||
->where('status',CouponCode::DISPENSE_VALIDITY)
|
||||
->pluck('id')
|
||||
->toArray();
|
||||
|
||||
$appoint = $this
|
||||
->where('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS)
|
||||
->where('appoint_group','!=',CouponCode::DISPENSE_APPOINT_GROUP_ALL_PEOPLE)
|
||||
->where('status',CouponCode::DISPENSE_VALIDITY)
|
||||
->pluck('id')
|
||||
->toArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user