多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
:-: 分销商品 文件路径:shop/controllers/Seller/Supplier/GoodsCtl.php; ##### 后台数据 出售中的商品(online()): $cront_row = array('shop_id' => Perm::$shopId,'common_parent_id:>'=>0, 'common_state' => Goods_CommonModel::GOODS_STATE_NORMAL, 'common_verify' => Goods_CommonModel::GOODS_VERIFY_ALLOW); // 如果有搜索单号 $cront_row['common_name:like'] = '%' . $goods_key . '%'; $goods_rows = $Goods_CommonModel->getCommonNormal($cront_row, array('common_id' => 'DESC'), $page, $row); public function getCommonNormal($cond_row = array(), $order_row = array(), $page = 1, $rows = 100) { $cond_row['shop_id'] = Perm::$shopId; $cond_row['common_state'] = Goods_CommonModel::GOODS_STATE_NORMAL; return $this->listByWhere($cond_row, $order_row, $page, $rows); } 仓库中的商品(offline()): $cront_row = array('shop_id' => Perm::$shopId,'common_parent_id:>'=>0); $cront_row = array('common_name:like' => '%' . $goods_key . '%'); $goods_rows = $Goods_CommonModel->getCommonOffline($cront_row, array('common_id' => 'DESC'), $page, $row); public function getCommonOffline($cond_row = array(), $order_row = array(), $page = 1, $rows = 100) { $cond_row['shop_id'] = Perm::$shopId; $cond_row['common_state'] = Goods_CommonModel::GOODS_STATE_OFFLINE; //下架 $cond_row['common_goods_from'] = 1; //不是外部导入商品(外部导入商品上架后属于正常商品,撕掉外部导入标签) if (Web_ConfigModel::value('goods_verify_flag') == 1) { $cond_row['common_verify'] = Goods_CommonModel::GOODS_VERIFY_ALLOW; //审核通过 } return $this->listByWhere($cond_row, $order_row, $page, $rows); } 等待审核的商品(verify()): $cront_row = array('shop_id' => Perm::$shopId,'common_parent_id:>'=>0); $cront_row = array('common_name:like' => '%' . $goods_key . '%'); $goods_rows = $Goods_CommonModel->getCommonVerifyWaiting($cront_row, array('common_id' => 'DESC'), $page, $row); public function getCommonVerifyWaiting($cond_row = array(), $order_row = array(), $page = 1, $rows = 100) { $cond_row['shop_id'] = Perm::$shopId; $cond_row['common_state:IN'] = [Goods_CommonModel::GOODS_STATE_OFFLINE, Goods_CommonModel::GOODS_STATE_NORMAL, Goods_CommonModel::GOODS_STATE_TIMING]; $cond_row['common_verify'] = Goods_CommonModel::GOODS_VERIFY_WAITING; return $this->listByWhere($cond_row, $order_row, $page, $rows); } ##### 前台显示 前台显示与商品列表中显示一致