SysDeptAccountWithdrawMapper.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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="voucherId" column="voucher_id" jdbcType="VARCHAR"/>
  12. <result property="picId" column="pic_id" jdbcType="VARCHAR"/>
  13. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  14. <result property="createTimeStart" column="createTimeStart" jdbcType="VARCHAR"/>
  15. <result property="createTimeEnd" column="createTimeEnd" jdbcType="VARCHAR"/>
  16. <result property="auditName" column="audit_name" jdbcType="VARCHAR"/>
  17. <result property="auditUserid" column="audit_userid" jdbcType="VARCHAR"/>
  18. <result property="withdrawUserid" column="withdraw_userid" jdbcType="VARCHAR"/>
  19. <result property="withdrawName" column="withdraw_name" jdbcType="VARCHAR"/>
  20. </resultMap>
  21. <select id="selectSysDeptAccountWithdraw" resultMap="BaseResultMap">
  22. select
  23. id,
  24. dept_id,
  25. name,
  26. amount,
  27. status,
  28. remark,
  29. voucher_id,
  30. pic_id,
  31. withdraw_userid,
  32. withdraw_name,
  33. audit_userid,
  34. audit_name,
  35. create_time
  36. from sys_dept_account_withdraw
  37. where
  38. <if test="sysDeptAccountWithdrawVo.status != null and sysDeptAccountWithdrawVo.status != ''">
  39. status = #{sysDeptAccountWithdrawVo.status}
  40. </if>
  41. <if test="sysDeptAccountWithdrawVo.id != null and sysDeptAccountWithdrawVo.id != ''">
  42. and id = #{sysDeptAccountWithdrawVo.id}
  43. </if>
  44. <if test="sysDeptAccountWithdrawVo.deptId != null and sysDeptAccountWithdrawVo.deptId != ''">
  45. and dept_id like concat(#{sysDeptAccountWithdrawVo.deptId},'%')
  46. </if>
  47. <if test="sysDeptAccountWithdrawVo.voucherId != null and sysDeptAccountWithdrawVo.voucherId != ''">
  48. and voucher_id = #{sysDeptAccountWithdrawVo.voucherId}
  49. </if>
  50. <if test="sysDeptAccountWithdrawVo.createTimeStart != null and sysDeptAccountWithdrawVo.createTimeStart != ''">
  51. and create_time &gt;= #{sysDeptAccountWithdrawVo.createTimeStart}
  52. </if>
  53. <if test="sysDeptAccountWithdrawVo.createTimeEnd != null and sysDeptAccountWithdrawVo.createTimeEnd != ''">
  54. and create_time &lt;= #{sysDeptAccountWithdrawVo.createTimeEnd}
  55. </if>
  56. </select>
  57. </mapper>