CompanyMapper.xml 617 Bytes
<?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.huaheng.project.general.company.mapper.CompanyMapper">

	<select id="selectCompanyByUserId" parameterType="Long" resultType="com.huaheng.project.general.company.domain.Company">
		SELECT c.id, c.name, c.code
		FROM sys_user_company suc
		INNER JOIN company c ON  suc.companyId = c.id AND suc.userId = #{userId}
	</select>

 	<delete id="deleteCompanyByIds" parameterType="Long">
 		delete from company where id in (#{ids})
 	</delete>

</mapper>