You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
46 lines
1.5 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.zc.license.mapper.SysLicenseServiceMapper">
|
|
|
|
<resultMap type="SysLicenseInfo" id="SysLicenseInfoResult">
|
|
<id property="id" column="id"/>
|
|
<result property="authCode" column="auth_code"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectLicenseCodeVo">
|
|
select id, auth_code, create_time, update_time
|
|
from license_info
|
|
</sql>
|
|
|
|
<select id="selectCode" parameterType="SysLicenseInfo" resultMap="SysLicenseInfoResult">
|
|
<include refid="selectLicenseCodeVo"/>
|
|
</select>
|
|
|
|
<insert id="insertCode">
|
|
insert into license_info(
|
|
<if test="authCode != null and authCode != ''">auth_code,</if>
|
|
create_time
|
|
)values(
|
|
<if test="authCode != null and authCode != ''">#{authCode},</if>
|
|
sysdate()
|
|
)
|
|
</insert>
|
|
|
|
<update id="updateCode" parameterType="SysLicenseInfo">
|
|
update license_info
|
|
<set>
|
|
<if test="authCode != null and authCode != ''">auth_code = #{authCode},</if>
|
|
update_time = sysdate()
|
|
</set>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteCode" parameterType="Long">
|
|
delete from license_info
|
|
</delete>
|
|
|
|
</mapper>
|