Commit 8ac9ef94 authored by maggie's avatar maggie

util参数编译

parent e1c91c2d
......@@ -772,6 +772,31 @@
"startDay",
"endDay"
]
},
{
"type": "common",
"name": "preUpdate",
"params": [
{
"type": "common",
"behave": "update",
"name": "updateVip",
"params": [
"1",
"2"
]
},
{
"type": "common",
"behave": "update",
"name": "updateSignTask"
},
{
"type": "common",
"behave": "update",
"name": "updateOrderGoods"
}
]
}
],
"main": [
......
......@@ -11,8 +11,8 @@
"devDependencies": {
"gulp": "^4.0.2",
"gulp-nunjucks-render": "^2.2.3",
"gulp-rename": "^2.0.0",
"gulp-prettier": "^3.0.0"
"gulp-prettier": "^3.0.0",
"gulp-rename": "^2.0.0"
},
"dependencies": {
"fs-extra": "^9.0.1"
......
......@@ -10,7 +10,7 @@ import { {%for service, service_item in type_item %}{{type|capitalize}}{{service
{%- for decorator in decorators %}
@{{ decorator.name }}
{%- if decorator.name == 'preCheck' or decorator.name == 'preUpdate' -%}
([{%- for param in decorator.params -%}{{param.name}}{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}])
([{%- for param in decorator.params -%}{{param.name}}{%- if param.params %}({%- for utilParam in param.params -%}{{utilParam}}{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}){% endif %}{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}])
{%- elif decorator.name == 'noCatch' or decorator.name == 'noCheckUser' -%}
{%- else -%}
([{%- for param in decorator.params -%}'{{ param }}'{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}])
......
......@@ -935,7 +935,7 @@ gulp-nunjucks-render@^2.2.3:
gulp-prettier@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/gulp-prettier/download/gulp-prettier-3.0.0.tgz#21c7de272fc7528168af6086e8edae6a645168a8"
resolved "http://registry.eazytec.com/repository/npm-eazytec/gulp-prettier/-/gulp-prettier-3.0.0.tgz#21c7de272fc7528168af6086e8edae6a645168a8"
integrity sha1-IcfeJy/HUoFor2CG6O2uamRRaKg=
dependencies:
plugin-error "^1.0.1"
......@@ -947,13 +947,6 @@ gulp-rename@^2.0.0:
resolved "https://registry.npm.taobao.org/gulp-rename/download/gulp-rename-2.0.0.tgz#9bbc3962b0c0f52fc67cd5eaff6c223ec5b9cf6c"
integrity sha1-m7w5YrDA9S/GfNXq/2wiPsW5z2w=
gulp-sequence@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/gulp-sequence/download/gulp-sequence-1.0.0.tgz#862f93e6503e67c350a42948fa666953cf88ba67"
integrity sha1-hi+T5lA+Z8NQpClI+mZpU8+Iumc=
dependencies:
thunks "^4.9.0"
gulp@^4.0.2:
version "4.0.2"
resolved "https://registry.npm.taobao.org/gulp/download/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa"
......@@ -2116,11 +2109,6 @@ through2@^3.0.0:
inherits "^2.0.4"
readable-stream "2 || 3"
thunks@^4.9.0:
version "4.9.6"
resolved "https://registry.npm.taobao.org/thunks/download/thunks-4.9.6.tgz#08f268ab32ad12b8e1838d2b819dbd7d9b3262a0"
integrity sha1-CPJoqzKtErjhg40rgZ29fZsyYqA=
time-stamp@^1.0.0:
version "1.1.0"
resolved "https://registry.npm.taobao.org/time-stamp/download/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
......
/** @format */
import { services, checkParams } from '../../decorator/common'
import { services, checkParams, preUpdate } from '../../decorator/common'
import { updateVip, updateSignTask, updateOrderGoods } from '../../utils/common/update'
import customUtil from '../../utils/custom'
import { resultsModel } from '../../sdk'
import { CommonStatService } from '../../service/common'
......@@ -24,6 +25,7 @@ export default class Test2Controller {
* 统计数据
*/
@checkParams(['activityId', 'startDay', 'endDay'])
@preUpdate([updateVip(1, 2), updateSignTask, updateOrderGoods])
@services([CommonStatService])
async test2getStats(
context: IContext<IParams>,
......
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 to comment