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
16cf8a6f
Commit
16cf8a6f
authored
Jul 19, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f6ff2369
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
1 deletion
+117
-1
CostDetail.php
application/index/controller/CostDetail.php
+67
-0
StoreFee.php
application/index/controller/StoreFee.php
+1
-1
FStoreCostExt.php
application/model/FStoreCostExt.php
+49
-0
No files found.
application/index/controller/CostDetail.php
0 → 100644
View file @
16cf8a6f
<?php
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\api\service\ActivityService
;
use
app\model\CActivity
;
use
think\Request
;
/**
* 成本明细
* Created by PhpStorm.
* User: zw
* Date: 2019-07-19
* Time: 13:22:17
*/
class
CostDetail
extends
Basic
{
private
$activityService
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
activityService
=
new
ActivityService
();
}
/**
* 获取活动列表
* doc url :http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=818
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getActivityList
()
{
$params
=
$this
->
params
;
/* $params = array(
"id" => 1,
"title" => "asd",
"pageNo" => 1,
"pageSize" => 15,
);*/
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$activityModel
=
new
CActivity
();
$field
=
'id,title,return_type,money,return_action,activity_start_time,activity_end_time,use_period,total,
available,get_number,activity_rule,status,create_time'
;
$where_
=
[];
if
(
!
empty
(
$params
[
"title"
]))
{
$where_
[
"title"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'title'
])
.
"%"
);
}
if
(
!
empty
(
$params
[
"id"
]))
{
$where_
[
"id"
]
=
$params
[
'id'
];
}
$where_
[
"status"
]
=
array
(
"neq"
,
4
);
$list
=
$activityModel
->
getActivityList
(
$field
,
$where_
,
$pageNo
,
$pageSize
);
$count
=
$activityModel
->
getActivityCount
(
$field
,
$where_
);
$result
[
"list"
]
=
$list
;
$result
[
"total"
]
=
$count
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
}
\ No newline at end of file
application/index/controller/StoreFee.php
View file @
16cf8a6f
...
@@ -249,7 +249,7 @@ class StoreFee extends Basic
...
@@ -249,7 +249,7 @@ class StoreFee extends Basic
// $params = array(
// $params = array(
// "id" => '1',//id
// "id" => '1',//id
// );
[ 'office_id', 'store_id' ]
// );
$checkResult
=
$this
->
validate
(
$params
,
"StoreFeeValidate.bindStore"
);
$checkResult
=
$this
->
validate
(
$params
,
"StoreFeeValidate.bindStore"
);
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
return
$this
->
response
(
"101"
,
$checkResult
);
...
...
application/model/FStoreCostExt.php
0 → 100644
View file @
16cf8a6f
<?php
namespace
app\model
;
use
think\Db
;
use
think\Model
;
class
FStoreCostExt
extends
BaseModel
{
protected
$table
=
'f_store_cost_ext'
;
private
$db_
;
public
function
__construct
(
$data
=
[])
{
parent
::
__construct
(
$data
);
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* 查询数据
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getStoreCostExt
(
$field
,
$params
,
$pageNo
,
$pageSize
)
{
$result
=
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
return
$result
;
}
public
function
getStoreCostExtTotal
(
$field
,
$params
)
{
$result
=
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
count
();
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