@Component public class SysLockDirective extends AbstractTemplateDirective
参数列表
itemType
:项目类型
itemId
:项目id,结果返回object
SysLock
itemIds
多个项目id,逗号或空格间隔,当id为空时生效,结果返回map
(id,object
)
<@sys.lock id=1>${object.count}</@sys.lock>
<@sys.lock ids='1,2,3'><#list map as k,v>${k}:${v.count}<#sep>,</#list></@sys.lock>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/lock?id=1', function(data){ console.log(data.count); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private LockComponent |
lockComponent |
private SysLockService |
service |
ADVANCED, AUTH_TOKEN, AUTH_USER_ID, siteComponent
log
构造器和说明 |
---|
SysLockDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
execute, expose, getAdvanced, getApp, getSite, getUserId, needAppToken, needUserToken, supportAdvanced
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private SysLockService service
private LockComponent lockComponent
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException