Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_welfare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e5c586ed
authored
Aug 20, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改所有的服务请求为POST
parent
b7ed8dd7
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
43 additions
and
41 deletions
app/Http/Controllers/Api/ExchangeSettingsApiController.php
app/Http/Controllers/Api/IntegralsApiController.php
app/Http/Controllers/Api/UserExchangesApiController.php
app/Http/Controllers/Api/UserIntegralsApiController.php
app/Http/Controllers/ExchangeSettingsController.php
app/Http/Controllers/IntegralBillsController.php
app/Http/Controllers/IntegralsController.php
app/Http/Services/ExchangeSettingService.php
app/Http/Services/IntegralBillService.php
app/Http/Services/IntegralService.php
app/Http/Services/UserExchangeService.php
app/Http/Services/UserIntegralService.php
app/Http/Controllers/Api/ExchangeSettingsApiController.php
View file @
e5c586ed
...
...
@@ -16,7 +16,7 @@ class ExchangeSettingsApiController extends Controller
public
function
exchangeSettingListApi
(
Request
$request
,
ExchangeSettingService
$service
)
{
$data
=
$service
->
getExchangeSettingList
(
'/exchange_settings?'
.
urldecode
(
http_build_query
(
$request
->
all
())));
$data
=
$service
->
getExchangeSettingList
(
'/exchange_settings
/list
?'
.
urldecode
(
http_build_query
(
$request
->
all
())));
$data
=
$this
->
transformer
(
$data
);
return
$this
->
apiReturn
(
0
,
'ok'
,
[
...
...
@@ -40,21 +40,21 @@ class ExchangeSettingsApiController extends Controller
public
function
storeExchangeSettingApi
(
ExchangeSettingApiRequest
$request
,
ExchangeSettingService
$service
)
{
$result
=
$service
->
storeExchangeSetting
(
'/exchange_settings'
,
$request
->
all
());
$result
=
$service
->
storeExchangeSetting
(
'/exchange_settings
/add
'
,
$request
->
all
());
return
$result
;
}
public
function
updateExchangeSettingApi
(
ExchangeSettingApiRequest
$request
,
ExchangeSettingService
$service
)
{
$result
=
$service
->
updateExchangeSetting
(
'/exchange_settings/'
.
$request
->
id
,
$request
->
all
());
$result
=
$service
->
updateExchangeSetting
(
'/exchange_settings/
update?id=
'
.
$request
->
id
,
$request
->
all
());
return
$result
;
}
public
function
deleteExchangeSettingApi
(
Request
$request
,
ExchangeSettingService
$service
)
{
$result
=
$service
->
deleteExchangeSetting
(
'/exchange_settings/'
.
$request
->
id
);
$result
=
$service
->
deleteExchangeSetting
(
'/exchange_settings/
delete?id=
'
.
$request
->
id
);
return
$result
;
}
...
...
@@ -63,7 +63,7 @@ class ExchangeSettingsApiController extends Controller
{
$id
=
$request
->
id
;
$status
=
$request
->
status
;
$path
=
'/exchange_settings/'
.
$id
;
$path
=
'/exchange_settings/
update?id=
'
.
$id
;
$result
=
$this
->
service
->
changeExchangeSettingStatus
(
$path
,
[
'status'
=>
$status
]);
return
$result
;
...
...
app/Http/Controllers/Api/IntegralsApiController.php
View file @
e5c586ed
...
...
@@ -20,7 +20,7 @@ class IntegralsApiController extends Controller
public
function
integralListApi
(
Request
$request
,
IntegralService
$service
)
{
$data
=
$service
->
getIntegralList
(
'/integrals?'
.
urldecode
(
http_build_query
(
$request
->
all
())));
$data
=
$service
->
getIntegralList
(
'/integrals
/list
?'
.
urldecode
(
http_build_query
(
$request
->
all
())));
$data
=
$this
->
transformer
(
$data
);
return
$this
->
apiReturn
(
0
,
'ok'
,
[
...
...
@@ -45,21 +45,21 @@ class IntegralsApiController extends Controller
public
function
storeIntegralApi
(
IntegralApiRequest
$request
,
IntegralService
$service
)
{
$result
=
$service
->
storeIntegral
(
'/integrals'
,
$request
->
all
());
$result
=
$service
->
storeIntegral
(
'/integrals
/add
'
,
$request
->
all
());
return
$result
;
}
public
function
updateIntegralApi
(
IntegralApiRequest
$request
,
IntegralService
$service
)
{
$result
=
$service
->
updateIntegral
(
'/integrals/'
.
$request
->
id
,
$request
->
all
());
$result
=
$service
->
updateIntegral
(
'/integrals/
update?id=
'
.
$request
->
id
,
$request
->
all
());
return
$result
;
}
public
function
deleteIntegralApi
(
Request
$request
,
IntegralService
$service
)
{
$result
=
$service
->
deleteIntegral
(
'/integrals/'
.
$request
->
id
);
$result
=
$service
->
deleteIntegral
(
'/integrals/
delete?id=
'
.
$request
->
id
);
return
$result
;
}
...
...
@@ -68,7 +68,7 @@ class IntegralsApiController extends Controller
{
$id
=
$request
->
id
;
$status
=
$request
->
status
;
$path
=
'integrals/'
.
$id
;
$path
=
'integrals/
update?id=
'
.
$id
;
$result
=
$this
->
service
->
changeIntegralStatus
(
$path
,
[
'status'
=>
$status
]);
return
$result
;
...
...
app/Http/Controllers/Api/UserExchangesApiController.php
View file @
e5c586ed
...
...
@@ -62,8 +62,7 @@ class UserExchangesApiController extends Controller
{
$id
=
$request
->
id
;
$status
=
$request
->
status
;
$path
=
'user_exchanges/'
.
$id
;
$result
=
$this
->
service
->
changeUserExchangeStatus
(
$path
,
[
'status'
=>
$status
]);
$result
=
$this
->
service
->
changeUserExchangeStatus
(
$id
,
[
'status'
=>
$status
]);
return
$result
;
}
...
...
app/Http/Controllers/Api/UserIntegralsApiController.php
View file @
e5c586ed
...
...
@@ -48,7 +48,7 @@ class UserIntegralsApiController extends Controller
{
$id
=
$request
->
id
;
$status
=
$request
->
status
;
$path
=
'user_integrals/'
.
$id
;
$path
=
'user_integrals/
update?id=
'
.
$id
;
$result
=
$this
->
service
->
changeUserIntegralStatus
(
$path
,
[
'status'
=>
$status
]);
return
$result
;
...
...
app/Http/Controllers/ExchangeSettingsController.php
View file @
e5c586ed
...
...
@@ -56,7 +56,7 @@ class ExchangeSettingsController extends Controller
public
function
updateExchangeSetting
(
Request
$request
)
{
$this
->
data
[
'title'
]
=
'修改红包配置'
;
$exchangeSetting
=
$this
->
service
->
getExchangeSetting
(
'/exchange_settings/'
.
$request
->
id
);
$exchangeSetting
=
$this
->
service
->
getExchangeSetting
(
'/exchange_settings/
info?id=
'
.
$request
->
id
);
$this
->
data
[
'exchangeSetting'
]
=
$exchangeSetting
[
'data'
];
return
$this
->
view
();
...
...
app/Http/Controllers/IntegralBillsController.php
View file @
e5c586ed
...
...
@@ -45,7 +45,7 @@ class IntegralBillsController extends Controller
$integralService
=
new
IntegralService
();
//获取红包列表做tab项
$integrals
=
array_get
(
$integralService
->
getIntegralList
(
'/integrals'
),
'data'
);
$integrals
=
array_get
(
$integralService
->
getIntegralList
(
'/integrals
/list
'
),
'data'
);
$this
->
data
[
'integrals'
]
=
$integrals
;
...
...
app/Http/Controllers/IntegralsController.php
View file @
e5c586ed
...
...
@@ -9,9 +9,10 @@ use Illuminate\Http\Request;
class
IntegralsController
extends
Controller
{
private
$service
;
private
$service
;
public
function
__construct
(
IntegralService
$service
)
{
public
function
__construct
(
IntegralService
$service
)
{
$this
->
service
=
$service
;
}
...
...
@@ -57,7 +58,7 @@ class IntegralsController extends Controller
public
function
updateIntegral
(
Request
$request
)
{
$this
->
data
[
'title'
]
=
'修改红包'
;
$integral
=
$this
->
service
->
getIntegral
(
'/integrals/'
.
$request
->
id
);
$integral
=
$this
->
service
->
getIntegral
(
'/integrals/
info?id=
'
.
$request
->
id
);
$this
->
data
[
'integral'
]
=
$integral
[
'data'
];
return
$this
->
view
();
...
...
app/Http/Services/ExchangeSettingService.php
View file @
e5c586ed
...
...
@@ -6,17 +6,17 @@ class ExchangeSettingService extends BaseService
{
public
function
getExchangeSetting
(
$path
)
{
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
getExchangeSettingList
(
$path
)
{
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
deleteExchangeSetting
(
$path
)
{
return
$this
->
api
Delete
(
$path
);
return
$this
->
api
Post
(
$path
);
}
public
function
storeExchangeSetting
(
$path
,
$data
)
...
...
@@ -26,12 +26,12 @@ class ExchangeSettingService extends BaseService
public
function
updateExchangeSetting
(
$path
,
$data
)
{
return
$this
->
apiP
atch
(
$path
,
$data
);
return
$this
->
apiP
ost
(
$path
,
$data
);
}
public
function
changeExchangeSettingStatus
(
$path
,
$data
=
[])
{
return
$this
->
apiP
atch
(
$path
,
$data
);
return
$this
->
apiP
ost
(
$path
,
$data
);
}
public
function
batchUpdateStatus
(
$path
,
$data
=
[])
...
...
app/Http/Services/IntegralBillService.php
View file @
e5c586ed
...
...
@@ -8,8 +8,8 @@ class IntegralBillService extends BaseService
{
public
function
getIntegralBillList
(
$params
)
{
$path
=
'/integral_bills?'
.
http_build_query
(
$params
);
$path
=
'/integral_bills
/list
?'
.
http_build_query
(
$params
);
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
}
\ No newline at end of file
app/Http/Services/IntegralService.php
View file @
e5c586ed
...
...
@@ -8,17 +8,17 @@ class IntegralService extends BaseService
{
public
function
getIntegral
(
$path
)
{
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
getIntegralList
(
$path
)
{
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
deleteIntegral
(
$path
)
{
return
$this
->
api
Delete
(
$path
);
return
$this
->
api
Post
(
$path
);
}
public
function
storeIntegral
(
$path
,
$data
)
...
...
@@ -28,12 +28,12 @@ class IntegralService extends BaseService
public
function
updateIntegral
(
$path
,
$data
)
{
return
$this
->
apiP
atch
(
$path
,
$data
);
return
$this
->
apiP
ost
(
$path
,
$data
);
}
public
function
changeIntegralStatus
(
$path
,
$data
=
[])
{
return
$this
->
apiP
atch
(
$path
,
$data
);
return
$this
->
apiP
ost
(
$path
,
$data
);
}
public
function
batchUpdateStatus
(
$path
,
$data
=
[])
...
...
app/Http/Services/UserExchangeService.php
View file @
e5c586ed
...
...
@@ -10,20 +10,21 @@ class UserExchangeService extends BaseService
{
public
function
getUserExchange
(
$userId
)
{
$path
=
'/user_exchanges/'
.
$userId
;
$path
=
'/user_exchanges/
info?id=
'
.
$userId
;
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
getUserExchangeList
(
$params
)
{
$path
=
'/user_exchanges?'
.
http_build_query
(
$params
);
return
$this
->
api
Ge
t
(
$path
);
$path
=
'/user_exchanges
/list
?'
.
http_build_query
(
$params
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
changeUserExchangeStatus
(
$
path
,
$data
=
[])
public
function
changeUserExchangeStatus
(
$
id
,
$data
=
[])
{
return
$this
->
apiPatch
(
$path
,
$data
);
$path
=
'user_exchanges/update?id='
.
$id
;
return
$this
->
apiPost
(
$path
,
$data
);
}
public
function
batchUpdateStatus
(
$path
,
$data
=
[])
...
...
app/Http/Services/UserIntegralService.php
View file @
e5c586ed
...
...
@@ -10,16 +10,16 @@ class UserIntegralService extends BaseService
{
public
function
getUserIntegral
(
$userId
)
{
$path
=
'/user_integrals/'
.
$userId
;
$path
=
'/user_integrals/
info?id=
'
.
$userId
;
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
getUserIntegralList
(
$params
)
{
$path
=
'/user_integrals?'
.
http_build_query
(
$params
);
$path
=
'/user_integrals
/list
?'
.
http_build_query
(
$params
);
return
$this
->
api
Ge
t
(
$path
);
return
$this
->
api
Pos
t
(
$path
);
}
public
function
getUsersFromRedis
(
$userIds
=
[])
...
...
@@ -43,7 +43,7 @@ class UserIntegralService extends BaseService
public
function
changeUserIntegralStatus
(
$path
,
$data
=
[])
{
return
$this
->
apiP
atch
(
$path
,
$data
);
return
$this
->
apiP
ost
(
$path
,
$data
);
}
public
function
batchUpdateStatus
(
$path
,
$data
=
[])
...
...
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