Accept Merge Request #72: (feature/dgg -> develop)
Merge Request: feat: 【小程序】重复异常上报时,显示出上一次提交的数据 Created By: @大狗哥 Accepted By: @大狗哥 URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/72
This commit is contained in:
commit
a4de4d8b61
|
|
@ -19,6 +19,11 @@ class Order extends Model
|
|||
return $this->belongsTo(\app\admin\model\Area::class,'area_id', 'area_code');
|
||||
}
|
||||
|
||||
public function coupon()
|
||||
{
|
||||
return $this->belongsTo(\app\admin\model\Coupons::class,'coupon_id', 'id');
|
||||
}
|
||||
|
||||
public function getCustomerAttr(string $val)
|
||||
{
|
||||
return maskExceptFirstChar($val);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class OrderAbnormalService extends BaseService
|
|||
'detail',
|
||||
'create_time',
|
||||
])
|
||||
->order('id', 'desc')
|
||||
->find();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,16 @@ class OrderDispatchService extends BaseService
|
|||
{
|
||||
return $this->getOrderDispatchModel()
|
||||
->with(['orderInfo' => function ($query) {
|
||||
$query->with(['area' => function ($query) {
|
||||
$query->field('id,area_code,merge_name');
|
||||
}])->field('id,order_no,item_id,item_title,receive_type,address,lng,lat,plan_time,online_amount,discount_amount,area_id,status');
|
||||
$query->with(
|
||||
[
|
||||
'area' => function ($query) {
|
||||
$query->field('id,area_code,merge_name');
|
||||
},
|
||||
'coupon' => function ($query) {
|
||||
$query->field('id,threshold,discount_value');
|
||||
}
|
||||
]
|
||||
)->field('id,order_no,item_id,item_title,receive_type,address,lng,lat,plan_time,online_amount,discount_amount,area_id,status,coupon_id');
|
||||
}])
|
||||
->where('status', OrderDispatch::STATUS_TOGET)
|
||||
->where('worker_id', $workerId)
|
||||
|
|
@ -72,9 +79,14 @@ class OrderDispatchService extends BaseService
|
|||
{
|
||||
$model = $this->getOrderDispatchModel()
|
||||
->with(['orderInfo' => function ($query) {
|
||||
$query->with(['area' => function ($query) {
|
||||
$query->field('id,area_code,merge_name');
|
||||
}])->field('id,order_no,item_id,item_title,receive_type,address,lng,lat,plan_time,online_amount,discount_amount,area_id,customer,tel,status');
|
||||
$query->with([
|
||||
'area' => function ($query) {
|
||||
$query->field('id,area_code,merge_name');
|
||||
},
|
||||
'coupon' => function ($query) {
|
||||
$query->field('id,threshold,discount_value');
|
||||
}
|
||||
])->field('id,order_no,item_id,item_title,receive_type,address,lng,lat,plan_time,online_amount,discount_amount,area_id,customer,tel,status,coupon_id');
|
||||
}])
|
||||
->where('worker_id', $workerId);
|
||||
|
||||
|
|
@ -213,6 +225,7 @@ class OrderDispatchService extends BaseService
|
|||
'detail',
|
||||
'images',
|
||||
'status',
|
||||
'coupon_id',
|
||||
];
|
||||
$orderDispatchFields = [
|
||||
'id',
|
||||
|
|
@ -235,9 +248,14 @@ class OrderDispatchService extends BaseService
|
|||
];
|
||||
$res = $this->getOrderDispatchModel()
|
||||
->with(['orderInfo' => function ($query) use ($orderFields) {
|
||||
$query->with(['area' => function ($query) {
|
||||
$query->field('id,area_code,merge_name');
|
||||
}])->field($orderFields);
|
||||
$query->with([
|
||||
'area' => function ($query) {
|
||||
$query->field('id,area_code,merge_name');
|
||||
},
|
||||
'coupon' => function ($query) {
|
||||
$query->field('id,threshold,discount_value');
|
||||
}
|
||||
])->field($orderFields);
|
||||
}])
|
||||
->where('id', $orderDispatchId)
|
||||
->where('worker_id', $workerId)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user