ShopBankCardtMapper.xml 1.3 KB

12345678910111213141516171819202122232425262728
  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.yami.shop.dao.ShopBankCardMapper">
  4. <resultMap id="shopWalletMap" type="com.yami.shop.bean.model.ShopWallet">
  5. <id column="shop_wallet_id" property="shopWalletId" />
  6. <result column="shop_id" property="shopId"/>
  7. <result column="unsettled_amount" property="unsettledAmount"/>
  8. <result column="settled_amount" property="settledAmount"/>
  9. <result column="freeze_amount" property="freezeAmount"/>
  10. <result column="total_settled_amount" property="totalSettledAmount"/>
  11. <result column="version" property="version"/>
  12. <result column="update_time" property="updateTime"/>
  13. <result column="shop_name" property="shopName"/>
  14. <result column="shop_logo" property="shopLogo"/>
  15. </resultMap>
  16. <select id="pageShopWallet" resultMap="shopWalletMap">
  17. select tw.*,tsd.shop_name,tsd.shop_logo from tz_shop_wallet tw
  18. join tz_shop_detail tsd on tsd.shop_id = tw.shop_id
  19. <where>
  20. <if test="shopWallet.shopName != null and shopWallet.shopName != ''">
  21. tsd.shop_name like concat('%',#{shopWallet.shopName} ,'%')
  22. </if>
  23. </where>
  24. order by tw.shop_wallet_id desc
  25. </select>
  26. </mapper>