1.提交缺失的东西
This commit is contained in:
@ -50,7 +50,14 @@ class CartLogic
|
||||
}
|
||||
|
||||
if ($info) {
|
||||
if($goods_num + $info['goods_num'] > 2 || $goods_num >2){
|
||||
$goods_cart = Cart::where("goods_id",$goods['goods_id'])
|
||||
->where("user_id",$user_id)
|
||||
->select();
|
||||
$count = 0;
|
||||
foreach($goods_cart as $key=>$value){
|
||||
$count+=$value['goods_num'];
|
||||
}
|
||||
if($count + $info['goods_num'] > 2 || $count >2){
|
||||
return '每单限额两套';
|
||||
}
|
||||
|
||||
|
||||
@ -926,17 +926,9 @@ class OrderLogic extends LogicBase
|
||||
}
|
||||
|
||||
public static function getYuyueTime($data){
|
||||
$time = "TIME(
|
||||
CONCAT(
|
||||
LPAD(SUBSTRING_INDEX(start_time, ':', 1), 2, '0'),
|
||||
':',
|
||||
LPAD(SUBSTRING_INDEX(start_time, ':', -1), 2, '0'),
|
||||
':00'
|
||||
)
|
||||
)";
|
||||
return Db::name("order_yuyetime")
|
||||
->where("store_id",$data['store_id'])
|
||||
->order($time)
|
||||
->orderRaw("STR_TO_DATE(start_time, '%H:%i')")
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user