change - 变电站信息里的添加功能点击确认后会报错,实际上是是添加成功的

main
wenjy 3 years ago
parent c3c7f534d5
commit eea36f18fc

@ -16,7 +16,7 @@ public class BaseSubstationInfo extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键标识 */ /** 主键标识 */
private Long objid; private Long objId;
/** 变电站编号 */ /** 变电站编号 */
@Excel(name = "变电站编号") @Excel(name = "变电站编号")
@ -30,16 +30,15 @@ public class BaseSubstationInfo extends BaseEntity
@Excel(name = "是否启用") @Excel(name = "是否启用")
private Long enableFlag; private Long enableFlag;
public void setObjId(Long objid) public Long getObjId() {
{ return objId;
this.objid = objid;
} }
public Long getObjId() public void setObjId(Long objId) {
{ this.objId = objId;
return objid;
} }
public void setSubstationId(String substationId)
public void setSubstationId(String substationId)
{ {
this.substationId = substationId; this.substationId = substationId;
} }
@ -67,17 +66,4 @@ public class BaseSubstationInfo extends BaseEntity
return enableFlag; return enableFlag;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objid", getObjId())
.append("substationId", getSubstationId())
.append("substationName", getSubstationName())
.append("enableFlag", getEnableFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
} }

@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.BaseSubstationInfoMapper"> <mapper namespace="com.ruoyi.system.mapper.BaseSubstationInfoMapper">
<resultMap type="BaseSubstationInfo" id="BaseSubstationInfoResult"> <resultMap type="BaseSubstationInfo" id="BaseSubstationInfoResult">
<result property="objid" column="ObjId" /> <result property="objId" column="ObjId" />
<result property="substationId" column="Substation_Id" /> <result property="substationId" column="Substation_Id" />
<result property="substationName" column="Substation_Name" /> <result property="substationName" column="Substation_Name" />
<result property="enableFlag" column="Enable_Flag" /> <result property="enableFlag" column="Enable_Flag" />
@ -16,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectBaseSubstationInfoVo"> <sql id="selectBaseSubstationInfoVo">
select ObjId, Substation_Id, Substation_Name, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time from base_substation_info select objId, Substation_Id, Substation_Name, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time from base_substation_info
</sql> </sql>
<select id="selectBaseSubstationInfoList" parameterType="BaseSubstationInfo" resultMap="BaseSubstationInfoResult"> <select id="selectBaseSubstationInfoList" parameterType="BaseSubstationInfo" resultMap="BaseSubstationInfoResult">
@ -30,10 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBaseSubstationInfoByObjId" parameterType="Long" resultMap="BaseSubstationInfoResult"> <select id="selectBaseSubstationInfoByObjId" parameterType="Long" resultMap="BaseSubstationInfoResult">
<include refid="selectBaseSubstationInfoVo"/> <include refid="selectBaseSubstationInfoVo"/>
where ObjId = #{objid} where ObjId = #{objId}
</select> </select>
<insert id="insertBaseSubstationInfo" parameterType="BaseSubstationInfo" useGeneratedKeys="true" keyProperty="ObjId"> <insert id="insertBaseSubstationInfo" parameterType="BaseSubstationInfo" useGeneratedKeys="true" keyProperty="objId">
insert into base_substation_info insert into base_substation_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="substationId != null">Substation_Id,</if> <if test="substationId != null">Substation_Id,</if>
@ -66,17 +66,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">Update_By = #{updateBy},</if> <if test="updateBy != null">Update_By = #{updateBy},</if>
<if test="updateTime != null">Update_Time = #{updateTime},</if> <if test="updateTime != null">Update_Time = #{updateTime},</if>
</trim> </trim>
where ObjId = #{objid} where ObjId = #{objId}
</update> </update>
<delete id="deleteBaseSubstationInfoByObjId" parameterType="Long"> <delete id="deleteBaseSubstationInfoByObjId" parameterType="Long">
delete from base_substation_info where ObjId = #{ObjId} delete from base_substation_info where ObjId = #{objId}
</delete> </delete>
<delete id="deleteBaseSubstationInfoByObjIds" parameterType="String"> <delete id="deleteBaseSubstationInfoByObjIds" parameterType="String">
delete from base_substation_info where ObjId in delete from base_substation_info where ObjId in
<foreach item="ObjId" collection="array" open="(" separator="," close=")"> <foreach item="objId" collection="array" open="(" separator="," close=")">
#{ObjId} #{objId}
</foreach> </foreach>
</delete> </delete>

Loading…
Cancel
Save