SysDeptAccountWithdrawMapper.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.ydtech.modules.admin.dao.SysDeptAccountWithdrawMapper">
  4. <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.vo.SysDeptAccountWithdrawVo">
  5. <id property="id" column="id" jdbcType="VARCHAR"/>
  6. <result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
  7. <result property="name" column="name" jdbcType="VARCHAR"/>
  8. <result property="amount" column="amount" jdbcType="DECIMAL"/>
  9. <result property="status" column="status" jdbcType="VARCHAR"/>
  10. <result property="remark" column="remark" jdbcType="VARCHAR"/>
  11. <result property="createTime" column="create_date" jdbcType="TIMESTAMP"/>
  12. <result property="createTimeStart" column="createTimeStart" jdbcType="VARCHAR"/>
  13. <result property="createTimeEnd" column="createTimeEnd" jdbcType="VARCHAR"/>
  14. </resultMap>
  15. <select id="selectSysDeptAccountWithdraw" resultMap="BaseResultMap">
  16. select
  17. id,
  18. dept_id,
  19. name,
  20. amount,
  21. status,
  22. remark,
  23. DATE(create_time) as create_date
  24. from sys_dept_account_withdraw
  25. where
  26. <if test="sysDeptAccountWithdrawVo.status != null and sysDeptAccountWithdrawVo.status != ''">
  27. status = #{sysDeptAccountWithdrawVo.status}
  28. </if>
  29. <if test="sysDeptAccountWithdrawVo.deptId != null and sysDeptAccountWithdrawVo.deptId != ''">
  30. and dept_id = #{sysDeptAccountWithdrawVo.deptId}
  31. </if>
  32. <if test="sysDeptAccountWithdrawVo.createTimeStart != null and sysDeptAccountWithdrawVo.createTimeStart != ''">
  33. and create_time &gt;= #{sysDeptAccountWithdrawVo.createTimeStart}
  34. </if>
  35. <if test="sysDeptAccountWithdrawVo.createTimeEnd != null and sysDeptAccountWithdrawVo.createTimeEnd != ''">
  36. and create_time &lt;= #{sysDeptAccountWithdrawVo.createTimeEnd}
  37. </if>
  38. </select>
  39. </mapper>