|
@@ -158,6 +158,13 @@ class Goodup
|
|
|
$res = true;
|
|
|
|
|
|
if ($data['exam_status'] == $db::$exam_status_1) {
|
|
|
+
|
|
|
+ //运费,单位分,整数
|
|
|
+ $post_fee = Db::name('good_nake')
|
|
|
+ ->where(['spuCode' => $rs->spuCode, 'is_del' => 0])
|
|
|
+ ->where('min_num', '<=', $data['start_sale_num'])
|
|
|
+ ->value('delivery_fee', 0);
|
|
|
+
|
|
|
//审核通过
|
|
|
$update_data = array_merge($update_data, [
|
|
|
'yz_cat_id' => $data['yz_cat_id'],
|
|
@@ -167,6 +174,8 @@ class Goodup
|
|
|
'final_price' => $data['final_price'],
|
|
|
'start_sale_num' => $data['start_sale_num'],
|
|
|
'reject_reason' => '',
|
|
|
+ 'post_fee' => $post_fee,
|
|
|
+ 'desc' => $rs->good_remark,//商品描述
|
|
|
'good_ladder_id' => $data['good_ladder_id'],
|
|
|
]);
|
|
|
|
|
@@ -189,7 +198,7 @@ class Goodup
|
|
|
'uid' => isset($userinfo['data']['id']) ? $userinfo['data']['id'] : 0,
|
|
|
'nickname' => isset($userinfo['data']['nickname']) ? $userinfo['data']['nickname'] : '',
|
|
|
'good_img' => $rs->good_img,//图片集合
|
|
|
- 'post_fee' => Db::name('good_nake')->where(['spuCode' => $rs->spuCode, 'is_del' => 0])->where('min_num', '<=', $data['start_sale_num'])->value('delivery_fee', 0),//运费,单位分,整数
|
|
|
+ 'post_fee' => $post_fee,//运费,单位分,整数
|
|
|
'sell_point' => '',//商品卖点信息
|
|
|
'yz_cat_id' => $data['yz_cat_id'],//有赞类目id
|
|
|
'start_sale_num' => $data['start_sale_num'],//商品起售数,默认为1
|
|
@@ -429,4 +438,35 @@ class Goodup
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ //有赞下线商品列表
|
|
|
+ public static function youzanOfflineList(array $data = [])
|
|
|
+ {
|
|
|
+ $where = [['exam_status', '=', PlatformYouzan::$exam_status_8]];//已下线
|
|
|
+ if ($data['start_date'] != '' && $data['end_date'] != '') $where[] = ['addtime', 'between', [$data['start_date'], $data['end_date']]];
|
|
|
+ if ($data['creater'] != '') $where[] = ['creater', 'like', '%' . $data['creater'] . '%'];
|
|
|
+
|
|
|
+ $count = Db::name('platform_youzan')->where($where)->count('id');
|
|
|
+
|
|
|
+ $list = PlatformYouzan::field('*,id platform_youzan_id')
|
|
|
+ ->where($where)
|
|
|
+ ->order('addtime', 'desc')
|
|
|
+ ->page($data['page'], $data['size'])
|
|
|
+ ->select()
|
|
|
+ ->toArray();
|
|
|
+
|
|
|
+ return app_show(0, "获取成功", ['list' => $list, 'count' => $count]);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //有赞下线商品列表
|
|
|
+ public static function youzanOfflineDetail(int $platform_youzan_id = 0)
|
|
|
+ {
|
|
|
+ $info = PlatformYouzan::where('id', $platform_youzan_id)->findOrEmpty();
|
|
|
+
|
|
|
+ return app_show(0, "获取成功", $info);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|