| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- /**
- * Created by PhpStorm.
- * User: shenyang
- * Date: 2017/10/13
- * Time: 下午1:49
- */
- namespace app\frontend\modules\finance\deduction\deductionSettings;
- use app\framework\Support\Facades\Log;
- use app\frontend\modules\deduction\DeductionSettingInterface;
- class PointShopDeductionSetting implements DeductionSettingInterface
- {
- public function getWeight()
- {
- return 30;
- }
- // todo 将运费抵扣分离出去
- public function isEnableDeductDispatchPrice()
- {
- Log::debug("监听抵扣状态", \Setting::get('point.set.point_freight'));
- return \Setting::get('point.set.point_freight');
- }
- public function isMaxDisable()
- {
- return !\Setting::get('point.set.point_deduct');
- }
- public function isMinDisable()
- {
- return !\Setting::get('point.set.point_deduct');
- }
- public function isDispatchDisable()
- {
- return !\Setting::get('point.set.point_deduct');
- }
- public function getMaxFixedAmount()
- {
- return false;
- }
- public function getMaxPriceProportion()
- {
- return \Setting::get('point.set.money_max');
- }
- public function getDeductionAmountType()
- {
- return \Setting::get('point.set.deduction_amount_type', 0);
- }
- public function getMinDeductionType()
- {
- return 'GoodsPriceProportion';
- }
- public function getMinFixedAmount()
- {
- return false;
- }
- public function getMinPriceProportion()
- {
- return \Setting::get('point.set.money_min');
- }
- public function getMaxDeductionType()
- {
- return 'GoodsPriceProportion';
- }
- public function getAffectDeductionAmount()
- {
- if (\Setting::get('point.set.point_deduction_integer')) {
- return 'integer';
- }
- return false;
- }
- }
|