Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
192a4792
Commit
192a4792
authored
Jul 17, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1e0bea43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
78 deletions
+52
-78
StoreFee.php
application/index/controller/StoreFee.php
+33
-60
FOffice.php
application/model/FOffice.php
+19
-18
No files found.
application/index/controller/StoreFee.php
View file @
192a4792
...
@@ -32,12 +32,12 @@ class StoreFee extends Basic
...
@@ -32,12 +32,12 @@ class StoreFee extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
//
$params = array(
"site_id"
=>
'10001'
,
//站点id
//
"site_id" => '10001',//站点id
"office_name"
=>
'鳖'
,
//办公室名
//
"office_name" => '鳖',//办公室名
"office_address"
=>
'上海市黄浦区龙华东路800号'
,
//办公室地址
//
"office_address" =>'上海市黄浦区龙华东路800号',//办公室地址
"rent"
=>
5000
,
//租金每月
//
"rent" => 5000,//租金每月
);
//
);
$checkResult
=
$this
->
validate
(
$params
,
"StoreFeeValidate.addOffice"
);
$checkResult
=
$this
->
validate
(
$params
,
"StoreFeeValidate.addOffice"
);
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
...
@@ -61,59 +61,31 @@ class StoreFee extends Basic
...
@@ -61,59 +61,31 @@ class StoreFee extends Basic
}
}
// /**
/**
// * 获取站点列表
* 办公室列表
// * User: 朱伟
* @return \think\Response
// * Date:2018-10-18
*/
// * Time:10:50:55
public
function
getSiteList
()
// */
{
// public function getSiteList()
$params
=
$this
->
params
;
// {
// $params = $this->params;
/*$params = array(
//
"id" => 5740
// /*$params = array(
);*/
// "id" => 5740
// );*/
$field
=
'id,name,city,is_del'
;
//
// $field = 'id,name,city,is_del';
if
(
$params
[
'is_del'
])
{
//
$params
[
'is_del'
]
=
0
;
// if ($params['is_del']) {
}
// $params['is_del'] = 0;
// }
$res
=
$this
->
f_office
->
getOffice
(
$field
,
$params
);
//
$data
[
'list'
]
=
$res
;
// $res = $this->aSite->getSite($field, $params);
// $data['list'] = $res;
return
$this
->
response
(
"200"
,
"成功"
,
$data
);
//
}
// return $this->response("200", "成功", $data);
// }
//
//
//
// /**
// * 关闭或开启站点
// * @return \think\Response
// */
// public function delImageDepot(){
// $params = $this->params;
// $checkResult = $this->validate($params, "Site.delImageDepot");
// if (true !== $checkResult) {
// return $this->response("101", $checkResult);
// }
// $params_['id'] = $params['id'];
// $params_['is_del'] = $params['is_del'];
// $res = $this->aSite->updateSite($params_);//int(1)
// if($res == 1){
// return $this->response("200", "成功",['data'=>$res]);
// }else{
// return $this->response("300", "失败");
// }
// }
//
// public function siteLogList()
// {
// if (!$this->request->isAjax()) {
// return view('site/siteLogList');
// }
// }
}
}
\ No newline at end of file
application/model/FOffice.php
View file @
192a4792
...
@@ -32,7 +32,9 @@ class FOffice extends BaseModel
...
@@ -32,7 +32,9 @@ class FOffice extends BaseModel
/**
/**
* 查询单条数据
* 查询单条数据
* 朱伟 2018-10-18 10:41:10
* @param $field
* @param $params
* @return array|false|\PDOStatement|string|Model
*/
*/
public
function
findByOne
(
$field
,
$params
)
{
public
function
findByOne
(
$field
,
$params
)
{
$result
=
$this
->
db_
$result
=
$this
->
db_
...
@@ -44,23 +46,22 @@ class FOffice extends BaseModel
...
@@ -44,23 +46,22 @@ class FOffice extends BaseModel
}
}
/**
//
* 查询数据
//
* @param $field
// /**
* @param $params
// * 查询数据
* @return false|\PDOStatement|string|\think\Collection
// * 朱伟 2018-10-18 10:41:10
*/
// */
public
function
getOffice
(
$field
,
$params
)
// public function getOffice($field,$params)
{
// {
$result
=
$this
->
db_
// $result = $this->db_
->
field
(
$field
)
// ->field($field)
//->alias('a')
// //->alias('a')
->
where
(
$params
)
// ->where($params)
->
select
();
// ->select();
//dump($this->db_->getLastSql());
// //dump($this->db_->getLastSql());
return
$result
;
// return $result;
}
// }
//
//
// /**
// /**
// * 更新数据
// * 更新数据
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment