修改订单逻辑

This commit is contained in:
2026-01-06 16:48:15 +08:00
parent b984ed1dba
commit 14016c4144
3 changed files with 785 additions and 629 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -120,7 +120,9 @@ class OrderLogic extends LogicBase
$order_amount += $total_shipping_price;//应付订单金额+运费
$total_amount += $total_shipping_price;//订单金额+运费
if ($post['goods_type'] == 4){
self::$order_type = CommonOrder::GROUP_ORDER;//普通订单
}
$result = [
'order_type' => self::$order_type,
'goods_lists' => array_values($goods_lists),
@@ -951,7 +953,6 @@ class OrderLogic extends LogicBase
$order = new Order();
$where[] = ['del', '=', 0];
// $where[] = ['user_id', '=', $user_id];
switch ($type) {
case 'pay':
$where[] = ['pay_status', '=', CommonOrder::STATUS_WAIT_PAY];
@@ -987,9 +988,23 @@ class OrderLogic extends LogicBase
$number=Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',3)->count(); //查询订单服务次数
$list['ordercs']=$number;
$list['orderyjfw']= $list['number']-$number;
$list['orderdaifw'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',0)->count(); //待服务数量
$list['orderfwzhon'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',1)->count(); //服务中数量
$list['showBubble']=false;
$list['more']="更多";
}
/**
* order_status订单状态 0-待付款;1-待发货;2-待收货;3-已完成;4-已关闭
* pay_status支付状态;0-待支付;1-已支付;2-已退款;3-拒绝退款
* order_amount应付款金额
* order_type订单类型;0-服务商品;1-秒杀订单;2-拼团订单;3-砍价订单;4-普通商品
* shipping_status发货状态
* number订单的总条数
* code订单的执行次数
* goods_price订单商品总价
* ordercs以订单服务次数
* orderyjfw订单的剩余执行次数
*/
$data = [
'list' => $lists,
'page' => $page,

View File

@@ -10,10 +10,11 @@ class Order extends Model
protected $name = 'order';
//订单类型
const NORMAL_ORDER = 0;//普通订单
const NORMAL_ORDER = 0;//服务订单
const SECKILL_ORDER = 1;//秒杀订单
const TEAM_ORDER = 2;//拼团订单
const BARGAIN_ORDER = 3;//砍价订单
const GROUP_ORDER = 4; //普通订单
//订单状态
const STATUS_WAIT_PAY = 0; //待付款
@@ -52,6 +53,7 @@ class Order extends Model
self::SECKILL_ORDER => '秒杀订单',
self::TEAM_ORDER => '拼团订单',
self::BARGAIN_ORDER => '砍价订单',
self::GROUP_ORDER => '普通订单',
];
if ($type === true){