This commit is contained in:
Your Name
2020-06-10 13:23:50 +08:00
parent 1371b0a37a
commit 3d19b6129b
477 changed files with 86 additions and 117 deletions

View File

@ -323,8 +323,6 @@ class Orders extends Base{
// 验证商品规格是否已选
foreach ($carts['carts'] as $v) {
foreach ($v['list'] as $val) {
// 坑啊判断下会死嘛 ---- 20200116
if($val['isSpec']!=1)continue;
$id = Db::name('goods_specs')->where(['shopId'=>$val['shopId'],'goodsId'=>$val['goodsId']])->column('id');
if($id && $val['goodsSpecId'] == ''){
return WSTReturn("请选择商品规格型号!");

View File

@ -189,20 +189,19 @@ class Settlements extends Base
// 1推荐人获得预获产品券时限上日有消费≥10元为优惠款的50%。
// refPreProductYdGTMoney refPreProductYesInSaleScale
// 2推荐人获得预获产品券时限上日有消费10元为优惠款的25% refPreProductNoInSaleScale
// 20200114 -- 说用不上,注释
// $m->setTable('user_trees');
// $pid = $m->getField(['uid'=>$shops['userId']],'pid');
// if($pid && $pInfo = getUserInfo(['userId'=>$pid,'dataFlag'=>1,'userStatus'=>1],'userId') && 3 != $order->goodsType){//有推荐人并且推荐人状态正常
// $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($pid,'realTotalMoney');
// if($yesterdayBuyMoney >= dataConf('refPreProductYdGTMoney')){//大于设定值
// $refProductMoney = round($discountMoney * (dataConf('refPreProductYesInSaleScale')*0.01),2);//1
// }else{
// $refProductMoney = round($discountMoney * (dataConf('refPreProductNoInSaleScale')*0.01),2);//2
// }
// if($refProductMoney > 0){
// Model('common/UserVouchers')->insertVouchersNotice($pid,$orderId,$refProductMoney,0,'交易订单【'.$order->orderNo.'】推荐所得');
// }
// }
$m->setTable('user_trees');
$pid = $m->getField(['uid'=>$shops['userId']],'pid');
if($pid && $pInfo = getUserInfo(['userId'=>$pid,'dataFlag'=>1,'userStatus'=>1],'userId') && 3 != $order->goodsType){//有推荐人并且推荐人状态正常
$yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($pid,'realTotalMoney');
if($yesterdayBuyMoney >= dataConf('refPreProductYdGTMoney')){//大于设定值
$refProductMoney = round($discountMoney * (dataConf('refPreProductYesInSaleScale')*0.01),2);//1
}else{
$refProductMoney = round($discountMoney * (dataConf('refPreProductNoInSaleScale')*0.01),2);//2
}
if($refProductMoney > 0){
Model('common/UserVouchers')->insertVouchersNotice($pid,$orderId,$refProductMoney,0,'交易订单【'.$order->orderNo.'】推荐所得');
}
}
return true;
}
/**

View File

@ -161,9 +161,9 @@ class Shopping extends Base{
// COS('.$lat.'*PI()/180)*COS(lat*PI()/180)*POW(SIN(('.$lng.'*PI()/180-lng*PI()/180)/2),2)))*1000) AS distance';
$order = 'distance ASC';
//纬度
//$where['s.lat']=array('between',array($start['left-bottom']['lat'],$start['left-top']['lat']));
$where['s.lat']=array('between',array($start['left-bottom']['lat'],$start['left-top']['lat']));
//经度
//$where['s.lng']=array('between',array($start['left-bottom']['lng'],$start['right-bottom']['lng']));
$where['s.lng']=array('between',array($start['left-bottom']['lng'],$start['right-bottom']['lng']));
$rs = Db::name('shops s')
->where($where)
->field($field)

0
hyhproject/common/model/UserLevel.php Normal file → Executable file
View File

View File

@ -7,7 +7,6 @@ use think\Db;
*/
class UserVouchers extends Base{
public function startGiveVouchers(){
if('127.0.0.1' != $ip = request()->ip(0) ) return $ip;
set_time_limit(0);
$sm = Model('common/SysSummary');
$sysData= $sm->getInfo('toPayFast,toPaySlow');

View File

@ -104,7 +104,7 @@ class Users extends Base{
->join('user_trees t','u.userId=t.uid')
->join('user_lock l','u.userId=l.userId')
->where(['t.pid'=>$userId,'u.userStatus'=>0,'u.userLevel'=>$userLevel])
->field('u.userId,u.loginName as trueName,u.userPhone,u.userLevel,l.lockReason,l.lockTime,from_unixtime(l.createTime) createTime')
->field('u.userId,u.trueName,u.userPhone,u.userLevel,l.lockReason,l.lockTime,from_unixtime(l.createTime) createTime')
->order('l.id DESC,u.userId DESC')
->paginate(input('pageSize/d'))->toArray();
}else{