CompanyMapper.xml
613 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.pc.general.company.mapper.CompanyMapper">
<select id="selectCompanyByUserId" parameterType="Integer" resultType="com.huaheng.pc.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="Integer">
delete from company where id in (#{ids})
</delete>
</mapper>