|
|
|
@ -12,9 +12,10 @@ declare (strict_types=1); |
|
|
|
|
|
|
|
|
|
namespace app\timer\model\dealer; |
|
|
|
|
|
|
|
|
|
use app\common\enum\order\OrderStatus as OrderStatusEnum; |
|
|
|
|
use app\common\model\dealer\Order as OrderModel; |
|
|
|
|
use app\timer\model\dealer\Setting as DealerSettingModel; |
|
|
|
|
use app\common\enum\order\OrderStatus as OrderStatusEnum; |
|
|
|
|
use think\facade\Db; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分销商订单模型 |
|
|
|
@ -40,6 +41,8 @@ class Order extends OrderModel |
|
|
|
|
]; |
|
|
|
|
// 佣金结算天数 |
|
|
|
|
$filter[] = ['order.receipt_time', '<=', DealerSettingModel::getSettleTerm($storeId)]; |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => "设置分销订单查询条件", 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($filter), 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
// 获取订单列表记录 |
|
|
|
|
return $this->alias('m') |
|
|
|
|
->field(['m.*']) |
|
|
|
@ -50,6 +53,7 @@ class Order extends OrderModel |
|
|
|
|
->where('m.is_settled', '=', 0) |
|
|
|
|
->where('m.store_id', '=', $storeId) |
|
|
|
|
->select(); |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => Db::getLastSql(), 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|