12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?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.weather.mapper.SysRoleMapper">
- <resultMap type="SysRole" id="SysRoleResult">
- <id property="roleId" column="role_id" />
- <result property="roleName" column="role_name" />
- <result property="roleKey" column="role_key" />
- <result property="roleSort" column="role_sort" />
- <result property="dataScope" column="data_scope" />
- <result property="menuCheckStrictly" column="menu_check_strictly" />
- <result property="deptCheckStrictly" column="dept_check_strictly" />
- <result property="status" column="status" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- </resultMap>
- <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
- insert into sys_role(
- <if test="roleId != null and roleId != 0">role_id,</if>
- <if test="roleName != null and roleName != ''">role_name,</if>
- <if test="roleKey != null and roleKey != ''">role_key,</if>
- <if test="roleSort != null">role_sort,</if>
- <if test="dataScope != null and dataScope != ''">data_scope,</if>
- <if test="menuCheckStrictly != null">menu_check_strictly,</if>
- <if test="deptCheckStrictly != null">dept_check_strictly,</if>
- <if test="status != null and status != ''">status,</if>
- <if test="remark != null and remark != ''">remark,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- create_time
- )values(
- <if test="roleId != null and roleId != 0">#{roleId},</if>
- <if test="roleName != null and roleName != ''">#{roleName},</if>
- <if test="roleKey != null and roleKey != ''">#{roleKey},</if>
- <if test="roleSort != null">#{roleSort},</if>
- <if test="dataScope != null and dataScope != ''">#{dataScope},</if>
- <if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
- <if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
- <if test="status != null and status != ''">#{status},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- NOW()
- )
- </insert>
- </mapper>
|