share-platform/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml

47 lines
1.4 KiB
XML
Raw Normal View History

2022-04-14 10:10:40 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.processForm.dao.TAbilityApplicationDao">
<update id="updateInstanceId">
update t_ability_application set instance_id = #{instanceId} where id = #{id}
</update>
<select id="getByInstanceId" resultType="io.renren.modules.processForm.entity.TAbilityApplicationEntity">
SELECT
t1.*
FROM
t_ability_application t1
WHERE
t1.instance_id = #{instanceId}
</select>
<select id="getByBusinessKey" resultType="io.renren.modules.processForm.entity.TAbilityApplicationEntity">
SELECT
t1.*
FROM
t_ability_application t1
WHERE
t1.id = #{businessKey}
</select>
2022-05-11 16:57:59 +08:00
<select id="countApplyAll" resultType="java.lang.Long">
SELECT
COUNT( id )
FROM
t_ability_application
WHERE
approve_status = '通过'
</select>
2022-05-12 15:15:22 +08:00
<select id="getAmountGroupByType" resultType="java.util.Map">
SELECT
tbr.type AS type,
COUNT( taa.id ) AS amount
FROM
t_ability_application AS taa
INNER JOIN tb_data_resource AS tbr ON taa.resource_id = tbr.id
WHERE
taa.approve_status = '通过'
GROUP BY
tbr.type
</select>
2022-04-14 10:10:40 +08:00
</mapper>