架构升级

Former-commit-id: 64269f54249557388b1703999212ac24c9cb151d
master
wangbing 5 years ago
parent ac63e29d15
commit 7b6e0a56bc

@ -43,6 +43,12 @@ import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
<#if table.getUpdate()> <#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse; import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if> </#if>
<#list table.methods as item>
<#if item.selected>
import ${domain}.module.${moduleName}.req.${table.getCName()}${item.getAbbName()?default("")}Request;
import ${domain}.module.${moduleName}.rsp.${table.getCName()}${item.getAbbName()?default("")}Response;
</#if>
</#list>
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
@ -87,6 +93,14 @@ public class ${table.getCName()}Ajax{
return ${table.getFName()}Manager.search(request, LocalData.getToken()); return ${table.getFName()}Manager.search(request, LocalData.getToken());
} }
</#if> </#if>
<#list table.methods as item>
<#if item.selected>
public ${table.getCName()}${item.getAbbName()?default("")}Response ${item.name}(${table.getCName()}${item.getAbbName()?default("")}Request request) {
return ${table.getFName()}Manager.${item.name}(request, LocalData.getToken());
}
</#if>
</#list>
<#if table.getHtml()> <#if table.getHtml()>
public Object template(){ public Object template(){

@ -2,8 +2,42 @@ package ${domain}.action.api.${module};
import ${domain}.frame.auth.LocalData; import ${domain}.frame.auth.LocalData;
import ${domain}.module.${module}.mgr.${table.getCName()}Manager; import ${domain}.module.${module}.mgr.${table.getCName()}Manager;
import ${domain}.module.${module}.req.*; <#if table.getCreate()>
import ${domain}.module.${module}.rsp.*; import ${domain}.module.${moduleName}.req.${table.getCName()}CreateRequest;
</#if>
<#if table.getDelete()>
import ${domain}.module.${moduleName}.req.${table.getCName()}DeleteRequest;
</#if>
<#if table.getFind()>
import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
</#if>
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
<#if table.getCreate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}CreateResponse;
</#if>
<#if table.getDelete()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}DeleteResponse;
</#if>
<#if table.getFind()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
</#if>
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>
<#list table.methods as item>
<#if item.selected>
import ${domain}.module.${moduleName}.req.${table.getCName()}${item.getAbbName()?default("")}Request;
import ${domain}.module.${moduleName}.rsp.${table.getCName()}${item.getAbbName()?default("")}Response;
</#if>
</#list>
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
public class ${table.getCName()}Api{ public class ${table.getCName()}Api{
@ -46,4 +80,12 @@ public class ${table.getCName()}Api{
return ${table.getFName()}Manager.search(request, LocalData.getToken()); return ${table.getFName()}Manager.search(request, LocalData.getToken());
} }
</#if> </#if>
<#list table.methods as item>
<#if item.selected>
public ${table.getCName()}${item.getAbbName()?default("")}Response ${item.name}(${table.getCName()}${item.getAbbName()?default("")}Request request) {
return ${table.getFName()}Manager.${item.name}(request, LocalData.getToken());
}
</#if>
</#list>
} }

@ -112,9 +112,9 @@ public interface ${table.getCName()}Manager {
*/ */
${table.getCName()}GetResponse get(${table.getCName()}GetRequest request, Token token); ${table.getCName()}GetResponse get(${table.getCName()}GetRequest request, Token token);
</#if> </#if>
<#list table.methods as item> <#list table.methods as item>
<#if item.selected> <#if item.selected>
/** /**
* ${item.note?default("")} * ${item.note?default("")}
* *

@ -593,12 +593,15 @@
}, },
// 全屏 // 全屏
screenFull: function () { screenFull: function () {
var el = document.documentElement; var docElm = document.documentElement;
var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen; if (docElm.requestFullscreen) {//W3C
docElm.requestFullscreen();
//typeof rfs != "undefined" && rfs } else if (docElm.mozRequestFullScreen) {//FireFox
if (rfs) { docElm.mozRequestFullScreen();
rfs.inputCall(el); } else if (docElm.webkitRequestFullScreen) {//Chrome等
docElm.webkitRequestFullScreen();
} else if (elem.msRequestFullscreen) {//IE11
elem.msRequestFullscreen();
} else if (typeof window.ActiveXObject !== "undefined") { } else if (typeof window.ActiveXObject !== "undefined") {
//for IE这里其实就是模拟了按下键盘的F11使浏览器全屏 //for IE这里其实就是模拟了按下键盘的F11使浏览器全屏
var wscript = new ActiveXObject("WScript.Shell"); var wscript = new ActiveXObject("WScript.Shell");
@ -609,12 +612,14 @@
}, },
// 取消全屏 // 取消全屏
screenNotFull: function () { screenNotFull: function () {
var el = document; if (document.exitFullscreen) {//W3C
var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.mozCancelFullScreen || el.exitFullScreen; document.exitFullscreen();
} else if (document.mozCancelFullScreen) {//FireFox
//typeof cfs != "undefined" && cfs document.mozCancelFullScreen();
if (cfs) { } else if (document.webkitCancelFullScreen) {//Chrome等
cfs.inputCall(el); document.webkitCancelFullScreen();
} else if (document.msExitFullscreen) {//IE11
document.msExitFullscreen();
} else if (typeof window.ActiveXObject !== "undefined") { } else if (typeof window.ActiveXObject !== "undefined") {
//for IE这里和fullScreen相同模拟按下F11键退出全屏 //for IE这里和fullScreen相同模拟按下F11键退出全屏
var wscript = new ActiveXObject("WScript.Shell"); var wscript = new ActiveXObject("WScript.Shell");

Loading…
Cancel
Save

Powered by TurnKey Linux.