PermissionRecordMapper.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="cn.cslg.pas.mapper.PermissionRecordMapper">
  4. <select id="selectLicenseeMonthList" resultType="cn.cslg.pas.common.dto.es.SelectValueCurveDTO">
  5. select sum(license_fee) as licenseFee,
  6. DATE_FORMAT(license_time, '%Y-%m') as licenseTime
  7. from permission_record
  8. where patent_no = #{patentNo} and tenant_id = #{tenantId}
  9. group by licenseTime;
  10. </select>
  11. <select id="selectLicenseeYearList" resultType="cn.cslg.pas.common.dto.es.SelectValueCurveDTO">
  12. select sum(license_fee) as licenseFee,
  13. CONCAT(DATE_FORMAT(license_time, '%Y'),'年') as licenseTime
  14. from permission_record
  15. where patent_no = #{patentNo} and tenant_id = #{tenantId}
  16. group by licenseTime;
  17. </select>
  18. <select id="selectLicenseeQuarterList" resultType="cn.cslg.pas.common.dto.es.SelectValueCurveDTO">
  19. select sum(license_fee) as licenseFee,
  20. CONCAT(YEAR(license_time),'年第',quarter(license_time),'季度') as licenseTime
  21. from permission_record
  22. where patent_no = #{patentNo} and tenant_id = #{tenantId}
  23. group by licenseTime;
  24. </select>
  25. </mapper>