字典处理
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:title="title"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
@@ -78,6 +78,7 @@
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
title: '',
|
||||
readonly: false,
|
||||
visible: false,
|
||||
dataForm: {
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
addOrUpdateHandle (id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.title = !id ? '新增' : '修改'
|
||||
this.$refs.addOrUpdate.readonly = false
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
@@ -183,6 +184,7 @@
|
||||
queryHandle(id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.title = '查看'
|
||||
this.$refs.addOrUpdate.readonly = true
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
|
||||
Binary file not shown.
+4
-5
@@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
/**
|
||||
* 公共处理
|
||||
*/
|
||||
@ECPInterceptorMapping({".*"})
|
||||
//@ECPInterceptorMapping({".*"})
|
||||
public class BUIInterceptor extends YGAbstractBizIntercetpor {
|
||||
|
||||
@Autowired
|
||||
@@ -37,7 +37,9 @@ public class BUIInterceptor extends YGAbstractBizIntercetpor {
|
||||
|
||||
YGBizMessage msg = bizCtx.getCurrentMsg();
|
||||
YGEDB edb = msg.getEDBBody();
|
||||
edb.setData("EDBBody", String.valueOf(edb));
|
||||
bizCtx.setProperty("request_data", edb.toString());
|
||||
bizCtx.getProperty("request_data");
|
||||
|
||||
Logger logger = YGLogger.getLogger(msg);
|
||||
|
||||
if (logger.isInfoEnabled()) {
|
||||
@@ -78,9 +80,6 @@ public class BUIInterceptor extends YGAbstractBizIntercetpor {
|
||||
logger.info("前处理结束:[" + this.getClass().getSimpleName() + ".onRequest]");
|
||||
}
|
||||
|
||||
YGDatabaseUtil dbUtlil = bizCtx.getDataBaseUtil();
|
||||
dbUtlil.insert("insert t(a,b) values(?,?)", new String[]{"a", "b"});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -42,10 +42,8 @@ public class BuiDctDeleteAction extends BaseAction {
|
||||
msgLog.info("delete, reqBO=" + JSONObject.toJSON(reqBO));
|
||||
|
||||
ValidatorUtil.validateObject(reqBO);
|
||||
BuiDctDO entity = new BuiDctDO();
|
||||
BeanUtils.copyProperties(reqBO, entity);
|
||||
|
||||
int retCod = buiDctMapper.deleteByPrimaryKey(entity);
|
||||
int retCod = buiDctMapper.deleteByIds(reqBO.getIds());
|
||||
|
||||
ResultT resultT = new ResultT();
|
||||
if (retCod > 0) {
|
||||
|
||||
@@ -32,4 +32,7 @@ public interface BuiDctMapper {
|
||||
YGSqlCursor selectCursor(BuiDctDO entity);
|
||||
|
||||
void selectResultHandler(BuiDctDO entity, YGResultHandler resultHandler);
|
||||
|
||||
int deleteByIds(String ids);
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ public class BuiDctDeleteReqBO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ECPDict(required = true, message = "id值不合法")
|
||||
private Long id;
|
||||
@ECPDict(required = true, message = "ids值不合法")
|
||||
private String ids;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -148,4 +148,9 @@
|
||||
<if test="isNotNull(updDesc)">upd_desc=#{updDesc},</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<delete id="deleteByIds" parameterType="java.lang.String">
|
||||
delete from T_BUI_DCT where id in (${ids})
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user