Commit 26f15586 by lzzzzl

initial commit

parent ea893f4f
......@@ -17,11 +17,11 @@ LARAVELS_LISTEN_PORT=40001
worker_num = 3
DB_CONNECTION=mysql
DB_HOST=192.168.1.235
DB_USERNAME=icDb29mLy2s
DB_PASSWORD=icDb29mLy2s
DB_HOST=192.168.2.232
DB_USERNAME=liexin_scm_wms
DB_PASSWORD=liexin_scm_wms#zsyM
DB_DATABASE=liexin_scm_wms
DB_PORT=3306
DB_DATABASE=0
REDIS_HOST=192.168.1.235
REDIS_PASSWORD=icDb29mLy2s
......
......@@ -2,15 +2,426 @@
namespace App\Http\Controllers;
use App\Model\SelfSampleClassModel;
use App\Model\SelfSampleModel;
use Common\Model\RedisModel;
use App\Model\SelfGoodsModel;
use App\Model\SkuModel;
use App\Model\SpuModel;
use App\Http\Model\CustomerModel;
use App\Http\Model\GoodsModel;
use App\Http\Model\LocationModel;
use App\Http\Model\StoreModel;
use App\Http\Model\SupplierModel;
use App\Http\Model\ZoneModel;
use Illuminate\Http\Request;
class ServicesController extends Controller
{
public function Entrance(Request $request, $id)
{
return $this->$id($request, $id);
}
public function apiReturn($Errcode = 0, $level = 1 , $dataArr = '') {
//生成错误码
$Errcode = $this->Errcode($Errcode , $level);
//获取错误描述
$ErrMsg = config('errmsg.cn.'.$Errcode);
//上报错误
$data=['errcode'=>$Errcode, 'errmsg'=>$ErrMsg];
//非正常返回码,上报
if(($data['errcode'] < 10000 || $data['errcode'] >= 50000) && $data['errcode'] !==0 ){
try{
ErrorLog($Errcode,$ErrMsg);
}catch (\Exception $e){
Log::info($e);
}
}
if(!empty($dataArr) && is_array($dataArr)){
foreach ($dataArr as $k=>$v){
$data['data'][$k]=$v;
}
}else{
$data['data'] = $dataArr;
}
return json_encode($data);
}
/**
* @param int $code 错误码
* @param int $level 错误级别 1普通错误 5需关注错误 9致命错误,急需解决
* @return int
*/
protected function Errcode( $code = 0,$level=1){
if($code === 0) return 0;
$SystemCode=config('website.SystemCode');
return errCode($code,$level,$SystemCode);
}
/**
* 获取仓库信息
*/
public function ApiStoreInfo($request) {
$params = $request->only(['limit','page','store_sn','store_name','erp_store_sn']);
$arr = array(
'limit' => !empty($params['limit'])?$params['limit']:10,
'page' => !empty($params['page'])?$params['page']:1,
'store_sn' => !empty($params['store_sn'])?$params['store_sn']:'',
'store_name' => !empty($params['store_name'])?$params['store_name']:'',
'erp_store_sn' => !empty($params['erp_store_sn'])?$params['erp_store_sn']:''
);
$data = (new StoreModel())->storeInfo($arr);
return $this->apiReturn($Errcode = 0, $level = 1 , $dataArr=$data);
}
/**
* 插入仓库信息
*/
public function ApiInsertStoreInfo($request) {
$params = $request->only(['store_sn','store_name','erp_store_sn','erp_store_id','admin_id','admin_name']);
if (empty($params['store_sn']) || empty($params['store_name']) || empty($params['erp_store_sn']) || empty($params['erp_store_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array(
'store_sn' => $params['store_sn'],
'store_name' => $params['store_name'],
'erp_store_sn' => $params['erp_store_sn'],
'erp_store_id' => $params['erp_store_id'],
'admin_name' => $params['admin_name'],
'admin_id' => $params['admin_id'],
'add_time' => time(),
'update_time' => time(),
);
$result = (new StoreModel())->insertStoreInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 102, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 更新仓库信息
*/
public function ApiUpdateStoreInfo($request) {
$params = $request->only(['store_id','store_sn','store_name','erp_store_sn','erp_store_id','admin_id','admin_name']);
if (empty($params['store_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array();
$arr['store_id'] = $params['store_id'];
$arr['admin_id'] = $params['admin_id'];
$arr['admin_name'] = $params['admin_name'];
$arr['update_time'] = time();
if (!empty($params['store_sn']))
$arr['store_sn'] = $params['store_sn'];
if (!empty($params['store_name']))
$arr['store_name'] = $params['store_name'];
if (!empty($params['erp_store_sn']))
$arr['erp_store_sn'] = $params['erp_store_sn'];
if (!empty($params['erp_store_id']))
$arr['erp_store_id'] = $params['erp_store_id'];
$result = (new StoreModel())->updateStoreInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 103, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 获取区域信息
*/
public function ApiZoneInfo($request) {
$params = $request->only(['limit','page','zone_sn','zone_name','store_name']);
$arr = array(
'limit' => !empty($params['limit'])?$params['limit']:10,
'page' => !empty($params['page'])?$params['page']:1,
'zone_sn' => !empty($params['zone_sn'])?$params['zone_sn']:'',
'zone_name' => !empty($params['zone_name'])?$params['zone_name']:'',
'store_name' => !empty($params['store_name'])?$params['store_name']:''
);
$data = (new ZoneModel())->zoneInfo($arr);
return $this->apiReturn($Errcode = 0, $level = 1 , $dataArr=$data);
}
/**
* 插入仓库信息
*/
public function ApiInsertZoneInfo($request) {
$params = $request->only(['zone_sn','zone_name','store_id','admin_id','admin_name']);
if (empty($params['zone_sn']) || empty($params['zone_name']) || empty($params['store_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array(
'zone_sn' => $params['zone_sn'],
'zone_name' => $params['zone_name'],
'store_id' => $params['store_id'],
'admin_name' => $params['admin_name'],
'admin_id' => $params['admin_id'],
'add_time' => time(),
'update_time' => time(),
);
$result = (new ZoneModel())->insertZoneInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 102, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 更新仓库信息
*/
public function ApiUpdateZoneInfo($request) {
$params = $request->only(['zone_id','zone_sn','zone_name','store_id','admin_id','admin_name']);
if (empty($params['zone_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array();
$arr['zone_id'] = $params['zone_id'];
$arr['admin_id'] = $params['admin_id'];
$arr['admin_name'] = $params['admin_name'];
$arr['update_time'] = time();
if (!empty($params['zone_sn']))
$arr['zone_sn'] = $params['zone_sn'];
if (!empty($params['zone_name']))
$arr['zone_name'] = $params['zone_name'];
if (!empty($params['store_id']))
$arr['store_id'] = $params['store_id'];
$result = (new ZoneModel())->updateZoneInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 103, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 获取货位信息
*/
public function ApiLocationInfo($request) {
$params = $request->only(['limit','page','location_name','zone_name']);
$arr = array(
'limit' => !empty($params['limit'])?$params['limit']:10,
'page' => !empty($params['page'])?$params['page']:1,
'location_name' => !empty($params['location_name'])?$params['location_name']:'',
'zone_name' => !empty($params['zone_name'])?$params['zone_name']:'',
);
$data = (new LocationModel())->locInfo($arr);
return $this->apiReturn($Errcode = 0, $level = 1 , $dataArr=$data);
}
/**
* 插入仓库信息
*/
public function ApiInsertLocationInfo($request) {
$params = $request->only(['location_name','location_sn','zone_id','store_id','admin_id','admin_name']);
if (empty($params['location_name']) || empty($params['location_sn']) || empty($params['zone_id']) || empty($params['store_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array(
'location_name' => $params['location_name'],
'location_sn' => $params['location_sn'],
'zone_id' => $params['zone_id'],
'store_id' => $params['store_id'],
'admin_name' => $params['admin_name'],
'admin_id' => $params['admin_id'],
'add_time' => time(),
'update_time' => time(),
);
$result = (new LocationModel())->insertLocationInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 102, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 更新仓库信息
*/
public function ApiUpdateLocationInfo($request) {
$params = $request->only(['location_id','location_name','location_sn','zone_id','store_id','admin_id','admin_name']);
if (empty($params['location_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array();
$arr['location_id'] = $params['location_id'];
$arr['admin_id'] = $params['admin_id'];
$arr['admin_name'] = $params['admin_name'];
$arr['update_time'] = time();
if (!empty($params['location_name']))
$arr['location_name'] = $params['location_name'];
if (!empty($params['location_sn']))
$arr['location_sn'] = $params['location_sn'];
if (!empty($params['zone_id']))
$arr['zone_id'] = $params['zone_id'];
if (!empty($params['store_id']))
$arr['store_id'] = $params['store_id'];
$result = (new LocationModel())->updateLocationInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 103, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 获取物料信息
*/
public function ApiGoodsInfo($request) {
$params = $request->only(['limit','page','goods_name']);
$arr = array(
'limit' => !empty($params['limit'])?$params['limit']:10,
'page' => !empty($params['page'])?$params['page']:1,
'goods_name' => !empty($params['goods_name'])?$params['goods_name']:'',
);
$data = (new GoodsModel())->GoodsInfo($arr);
return $this->apiReturn($Errcode = 0, $level = 1 , $dataArr=$data);
}
/**
* 写入物料信息
*/
public function ApiInsertGoodsInfo($request) {
$arr = array(
'brand_name' => 'MOUSER'
);
$data = (new GoodsModel())->InsertGoodsInfo($arr);
}
/**
* 获取客户信息
*/
public function ApiCustomerInfo($request) {
$params = $request->only(['limit','page','customer_name']);
$arr = array(
'limit' => !empty($params['limit'])?$params['limit']:10,
'page' => !empty($params['page'])?$params['page']:1,
'customer_name' => !empty($params['customer_name'])?$params['customer_name']:'',
);
$data = (new CustomerModel())->CustomerInfo($arr);
return $this->apiReturn($Errcode = 0, $level = 1 , $dataArr=$data);
}
/**
* 插入客户信息
*/
public function ApiInsertCustomerInfo($request) {
$params = $request->only(['erp_client_sn','customer_name','erp_customer_id','admin_id','admin_name']);
if (empty($params['erp_client_sn']) || empty($params['customer_name']) || empty($params['erp_customer_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array(
'erp_client_sn' => $params['erp_client_sn'],
'customer_name' => $params['customer_name'],
'erp_customer_id' => $params['erp_customer_id'],
'admin_name' => $params['admin_name'],
'admin_id' => $params['admin_id'],
'add_time' => time(),
'update_time' => time(),
);
$result = (new CustomerModel())->insertCustomerInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 102, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 更新客户信息
*/
public function ApiUpdateCustomerInfo($request) {
$params = $request->only(['customer_id','erp_client_sn','customer_name','erp_customer_id','admin_id','admin_name']);
if (empty($params['customer_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array();
$arr['customer_id'] = $params['customer_id'];
$arr['admin_id'] = $params['admin_id'];
$arr['admin_name'] = $params['admin_name'];
$arr['update_time'] = time();
if (!empty($params['erp_client_sn']))
$arr['erp_client_sn'] = $params['erp_client_sn'];
if (!empty($params['customer_name']))
$arr['customer_name'] = $params['customer_name'];
if (!empty($params['erp_customer_id']))
$arr['erp_customer_id'] = $params['erp_customer_id'];
$result = (new CustomerModel())->updateCustomerInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 103, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 获取供应商信息
*/
public function ApiSupplierInfo($request) {
$params = $request->only(['limit','page','supplier_name']);
$arr = array(
'limit' => !empty($params['limit'])?$params['limit']:10,
'page' => !empty($params['page'])?$params['page']:1,
'supplier_name' => !empty($params['supplier_name'])?$params['supplier_name']:'',
);
$data = (new SupplierModel())->SupplierInfo($arr);
return $this->apiReturn($Errcode = 0, $level = 1 , $dataArr=$data);
}
/**
* 插入供应商信息
*/
public function ApiInsertSupplierInfo($request) {
$params = $request->only(['erp_supplier_sn','supplier_name','erp_supplier_id','admin_id','admin_name']);
if (empty($params['erp_supplier_sn']) || empty($params['supplier_name']) || empty($params['erp_supplier_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array(
'erp_supplier_sn' => $params['erp_supplier_sn'],
'supplier_name' => $params['supplier_name'],
'erp_supplier_id' => $params['erp_supplier_id'],
'admin_name' => $params['admin_name'],
'admin_id' => $params['admin_id'],
'add_time' => time(),
'update_time' => time(),
);
$result = (new SupplierModel())->insertSupplierInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 102, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
/**
* 更新供应商信息
*/
public function ApiUpdateSupplierInfo($request) {
$params = $request->only(['supplier_id','erp_supplier_sn','supplier_name','erp_supplier_id','admin_id','admin_name']);
if (empty($params['supplier_id']) || empty($params['admin_id']) || empty($params['admin_name']))
return $this->apiReturn($Errcode = 101, $level = 1 , $dataArr=[]);
$arr = array();
$arr['supplier_id'] = $params['supplier_id'];
$arr['admin_id'] = $params['admin_id'];
$arr['admin_name'] = $params['admin_name'];
$arr['update_time'] = time();
if (!empty($params['erp_supplier_sn']))
$arr['erp_supplier_sn'] = $params['erp_supplier_sn'];
if (!empty($params['supplier_name']))
$arr['supplier_name'] = $params['supplier_name'];
if (!empty($params['erp_supplier_id']))
$arr['erp_supplier_id'] = $params['erp_supplier_id'];
$result = (new SupplierModel())->updateSupplierInfo($arr);
if (!$result)
return $this->apiReturn($Errcode = 103, $level = 1 , $dataArr=[]);
else
return $this->apiReturn($Errcode = 100, $level = 1 , $dataArr=[]);
}
}
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
use Config;
use DB;
use RedisDB;
use Request;
class CustomerModel extends Model
{
protected $connection = 'mysql';
protected $table = 'customer';
public $timestamps = false;
/**
* 客户信息
*/
public function CustomerInfo($arr) {
$limit = $arr['limit'];
$page = $arr['page'];
$customer_name = $arr['customer_name'];
$map = [];
if (!empty($customer_name)) {
$map[] = ['customer_name', '=', $customer_name];
}
$data = $this->
select('erp_client_sn','customer_name','erp_customer_id')->
where($map)->
paginate($limit,['*'],'p',$page)->
toArray();
return $data;
}
/**
* 写入客户信息
*/
public function insertCustomerInfo($arr) {
return $this->insert($arr);
}
/**
* 更新客户信息
*/
public function updateCustomerInfo($arr) {
return $this->where('customer_id', '=', $arr)->update($arr);
}
}
\ No newline at end of file
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
use Config;
use DB;
use RedisDB;
use Request;
class GoodsModel extends Model
{
protected $connection = 'mysql';
protected $table = 'goods';
public $timestamps = false;
public function __construct($connection = false)
{
parent::__construct();
if($connection){
$this->connection= $connection;
}
}
/**
* 区域信息
*/
public function GoodsInfo($arr) {
$limit = $arr['limit'];
$page = $arr['page'];
$goods_name = $arr['goods_name'];
$map = [];
if (!empty($goods_name)) {
$map[] = ['goods_name', '=', $goods_name];
}
$data = $this->
select('goods_name','goods_cn_name','goods_sn','brand_name','erp_id')->
where($map)->
leftJoin('brand','brand.brand_id','goods.goods_id')->
paginate($limit,['*'],'p',$page)->
toArray();
return $data;
}
/**
* 写入DB物料
*/
public function InsertGoodsInfo($arr) {
$str = DB::connection($this->connection)->transaction(function() use($arr){
$brand_name = $arr['brand_name'];
$brand_exist = DB::connection('mysql')->table('brand')->where('brand_name','=',$brand_name)->first();
// $data = $this->where('rule_code', $ruleCode)->first();
var_dump($brand_exist);
});
}
}
\ No newline at end of file
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
use Config;
use DB;
use RedisDB;
use Request;
class LocationModel extends Model
{
protected $connection = 'mysql';
protected $table = 'location';
public $timestamps = false;
/**
* 区域信息
*/
public function locInfo($arr) {
$limit = $arr['limit'];
$page = $arr['page'];
$location_name = $arr['location_name'];
$zone_name = $arr['zone_name'];
$map = [];
if (!empty($zone_name)) {
$map[] = ['zone_name', '=', $zone_name];
}
if (!empty($location_name)) {
$map[] = ['location_name', '=', $location_name];
}
$data = $this->
select('location_id','location_name','zone_name')->
where($map)->
leftJoin('zone','zone.zone_id','location.zone_id')->
paginate($limit,['*'],'p',$page)->
toArray();
return $data;
}
/**
* 写入货位信息
*/
public function insertLocationInfo($arr) {
return $this->insert($arr);
}
/**
* 更新货位信息
*/
public function updateLocationInfo($arr) {
return $this->where('location_id', '=', $arr)->update($arr);
}
}
\ No newline at end of file
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
use Config;
use DB;
use RedisDB;
use Request;
class StoreModel extends Model
{
protected $connection = 'mysql';
protected $table = 'store';
public $timestamps = false;
/**
* 仓库基本信息
*/
public function storeInfo($arr) {
$limit = $arr['limit'];
$page = $arr['page'];
$store_sn = $arr['store_sn'];
$store_name = $arr['store_name'];
$erp_store_sn = $arr['erp_store_sn'];
$map = [];
if (!empty($store_sn)) {
$map[] = ['store_sn', '=', $store_sn];
}
if (!empty($store_name)) {
$map[] = ['store_name', '=', $store_name];
}
if (!empty($erp_store_sn)) {
$map[] = ['erp_store_sn', '=', $erp_store_sn];
}
$data = $this->
select('store_id','store_sn','store_name','erp_store_sn','erp_store_id')->
where($map)->
paginate($limit,['*'],'p',$page)->
toArray();
return $data;
}
/**
* 写入仓库信息
*/
public function insertStoreInfo($arr) {
return $this->insert($arr);
}
/**
* 更新仓库信息
*/
public function updateStoreInfo($arr) {
return $this->where('store_id', '=', $arr)->update($arr);
}
}
\ No newline at end of file
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
use Config;
use DB;
use RedisDB;
use Request;
class SupplierModel extends Model
{
protected $connection = 'mysql';
protected $table = 'supplier';
public $timestamps = false;
/**
* 区域信息
*/
public function SupplierInfo($arr) {
$limit = $arr['limit'];
$page = $arr['page'];
$supplier_name = $arr['supplier_name'];
$map = [];
if (!empty($supplier_name)) {
$map[] = ['supplier_name', '=', $supplier_name];
}
$data = $this->
select('erp_supplier_sn','supplier_name','erp_supplier_id')->
where($map)->
paginate($limit,['*'],'p',$page)->
toArray();
return $data;
}
/**
* 写入供应商信息
*/
public function insertSupplierInfo($arr) {
return $this->insert($arr);
}
/**
* 更新供应商信息
*/
public function updateSupplierInfo($arr) {
return $this->where('supplier_id', '=', $arr)->update($arr);
}
}
\ No newline at end of file
<?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
use Config;
use DB;
use RedisDB;
use Request;
class ZoneModel extends Model
{
protected $connection = 'mysql';
protected $table = 'zone';
public $timestamps = false;
/**
* 区域信息
*/
public function zoneInfo($arr) {
$limit = $arr['limit'];
$page = $arr['page'];
$zone_sn = $arr['zone_sn'];
$zone_name = $arr['zone_name'];
$store_name = $arr['store_name'];
$map = [];
if (!empty($zone_sn)) {
$map[] = ['zone_sn', '=', $zone_sn];
}
if (!empty($zone_name)) {
$map[] = ['zone_name', '=', $zone_name];
}
if (!empty($store_name)) {
$map[] = ['store_name', '=', $store_name];
}
$data = $this->
select('zone_id','zone_sn','zone_name','store_name')->
where($map)->
leftJoin('store','zone.store_id','store.store_id')->
paginate($limit,['*'],'p',$page)->
toArray();
return $data;
}
/**
* 写入仓库信息
*/
public function insertZoneInfo($arr) {
return $this->insert($arr);
}
/**
* 更新仓库信息
*/
public function updateZoneInfo($arr) {
return $this->where('zone_id', '=', $arr)->update($arr);
}
}
\ No newline at end of file
......@@ -20,7 +20,8 @@
"autoload": {
"psr-4": {
"App\\": "app/",
"Common\\": "common/"
"Common\\": "common/",
"ScmWmsCommon\\": "scm_wms_common/"
},
"files": [
"common/function.php",
......
......@@ -66,7 +66,7 @@ return [
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
'prefix' => env('DB_PREFIX', ''),
'prefix' => env('DB_PREFIX', 'lie_'),
'timezone' => env('DB_TIMEZONE', '+00:00'),
'strict' => env('DB_STRICT_MODE', false),
'options' => [
......
......@@ -4,6 +4,10 @@ return [
'cn'=>[
-1 => '系统错误',
0 => 'ok',
101100 => 'ok',
101101 => '参数缺失',
101102 => '插入失败',
101103 => '更新失败'
]
......
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
......
......@@ -11,12 +11,18 @@
|
*/
$router->get('/', function () use ($router) {
return swoole_get_local_ip();
return $router->app->version();
});
// $router->get('/', function () use ($router) {
// return swoole_get_local_ip();
// return $router->app->version();
// });
$router->get('/basic/api/{key}', 'ServicesController@Entrance');
$router->post('/basic/api/{key}', 'ServicesController@Entrance');
$router->post('/synchronization', 'ServicesController@synchronization');
scm_wms_common @ 64218b25
Subproject commit 25169685f684fd4292671d1893a79e80c5be9db2
Subproject commit 64218b258abb792578ff19cc0270d218625a734a
......@@ -279,7 +279,7 @@ class ClassLoader
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
}
/**
......@@ -377,7 +377,7 @@ class ClassLoader
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
......
......@@ -20,6 +20,7 @@ return array(
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'ScmWmsCommon\\' => array($baseDir . '/scm_wms_common'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
......
......@@ -42,6 +42,7 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f
'Symfony\\Component\\EventDispatcher\\' => 34,
'Symfony\\Component\\Debug\\' => 24,
'Symfony\\Component\\Console\\' => 26,
'ScmWmsCommon\\' => 13,
),
'P' =>
array (
......@@ -170,6 +171,10 @@ class ComposerStaticInit5c9707cde9ea4e3942300fe24293f04f
array (
0 => __DIR__ . '/..' . '/symfony/console',
),
'ScmWmsCommon\\' =>
array (
0 => __DIR__ . '/../..' . '/scm_wms_common',
),
'Psr\\SimpleCache\\' =>
array (
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment