Commit 100f077f authored by 朱招明's avatar 朱招明

update

接口返回分红方式
parent 0314286a
......@@ -25,6 +25,7 @@ class SchemeTransformer extends BaseTransformer
* @OA\Property(property="unconsume_amount", type="float", description="不可消费充值金额"),
* @OA\Property(property="online_pay", type="integer", description="是否线上支付"),
* @OA\Property(property="dividend_type", type="integer", description="分红方式"),
* @OA\Property(property="dividend_type_text", type="integer", description="分红方式"),
* @OA\Property(property="benefit_month", type="integer", description="受益时长/月"),
* @OA\Property(property="interests_images", type="string", description="方案权益"),
* @OA\Property(property="status", type="integer", description="启用状态"),
......@@ -34,6 +35,10 @@ class SchemeTransformer extends BaseTransformer
*/
public function transform(Scheme $scheme)
{
return map_attr($scheme, ['id', 'name', 'direct_source_ratio', 'indirect_source_ratio','recharge_amount','consume_amount','unconsume_amount','online_pay','dividend_type','benefit_month','interests_images', 'status', 'created_at', 'updated_at']);
$dividend_type = config('scheme.dividend_type');
$scheme->dividend_type_text = $dividend_type[$scheme->dividend_type]??'无';
return map_attr($scheme, ['id', 'name', 'direct_source_ratio', 'indirect_source_ratio','recharge_amount','consume_amount','unconsume_amount','online_pay','dividend_type','dividend_type_text','benefit_month','interests_images', 'status', 'created_at', 'updated_at']);
}
}
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