修改订单逻辑
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -120,7 +120,9 @@ class OrderLogic extends LogicBase
|
|||||||
|
|
||||||
$order_amount += $total_shipping_price;//应付订单金额+运费
|
$order_amount += $total_shipping_price;//应付订单金额+运费
|
||||||
$total_amount += $total_shipping_price;//订单金额+运费
|
$total_amount += $total_shipping_price;//订单金额+运费
|
||||||
|
if ($post['goods_type'] == 4){
|
||||||
|
self::$order_type = CommonOrder::GROUP_ORDER;//普通订单
|
||||||
|
}
|
||||||
$result = [
|
$result = [
|
||||||
'order_type' => self::$order_type,
|
'order_type' => self::$order_type,
|
||||||
'goods_lists' => array_values($goods_lists),
|
'goods_lists' => array_values($goods_lists),
|
||||||
@@ -951,7 +953,6 @@ class OrderLogic extends LogicBase
|
|||||||
$order = new Order();
|
$order = new Order();
|
||||||
$where[] = ['del', '=', 0];
|
$where[] = ['del', '=', 0];
|
||||||
// $where[] = ['user_id', '=', $user_id];
|
// $where[] = ['user_id', '=', $user_id];
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'pay':
|
case 'pay':
|
||||||
$where[] = ['pay_status', '=', CommonOrder::STATUS_WAIT_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(); //查询订单服务次数
|
$number=Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',3)->count(); //查询订单服务次数
|
||||||
$list['ordercs']=$number;
|
$list['ordercs']=$number;
|
||||||
$list['orderyjfw']= $list['number']-$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['showBubble']=false;
|
||||||
$list['more']="更多";
|
$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 = [
|
$data = [
|
||||||
'list' => $lists,
|
'list' => $lists,
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ class Order extends Model
|
|||||||
protected $name = 'order';
|
protected $name = 'order';
|
||||||
|
|
||||||
//订单类型
|
//订单类型
|
||||||
const NORMAL_ORDER = 0;//普通订单
|
const NORMAL_ORDER = 0;//服务订单
|
||||||
const SECKILL_ORDER = 1;//秒杀订单
|
const SECKILL_ORDER = 1;//秒杀订单
|
||||||
const TEAM_ORDER = 2;//拼团订单
|
const TEAM_ORDER = 2;//拼团订单
|
||||||
const BARGAIN_ORDER = 3;//砍价订单
|
const BARGAIN_ORDER = 3;//砍价订单
|
||||||
|
const GROUP_ORDER = 4; //普通订单
|
||||||
|
|
||||||
//订单状态
|
//订单状态
|
||||||
const STATUS_WAIT_PAY = 0; //待付款
|
const STATUS_WAIT_PAY = 0; //待付款
|
||||||
@@ -52,6 +53,7 @@ class Order extends Model
|
|||||||
self::SECKILL_ORDER => '秒杀订单',
|
self::SECKILL_ORDER => '秒杀订单',
|
||||||
self::TEAM_ORDER => '拼团订单',
|
self::TEAM_ORDER => '拼团订单',
|
||||||
self::BARGAIN_ORDER => '砍价订单',
|
self::BARGAIN_ORDER => '砍价订单',
|
||||||
|
self::GROUP_ORDER => '普通订单',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($type === true){
|
if ($type === true){
|
||||||
|
|||||||
Reference in New Issue
Block a user