Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
b0b39561
Commit
b0b39561
authored
Nov 10, 2020
by
maggie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改service编译方式
parent
59323d0c
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
91 additions
and
105 deletions
+91
-105
config.json
v2.0/compileServer/config.json
+3
-3
generate.js
v2.0/compileServer/generate.js
+5
-2
controller.export.njk
v2.0/compileServer/templates/controller.export.njk
+4
-2
controller.njk
v2.0/compileServer/templates/controller.njk
+3
-3
macro.njk
v2.0/compileServer/templates/macro.njk
+6
-4
service.export.njk
v2.0/compileServer/templates/service.export.njk
+5
-5
stat.controller.ts
v2.0/src/controller/common/stat.controller.ts
+7
-7
task.controller.ts
v2.0/src/controller/common/task.controller.ts
+11
-11
user.controller.ts
v2.0/src/controller/common/user.controller.ts
+6
-6
test1.controller.ts
v2.0/src/controller/custom/test1.controller.ts
+8
-6
test2.controller.ts
v2.0/src/controller/custom/test2.controller.ts
+6
-6
index.ts
v2.0/src/index.ts
+22
-45
index.ts
v2.0/src/service/custom/index.ts
+5
-5
No files found.
v2.0/compileServer/config.json
View file @
b0b39561
...
...
@@ -268,7 +268,7 @@
"service"
:
"task"
,
"function"
:
"getItemListWithCollectStatus"
,
"params"
:
[
{
"type"
:
"var"
,
"value"
:
"commonBaseGet
itemlistbyi
dsResult1"
},
{
"type"
:
"var"
,
"value"
:
"commonBaseGet
ItemListByI
dsResult1"
},
{
"type"
:
"var"
,
"value"
:
"userInfo"
}
],
"return"
:
true
...
...
@@ -333,7 +333,7 @@
"params"
:
[
{
"type"
:
"var"
,
"value"
:
"context.data.startDay"
},
{
"type"
:
"var"
,
"value"
:
"context.data.endDay"
},
{
"type"
:
"var"
,
"value"
:
"commonStatGet
s
tatsResult1"
}
{
"type"
:
"var"
,
"value"
:
"commonStatGet
S
tatsResult1"
}
],
"return"
:
true
}
...
...
@@ -415,7 +415,7 @@
"params"
:
[
{
"type"
:
"var"
,
"value"
:
"context.data.startDay"
},
{
"type"
:
"var"
,
"value"
:
"context.data.endDay"
},
{
"type"
:
"var"
,
"value"
:
"commonStatGet
s
tatsResult1"
}
{
"type"
:
"var"
,
"value"
:
"commonStatGet
S
tatsResult1"
}
],
"return"
:
true
}
...
...
v2.0/compileServer/generate.js
View file @
b0b39561
...
...
@@ -6,11 +6,14 @@ const serverTemplatePath = 'templates'
const
controllerImport
=
(
controller
=
{})
=>
{
const
result
=
{
service
:
{}
service
s
:
{}
}
for
(
let
fn
in
controller
)
{
for
(
let
main
of
controller
[
fn
].
main
)
{
result
.
service
[
main
.
service
]
=
true
if
(
!
result
.
services
[
main
.
type
])
{
result
.
services
[
main
.
type
]
=
{}
}
result
.
services
[
main
.
type
][
main
.
service
]
=
true
}
}
console
.
log
(
result
)
...
...
v2.0/compileServer/templates/controller.export.njk
View file @
b0b39561
...
...
@@ -9,9 +9,11 @@ export default {
{%- for type, type_item in controllers -%}
{%- for controller, controller_item in type_item -%}
{%- for function, fucntion_item in controller_item %}
{{type}}{{controller | capitalize}}{{function | capitalize}}: {{type | capitalize}}{{controller | capitalize}}ControllerInstance.{{function}}
{{type}}{{controller | capitalize}}{{function | capitalize}}: {{type | capitalize}}{{controller | capitalize}}ControllerInstance.{{function}}
{%-if loop.last-%}{%else%},{%-endif-%}
{%- endfor -%}
{%-if loop.last-%}{%else%},{%-endif-%}
{%- endfor -%}
{%-if loop.last-%}{%else%},{%-endif-%}
{%- endfor %}
}
\ No newline at end of file
}
v2.0/compileServer/templates/controller.njk
View file @
b0b39561
...
...
@@ -6,10 +6,10 @@ import commonUtilCheck from '../../utils/common/check'
import commonUtilUpdate from '../../utils/common/update'
import customDecorator from '../../decorator/custom'
import customUtil from '../../utils/custom'
import commonService from '../../service/common'
import customService from '../../service/custom'
{#
import commonService from '../../service/common'
import customService from '../../service/custom'
#}
import { resultsModel } from '../../sdk'
{
# {{-macro.genControllerService(service)-}} #
}
{
{-macro.genControllerService(services)-}
}
export default class {{name | capitalize}}Controller {
{%- for fn, item in model %}
...
...
v2.0/compileServer/templates/macro.njk
View file @
b0b39561
{# 生成控制器引用的服务 #}
{% macro genControllerService(service)%}
import { {% for key, item in service %}{{key | capitalize}}Service{%- if loop.last %}{% else %}, {% endif %}{%- endfor %} } from '../../service'
{% macro genControllerService(services)%}
{% for type, type_item in services %}
import { {%for service, service_item in type_item %}{{type|capitalize}}{{service|capitalize}}Service{%- if loop.last %}{% else %}, {% endif %}{% endfor %} } from '../../service/{{type}}'
{% endfor%}
{% endmacro %}
{# 生成装饰器 #}
...
...
@@ -20,7 +22,7 @@ import { {% for key, item in service %}{{key | capitalize}}Service{%- if loop.la
{% macro genServicesDecorator(mains) %}
{%- for type, type_item in mains | groupByTypeAndService -%}
{%- for service, service_item in type_item -%}
{{type
}}Service.
{{service|capitalize}}Service{%- if loop.last %}{% else %}, {% endif %}
{{type
|capitalize}}
{{service|capitalize}}Service{%- if loop.last %}{% else %}, {% endif %}
{%- endfor -%}
{%- if loop.last %}{% else %}, {% endif %}
{%- endfor -%}
...
...
@@ -38,7 +40,7 @@ import { {% for key, item in service %}{{key | capitalize}}Service{%- if loop.la
]: [
{%- for type, type_item in mains | groupByTypeAndService -%}
{%- for service, service_item in type_item -%}
{{type
}}Service.
{{service|capitalize}}Service{%- if loop.last %}{% else %}, {% endif %}
{{type
|capitalize}}
{{service|capitalize}}Service{%- if loop.last %}{% else %}, {% endif %}
{%- endfor -%}
{%- if loop.last %}{% else %}, {% endif %}
{%- endfor -%}
...
...
v2.0/compileServer/templates/service.export.njk
View file @
b0b39561
/** @format */
{%- for service, service_item in services %}
import {{ service | capitalize }}Service from './{{ service }}.service'
import
Custom
{{ service | capitalize }}Service from './{{ service }}.service'
{%- endfor %}
const c
ommon
= {
const c
ustom
= {
{%- for service, service_item in services %}
{{ service | capitalize }}Service{% if loop.last %}{%else%},{% endif %}
Custom
{{ service | capitalize }}Service{% if loop.last %}{%else%},{% endif %}
{%- endfor %}
}
export default c
ommon
export default c
ustom
export {
{%- for service, service_item in services %}
{{ service | capitalize }}Service{% if loop.last %}{%else%},{% endif %}
Custom
{{ service | capitalize }}Service{% if loop.last %}{%else%},{% endif %}
{%- endfor %}
}
v2.0/src/controller/common/stat.controller.ts
View file @
b0b39561
...
...
@@ -4,21 +4,21 @@ import commonUtilCheck from '../../utils/common/check'
import
commonUtilUpdate
from
'../../utils/common/update'
import
customDecorator
from
'../../decorator/custom'
import
customUtil
from
'../../utils/custom'
import
commonService
from
'../../service/common'
import
customService
from
'../../service/custom'
import
{
resultsModel
}
from
'../../sdk'
import
{
CommonStatService
}
from
'../../service/common'
export
default
class
StatController
{
/**
* 增加埋点记录
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'type'
])
@
services
([
commonService
.
StatService
])
@
services
([
Common
StatService
])
async
addStat
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonStatService
]:
[
commonService
.
StatService
]
[
commonStatService
]:
[
Common
StatService
]
)
{
const
commonStatAddStatResult1
=
await
commonStatService
.
addStat
(
context
.
data
.
type
,
userInfo
)
return
resultsModel
.
success
({
...
...
@@ -29,14 +29,14 @@ export default class StatController {
* 统计数据
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'startDay'
,
'endDay'
])
@
services
([
commonService
.
StatService
])
@
services
([
Common
StatService
])
async
getStats
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonStatService
]:
[
commonService
.
StatService
]
[
commonStatService
]:
[
Common
StatService
]
)
{
const
commonStatGetStatsResult1
=
await
commonStatService
.
getStats
(
context
.
data
.
activityId
,
context
.
data
.
startDay
,
context
.
data
.
endDay
)
const
commonStatBuildExcelResult2
=
await
commonStatService
.
buildExcel
(
context
.
data
.
startDay
,
context
.
data
.
endDay
,
commonStatGet
s
tatsResult1
)
const
commonStatBuildExcelResult2
=
await
commonStatService
.
buildExcel
(
context
.
data
.
startDay
,
context
.
data
.
endDay
,
commonStatGet
S
tatsResult1
)
return
resultsModel
.
success
({
...
commonStatBuildExcelResult2
})
...
...
v2.0/src/controller/common/task.controller.ts
View file @
b0b39561
...
...
@@ -4,10 +4,10 @@ import commonUtilCheck from '../../utils/common/check'
import
commonUtilUpdate
from
'../../utils/common/update'
import
customDecorator
from
'../../decorator/custom'
import
customUtil
from
'../../utils/custom'
import
commonService
from
'../../service/common'
import
customService
from
'../../service/custom'
import
{
resultsModel
}
from
'../../sdk'
import
{
CommonTaskService
,
CommonBaseService
}
from
'../../service/common'
export
default
class
TaskController
{
/**
...
...
@@ -17,11 +17,11 @@ export default class TaskController {
@
commonDecorator
.
registeInfos
([
'vipInfo'
])
@
commonDecorator
.
preCheck
([
commonUtilCheck
.
checkActivityTime
])
@
commonDecorator
.
preUpdate
([
commonUtilUpdate
.
updateVip
,
commonUtilUpdate
.
updateSignTask
,
commonUtilUpdate
.
updateOrderGoods
])
@
services
([
commonService
.
TaskService
])
@
services
([
Common
TaskService
])
async
getTaskList
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
,
vipInfo
}:
IControllerInfos
,
[
commonTaskService
]:
[
commonService
.
TaskService
]
[
commonTaskService
]:
[
Common
TaskService
]
)
{
const
commonTaskInitTaskResult1
=
await
commonTaskService
.
initTask
(
activityInfo
,
userInfo
)
return
resultsModel
.
success
({
...
...
@@ -34,11 +34,11 @@ export default class TaskController {
@
commonDecorator
.
checkParams
([
'activityId'
,
'taskType'
])
@
commonDecorator
.
registeInfos
([
'session'
])
@
commonDecorator
.
preCheck
([
commonUtilCheck
.
checkActivityTime
,
commonUtilCheck
.
checkTaskLimit
,
commonUtilCheck
.
checkExchangeCreditsTask
])
@
services
([
commonService
.
TaskService
])
@
services
([
Common
TaskService
])
async
doCompleteTask
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
,
session
}:
IControllerInfos
,
[
commonTaskService
]:
[
commonService
.
TaskService
]
[
commonTaskService
]:
[
Common
TaskService
]
)
{
const
commonTaskCompleteTaskResult1
=
await
commonTaskService
.
completeTask
(
context
.
data
.
taskType
,
activityInfo
,
userInfo
)
return
resultsModel
.
success
({
...
...
@@ -50,11 +50,11 @@ export default class TaskController {
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'taskType'
,
'rewardsKey'
])
@
commonDecorator
.
preCheck
([
commonUtilCheck
.
checkActivityTime
,
commonUtilCheck
.
checkRemainTimes
])
@
services
([
commonService
.
TaskService
])
@
services
([
Common
TaskService
])
async
receiveTaskRewards
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonTaskService
]:
[
commonService
.
TaskService
]
[
commonTaskService
]:
[
Common
TaskService
]
)
{
const
commonTaskReceiveTaskRewardsResult1
=
await
commonTaskService
.
receiveTaskRewards
(
context
.
data
.
taskType
,
context
.
data
.
rewardsKey
,
userInfo
)
return
resultsModel
.
success
({
...
...
@@ -66,14 +66,14 @@ export default class TaskController {
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'itemIds'
])
@
commonDecorator
.
registeInfos
([
'session'
])
@
services
([
commonService
.
BaseService
,
commonService
.
TaskService
])
@
services
([
CommonBaseService
,
Common
TaskService
])
async
getCollectGoodsList
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
,
session
}:
IControllerInfos
,
[
commonBaseService
,
commonTaskService
]:
[
commonService
.
BaseService
,
commonService
.
TaskService
]
[
commonBaseService
,
commonTaskService
]:
[
CommonBaseService
,
Common
TaskService
]
)
{
const
commonBaseGetItemListByIdsResult1
=
await
commonBaseService
.
getItemListByIds
(
context
.
data
.
itemIds
,
session
)
const
commonTaskGetItemListWithCollectStatusResult2
=
await
commonTaskService
.
getItemListWithCollectStatus
(
commonBaseGet
itemlistbyi
dsResult1
,
userInfo
)
const
commonTaskGetItemListWithCollectStatusResult2
=
await
commonTaskService
.
getItemListWithCollectStatus
(
commonBaseGet
ItemListByI
dsResult1
,
userInfo
)
return
resultsModel
.
success
({
...
commonTaskGetItemListWithCollectStatusResult2
})
...
...
v2.0/src/controller/common/user.controller.ts
View file @
b0b39561
...
...
@@ -4,10 +4,10 @@ import commonUtilCheck from '../../utils/common/check'
import
commonUtilUpdate
from
'../../utils/common/update'
import
customDecorator
from
'../../decorator/custom'
import
customUtil
from
'../../utils/custom'
import
commonService
from
'../../service/common'
import
customService
from
'../../service/custom'
import
{
resultsModel
}
from
'../../sdk'
import
{
CommonUserService
}
from
'../../service/common'
export
default
class
UserController
{
/**
...
...
@@ -15,11 +15,11 @@ export default class UserController {
*/
@
commonDecorator
.
checkParams
([
'activityId'
])
@
commonDecorator
.
registeInfos
([
'session'
])
@
services
([
commonService
.
UserService
])
@
services
([
Common
UserService
])
async
getVipInfo
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
,
session
}:
IControllerInfos
,
[
commonUserService
]:
[
commonService
.
UserService
]
[
commonUserService
]:
[
Common
UserService
]
)
{
const
commonUserGetShopVipResult1
=
await
commonUserService
.
getShopVip
(
context
,
session
)
return
resultsModel
.
success
({
...
...
@@ -30,11 +30,11 @@ export default class UserController {
* 获取排行榜
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'key'
,
'timeKey'
,
'limit'
])
@
services
([
commonService
.
UserService
])
@
services
([
Common
UserService
])
async
getRankList
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonUserService
]:
[
commonService
.
UserService
]
[
commonUserService
]:
[
Common
UserService
]
)
{
const
commonUserGetMyRankInfoResult1
=
await
commonUserService
.
getMyRankInfo
(
context
.
data
.
key
,
context
.
data
.
timeKey
,
userInfo
)
const
commonUserGetRankResult2
=
await
commonUserService
.
getRank
(
context
.
data
.
key
,
context
.
data
.
timeKey
,
context
.
data
.
limit
)
...
...
v2.0/src/controller/custom/test1.controller.ts
View file @
b0b39561
...
...
@@ -4,10 +4,12 @@ import commonUtilCheck from '../../utils/common/check'
import
commonUtilUpdate
from
'../../utils/common/update'
import
customDecorator
from
'../../decorator/custom'
import
customUtil
from
'../../utils/custom'
import
commonService
from
'../../service/common'
import
customService
from
'../../service/custom'
import
{
resultsModel
}
from
'../../sdk'
import
{
CommonStatService
}
from
'../../service/common'
import
{
CustomTestService
}
from
'../../service/custom'
export
default
class
Test1Controller
{
/**
...
...
@@ -15,11 +17,11 @@ export default class Test1Controller {
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'type'
])
@
customDecorator
.
test1
([
'tt'
])
@
services
([
commonService
.
StatService
,
customService
.
TestService
])
@
services
([
CommonStatService
,
Custom
TestService
])
async
addStat
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonStatService
,
customTestService
]:
[
commonService
.
StatService
,
customService
.
TestService
]
[
commonStatService
,
customTestService
]:
[
CommonStatService
,
Custom
TestService
]
)
{
const
commonStatAddStatResult1
=
await
commonStatService
.
addStat
(
context
.
data
.
type
,
userInfo
)
const
customTestTest1Result2
=
await
customTestService
.
test1
()
...
...
@@ -32,11 +34,11 @@ export default class Test1Controller {
* 统计数据
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'startDay'
,
'endDay'
])
@
services
([
commonService
.
StatService
])
@
services
([
Common
StatService
])
async
getStats
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonStatService
]:
[
commonService
.
StatService
]
[
commonStatService
]:
[
Common
StatService
]
)
{
const
commonStatGetStatsResult1
=
await
commonStatService
.
getStats
(
context
.
data
.
activityId
,
context
.
data
.
startDay
,
context
.
data
.
endDay
)
const
commonStatBuildExcelResult2
=
await
commonStatService
.
buildExcel
(
context
.
data
.
startDay
,
context
.
data
.
endDay
,
commonStatGetStatsResult1
)
...
...
v2.0/src/controller/custom/test2.controller.ts
View file @
b0b39561
...
...
@@ -4,21 +4,21 @@ import commonUtilCheck from '../../utils/common/check'
import
commonUtilUpdate
from
'../../utils/common/update'
import
customDecorator
from
'../../decorator/custom'
import
customUtil
from
'../../utils/custom'
import
commonService
from
'../../service/common'
import
customService
from
'../../service/custom'
import
{
resultsModel
}
from
'../../sdk'
import
{
CommonStatService
}
from
'../../service/common'
export
default
class
Test2Controller
{
/**
* 增加埋点记录
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'type'
])
@
services
([
commonService
.
StatService
])
@
services
([
Common
StatService
])
async
addStat
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonStatService
]:
[
commonService
.
StatService
]
[
commonStatService
]:
[
Common
StatService
]
)
{
const
commonStatAddStatResult1
=
await
commonStatService
.
addStat
(
context
.
data
.
type
,
userInfo
)
return
resultsModel
.
success
({
...
...
@@ -29,11 +29,11 @@ export default class Test2Controller {
* 统计数据
*/
@
commonDecorator
.
checkParams
([
'activityId'
,
'startDay'
,
'endDay'
])
@
services
([
commonService
.
StatService
])
@
services
([
Common
StatService
])
async
getStats
(
context
:
IContext
<
IParams
>
,
{
activityInfo
,
userInfo
}:
IControllerInfos
,
[
commonStatService
]:
[
commonService
.
StatService
]
[
commonStatService
]:
[
Common
StatService
]
)
{
const
commonStatGetStatsResult1
=
await
commonStatService
.
getStats
(
context
.
data
.
activityId
,
context
.
data
.
startDay
,
context
.
data
.
endDay
)
const
commonStatBuildExcelResult2
=
await
commonStatService
.
buildExcel
(
context
.
data
.
startDay
,
context
.
data
.
endDay
,
commonStatGetstatsResult1
)
...
...
v2.0/src/index.ts
View file @
b0b39561
/** @format */
import
UserController
from
'./controller/user.controller'
import
TaskController
from
'./controller/task.controller'
import
BaseController
from
'./controller/base.controller'
import
AwardsController
from
'./controller/awards.controller'
import
ShareController
from
'./controller/share.controller'
import
StatController
from
'./controller/stat.controller'
import
LoginController
from
'./controller/login.controller'
import
GameController
from
'./controller/game.controller'
const
{
getVipInfo
,
getRankList
}
=
new
UserController
()
const
{
login
}
=
new
LoginController
()
const
{
getGameInfo
,
startGame
,
submitGame
}
=
new
GameController
()
const
{
getTaskList
,
receiveTaskRewards
,
doCompleteTask
,
getCollectGoodsList
// 获取收藏商品列表,包含收藏状态
}
=
new
TaskController
()
const
{
getActivityBaseInfoById
,
getItemListByItemIds
}
=
new
BaseController
()
const
{
getMyPrizeList
,
receiveObjectPrize
,
receiveEnamePrize
,
drawLotteryPrize
}
=
new
AwardsController
()
const
{
doHelp
}
=
new
ShareController
()
const
{
getStats
,
addStat
}
=
new
StatController
()
import
CommonUserController
from
'./controller/common/user.controller'
const
CommonUserControllerInstance
=
new
CommonUserController
()
import
CommonTaskController
from
'./controller/common/task.controller'
const
CommonTaskControllerInstance
=
new
CommonTaskController
()
import
CommonStatController
from
'./controller/common/stat.controller'
const
CommonStatControllerInstance
=
new
CommonStatController
()
import
CustomTest1Controller
from
'./controller/custom/test1.controller'
const
CustomTest1ControllerInstance
=
new
CustomTest1Controller
()
import
CustomTest2Controller
from
'./controller/custom/test2.controller'
const
CustomTest2ControllerInstance
=
new
CustomTest2Controller
()
export
default
{
login
,
getVipInfo
,
getTaskList
,
doCompleteTask
,
receiveTaskRewards
,
getActivityBaseInfoById
,
getMyPrizeList
,
receiveObjectPrize
,
receiveEnamePrize
,
doHelp
,
getStats
,
addStat
,
getRankList
,
// 游戏类
getGameInfo
,
startGame
,
submitGame
commonUserGetvipinfo
:
CommonUserControllerInstance
.
getVipInfo
,
commonUserGetranklist
:
CommonUserControllerInstance
.
getRankList
,
commonTaskGettasklist
:
CommonTaskControllerInstance
.
getTaskList
,
commonTaskDocompletetask
:
CommonTaskControllerInstance
.
doCompleteTask
,
commonTaskReceivetaskrewards
:
CommonTaskControllerInstance
.
receiveTaskRewards
,
commonTaskGetcollectgoodslist
:
CommonTaskControllerInstance
.
getCollectGoodsList
,
commonStatAddstat
:
CommonStatControllerInstance
.
addStat
,
commonStatGetstats
:
CommonStatControllerInstance
.
getStats
,
customTest1Addstat
:
CustomTest1ControllerInstance
.
addStat
,
customTest1Getstats
:
CustomTest1ControllerInstance
.
getStats
,
customTest2Addstat
:
CustomTest2ControllerInstance
.
addStat
,
customTest2Getstats
:
CustomTest2ControllerInstance
.
getStats
}
v2.0/src/service/custom/index.ts
View file @
b0b39561
/** @format */
import
TestService
from
'./test.service'
import
Custom
TestService
from
'./test.service'
const
c
ommon
=
{
TestService
const
c
ustom
=
{
Custom
TestService
}
export
default
c
ommon
export
default
c
ustom
export
{
TestService
Custom
TestService
}
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