This commit is contained in:
zhuangqian 2016-09-28 15:11:35 +08:00
parent f05c0dc2b8
commit 4b6c92c493
3 changed files with 5 additions and 2 deletions

View File

@ -98,6 +98,7 @@ public class DictController extends BaseController{
boolean temp = Blade.create(Dict.class).save(dict);
if (temp) {
CacheKit.removeAll(DICT_CACHE);
CacheKit.removeAll(DIY_CACHE);
return success(SAVE_SUCCESS_MSG);
} else {
return error(SAVE_FAIL_MSG);
@ -112,6 +113,7 @@ public class DictController extends BaseController{
boolean temp = Blade.create(Dict.class).update(dict);
if (temp) {
CacheKit.removeAll(DICT_CACHE);
CacheKit.removeAll(DIY_CACHE);
return success(UPDATE_SUCCESS_MSG);
} else {
return error(UPDATE_FAIL_MSG);
@ -124,6 +126,7 @@ public class DictController extends BaseController{
int cnt = Blade.create(Dict.class).deleteByIds(getParameter("ids"));
if (cnt > 0) {
CacheKit.removeAll(DICT_CACHE);
CacheKit.removeAll(DIY_CACHE);
return success(DEL_SUCCESS_MSG);
} else {
return error(DEL_FAIL_MSG);

View File

@ -6,7 +6,7 @@
@ var _col=[
@ {name:"字典编号",index:"code", type:"text",newline:true,length:8,required:"required"},
@ {name:"字典序号",index:"num", type:"text",newline:true,length:3,required:"required"},
@ {name:"字典父序列",index:"pid",type:"selectDiy",source:"Dict.diy",value:pId!,newline:false,length:3},
@ {name:"字典父序列",index:"pid",type:"selectDiy",source:"dict.diy",value:pId!,newline:false,length:3},
@ {name:"字典名称",index:"name", type:"text",newline:true,length:8,required:"required"},
@ {name:"备注",index:"tips", type:"text",newline:true,length:8}
@ ];

View File

@ -7,7 +7,7 @@
@ var _col=[
@ {name:"字典编号",index:"code", type:"text",newline:true,length:8,required:"required"},
@ {name:"字典序号",index:"num", type:"text",newline:true,length:3,required:"required"},
@ {name:"字典父序列",index:"pid",type:"selectDiy",source:"Dict.diy",newline:false,length:3},
@ {name:"字典父序列",index:"pid",type:"selectDiy",source:"dict.diy",newline:false,length:3},
@ {name:"字典名称",index:"name", type:"text",newline:true,length:8,required:"required"},
@ {name:"备注",index:"tips", type:"text",newline:true,length:8}
@ ];