123456789101112131415161718 |
- <?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.management.platform.mapper.UserCommonModuleMapper">
- <insert id="insertBatch">
- insert into user_common_module(user_id, company_id, module_id, seq, create_time) VALUES
- <foreach collection="toAddList" item="toAdd" separator=",">
- (#{toAdd.userId},#{toAdd.companyId},#{toAdd.moduleId},#{toAdd.seq},now())
- </foreach>
- </insert>
- <select id="getCommonModules" resultType="com.management.platform.entity.vo.UserCommonModuleVO">
- select ucm.module_id,sm.name as moduleName
- from user_common_module ucm
- left join sys_module sm on ucm.module_id = sm.id
- where user_id = #{userId} and company_id = #{companyId}
- </select>
- </mapper>
|