Explorar el Código

商品下线,提示语优化

wufeng hace 2 años
padre
commit
2546b89841
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6 6
      app/admin/controller/Goodup.php

+ 6 - 6
app/admin/controller/Goodup.php

@@ -2707,7 +2707,7 @@ class Goodup extends Base
             $skuCodeS = Db::name("good_platform")
                 ->where(['spuCode' => $param['spuCode'], 'is_del' => 0])//exam_status 7审核失败,8已下线
                 ->column('exam_status,skuCode', 'skuCode');
-            if (empty($skuCodeS)) throw new \Exception('记录不存在');
+            if (empty($skuCodeS)) throw new \Exception('该商品未在任何平台申请上线');
 
             //商品平台
             Db::name("good_platform")
@@ -2731,14 +2731,14 @@ class Goodup extends Base
 
             //根据权限查询应该接收商品下线通知的人员
             $all_uid_name = Db::name('role_action')
-                ->whereFindInSet('action_conllect','877')//数据写死的,要注意各个环境数据是否一致
+                ->whereFindInSet('action_conllect', '877')//数据写死的,要注意各个环境数据是否一致
                 ->field('role_id')
                 ->buildSql();
 
             $all_user = Db::name('user_role')
                 ->alias('ur')
-                ->where('ur.roleid IN '.$all_uid_name)
-                ->leftJoin('depart_user du','du.uid = ur.uid AND du.is_del=0')
+                ->where('ur.roleid IN ' . $all_uid_name)
+                ->leftJoin('depart_user du', 'du.uid = ur.uid AND du.is_del=0')
                 ->column('ur.uid,du.nickName');
 
             $insert_good_exam_data = $insert_order_msg_data = [];
@@ -2791,11 +2791,11 @@ class Goodup extends Base
             Db::name('order_msg')->insertAll($insert_order_msg_data);
 
             Db::commit();
-            return app_show(0, "同一个成本商品编号下的商品下线成功");
+            return app_show(0, "下线成功");
 
         } catch (\Exception $e) {
             Db::rollback();
-            return error_show(1004, '同一个成本商品编号下的商品下线失败,' . $e->getMessage() . '|' . $e->getFile() . '|' . $e->getLine());
+            return error_show(1004, '操作失败,' . $e->getMessage());
         }
     }