|
|
@@ -4466,20 +4466,24 @@ namespace App;
|
|
|
->where($where)
|
|
|
->fetchAll();
|
|
|
if($rs){
|
|
|
+//
|
|
|
+// $classid_arr = array_column($rs,'three_classid');
|
|
|
|
|
|
- $classid_arr = array_column($rs,'three_classid');
|
|
|
+ $classid_arr = array_column($rs, 'three_classid');
|
|
|
|
|
|
- $claasid_str = implode(',',$classid_arr);
|
|
|
+ if(!empty($classid_arr)) {
|
|
|
+ // 使用参数化查询更安全
|
|
|
+ $res = \PhalApi\DI()->notorm->shop_goods_class
|
|
|
+ ->select("gc_id,gc_name,gc_icon")
|
|
|
+ ->where("gc_id", $classid_arr) // NotORM支持数组形式的IN查询
|
|
|
+ ->fetchAll();
|
|
|
+
|
|
|
+ $list = $res;
|
|
|
+ }
|
|
|
|
|
|
- $class_where = " gc_id in '{$claasid_str}'";
|
|
|
- $res=\PhalApi\DI()->notorm->shop_goods_class
|
|
|
- ->select("gc_id,gc_name,gc_icon")
|
|
|
- ->where($class_where)
|
|
|
- ->fetchAll();
|
|
|
- $list = $res;
|
|
|
}
|
|
|
|
|
|
- return $rs;
|
|
|
+ return $list;
|
|
|
}
|
|
|
|
|
|
// 根据不同条件获取物流列表信息
|