1.提交缺失的东西

This commit is contained in:
2025-09-04 16:26:08 +08:00
parent 8dc361b564
commit 6708ac5d47
2 changed files with 9 additions and 10 deletions

View File

@ -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 '每单限额两套';
}

View File

@ -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();
}