diff --git a/H5B854518.wgt b/H5B854518.wgt index fafb764..301b044 100644 Binary files a/H5B854518.wgt and b/H5B854518.wgt differ diff --git a/get_version_new.php b/get_version_new.php index eb3ac00..667440e 100755 --- a/get_version_new.php +++ b/get_version_new.php @@ -2,7 +2,7 @@ $data['version'] = 16; $data['ios_must_update'] = 0; //是否强制更新,0不强制,1强制 $data['must_update'] = 1; //是否强制更新,0不强制,1强制 -$data['apk_version'] = '2.2.7'; +$data['apk_version'] = '2.2.8'; $data['apk_down_url'] = 'http://www.zgqlg.com.cn/H5B854518.wgt'; //$data['ios_version'] = '1.0.0'; $data['ios_appid'] = '1355322179'; diff --git a/hyhproject/common/model/UserVouchers.php b/hyhproject/common/model/UserVouchers.php index 21c82a0..473f6a6 100755 --- a/hyhproject/common/model/UserVouchers.php +++ b/hyhproject/common/model/UserVouchers.php @@ -21,12 +21,12 @@ class UserVouchers extends Base{ //应释放总额 $toPaySum = $payFast + $paySlow; Db::startTrans(); - try{ + try{ $m = Model('common/Table'); - $m->setTable('user_vouchers_summary'); + $m->setTable('user_vouchers_summary'); if(1 == date('j')){ //每月损耗 - $monthScale = round((100-dataConf('couponsNextMonthInitSacle'))*0.01,2); + $monthScale = round((100-dataConf('couponsNextMonthInitSacle'))*0.01,2); $giveList = $m->getList([],'id, userId, expectedProductNum, expectedCouponsNum'); foreach ($giveList as &$g) { if($g['expectedProductNum'] > 0){ @@ -38,7 +38,7 @@ class UserVouchers extends Base{ $this->insertVouchersNotice($g['userId'],0,0,$decNum,$desc='预获优惠券月耗损',0,1); } } - } + } $where['isDisabled'] = 0; //总预获产品券 $allPreProduct = $m->getSum($where,'expectedProductNum'); @@ -128,7 +128,7 @@ class UserVouchers extends Base{ $data['isGive'] = 1; $data['giveDate'] = $time; $data['giveDay'] = $v['giveDay'] + 1; - $m->updateInfo(['id'=>$v['id']],$data); + Db::name('user_vouchers_summary')->where(['id'=>$v['id']])->update($data); } Db::commit(); Db::startTrans(); @@ -136,18 +136,16 @@ class UserVouchers extends Base{ // A、当“助购预获”值为负数时,每天0.1%耗损在“预获产品券”值扣减。 // B、当“预获产品券”值为负数时,每天0.1%耗损在“预获优惠券”值扣减。 // C、当“助购预获”值和“预获产品券”值同为负数时,每天0.1%耗损在“预获优惠券”值同时扣减。 - $vm = Model('common/Table'); - $vm->setTable('user_vouchers_summary'); - $data = $vm->whereOr(["helpSaleNum"=>["lt", 0]])->whereOr(["expectedProductNum"=>["lt", 0]])->select(); + $data = Db::name('user_vouchers_summary')->whereOr(["helpSaleNum"=>["lt", 0]])->whereOr(["expectedProductNum"=>["lt", 0]])->select(); foreach ($data as $_each){ if($_each["expectedProductNum"]<0){ $count = (float)$_each["expectedProductNum"]; if($_each["helpSaleNum"] < 0)$count+=(float)$_each["helpSaleNum"]; - $this->insertVouchersNotice($_each["userId"], 0, 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), + model('common/UserVouchers')->insertVouchersNotice($_each["userId"], 0, 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), "预获产品券为负,每天耗损预获优惠券", 0); }else{ $count = (float)$_each["helpSaleNum"]; - $this->insertVouchersNotice($_each["userId"], 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), + model('common/UserVouchers')->insertVouchersNotice($_each["userId"], 0, $count*((float)dataConf("deductionRateWhennegPreCoupons")/100), 0, "助购预获为负,每天耗损预获产品券", 0); } }