SysEmailMapper.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.ym.mec.biz.dal.dao.SysEmailDao">
  4. <resultMap id="BaseResultMap" type="com.ym.mec.biz.dal.entity.SysEmail">
  5. <id column="id_" jdbcType="INTEGER" property="id"/>
  6. <result column="host_name_" jdbcType="VARCHAR" property="hostName"/>
  7. <result column="smtp_port_" jdbcType="INTEGER" property="smtpPort"/>
  8. <result column="user_name_" jdbcType="VARCHAR" property="userName"/>
  9. <result column="password_" jdbcType="VARCHAR" property="password"/>
  10. <result column="from_" jdbcType="VARCHAR" property="from"/>
  11. <result column="from_name_" jdbcType="VARCHAR" property="fromName"/>
  12. <result column="tenant_id_" jdbcType="INTEGER" property="tenantId"/>
  13. </resultMap>
  14. <sql id="Base_Column_List">
  15. id_, host_name_, smtp_port_, user_name_, password_, from_, from_name_, tenant_id_
  16. </sql>
  17. <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
  18. parameterType="com.ym.mec.biz.dal.entity.SysEmail">
  19. insert into sys_email(host_name_, smtp_port_, user_name_, password_, from_, from_name_, tenant_id_)
  20. values
  21. <foreach collection="entities" item="entity" separator=",">
  22. (#{entity.hostName}, #{entity.smtpPort}, #{entity.userName}, #{entity.password}, #{entity.from},
  23. #{entity.fromName}, #{entity.tenantId})
  24. </foreach>
  25. </insert>
  26. <select id="query" resultType="com.ym.mec.biz.dal.entity.SysEmail">
  27. select * from sys_email where tenant_id_ = #{tenantId}
  28. </select>
  29. </mapper>