change - 参数配置页面编辑问题处理

main
wenjy 3 years ago
parent 4bb93d081d
commit d5d108a6dc

@ -1,8 +1,10 @@
package com.ruoyi.web.controller.base;
import java.util.Date;
import java.util.List;
import com.alibaba.fastjson.JSONArray;
import com.ruoyi.common.utils.ShiroUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -83,6 +85,8 @@ public class SysParamConfigController extends BaseController {
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysParamConfig sysParamConfig) {
sysParamConfig.setCreateBy(ShiroUtils.getLoginName());
sysParamConfig.setCreateTime(new Date());
return toAjax(sysParamConfigService.insertSysParamConfig(sysParamConfig));
}
@ -100,6 +104,8 @@ public class SysParamConfigController extends BaseController {
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysParamConfig sysParamConfig) {
sysParamConfig.setUpdateBy(ShiroUtils.getLoginName());
sysParamConfig.setUpdateTime(new Date());
return toAjax(sysParamConfigService.updateSysParamConfig(sysParamConfig));
}

@ -76,7 +76,7 @@
checkbox: true
},
{
field: 'ObjId',
field: 'objId',
title: '主键标识',
visible: false
},
@ -120,8 +120,8 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.ObjId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.ObjId + '\')"><i class="fa fa-remove"></i>删除</a>');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]

@ -16,7 +16,7 @@ public class SysParamConfig extends BaseEntity
private static final long serialVersionUID = 1L;
/** 主键标识 */
private Long ObjId;
private Long objId;
/** 参数类型 */
@Excel(name = "参数类型")
@ -34,14 +34,14 @@ public class SysParamConfig extends BaseEntity
@Excel(name = "是否启用")
private Long enableFlag;
public void setObjId(Long ObjId)
public void setObjId(Long objId)
{
this.ObjId = ObjId;
this.objId = objId;
}
public Long getObjId()
{
return ObjId;
return objId;
}
public void setParamType(String paramType)
{
@ -83,7 +83,7 @@ public class SysParamConfig extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("ObjId", getObjId())
.append("objId", getObjId())
.append("paramType", getParamType())
.append("paramTitle", getParamTitle())
.append("paramText", getParamText())

@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.SysParamConfigMapper">
<resultMap type="SysParamConfig" id="SysParamConfigResult">
<result property="ObjId" column="ObjId" />
<result property="objId" column="ObjId" />
<result property="paramType" column="Param_Type" />
<result property="paramTitle" column="Param_Title" />
<result property="paramText" column="Param_Text" />
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">Update_By = #{updateBy},</if>
<if test="updateTime != null">Update_Time = #{updateTime},</if>
</trim>
where ObjId = #{ObjId}
where ObjId = #{objId}
</update>
<delete id="deleteSysParamConfigByObjId" parameterType="Long">

Loading…
Cancel
Save