| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?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="platform.modules.government.dao.ProjectServiceCategoryDao">
- <select id="findProjectService" resultType="platform.modules.government.entity.ProjectServiceCategory">
- </select>
- <delete id="deleteByProjectDeclarationId">
- update project_service_category set del_flag=1
- where project_declaration_id = #{id}
- </delete>
- <!-- 批量插入-->
- <insert id="insertBatch" parameterType="platform.modules.government.entity.ProjectServiceCategory">
- INSERT INTO project_service_category
- (
- id, business_type, pid, project_service_type_id,
- project_declaration_id, project_type_name, department_id,
- type,
- del_flag,create_time,create_by, create_name,
- update_time,update_by,update_name
- )
- VALUES
- <foreach collection="list" item="item" open="" separator="," close="">
- (
- #{item.id}, #{item.business_type}, #{item.pid}, #{item.project_service_type_id},
- #{item.project_declaration_id}, #{item.project_type_name},#{item.department_id},
- #{item.type},
- #{item.del_flag},#{item.create_time},#{item.create_by}, #{item.create_name},
- #{item.update_time}, #{item.update_by}, #{item.update_name}
- )
- </foreach>
- </insert>
- <select id="findProjectServiceList" resultType="platform.modules.government.entity.ProjectServiceCategory">
- SELECT
- *
- FROM
- project_service_category
- WHERE
- project_declaration_id = #{declarationId}
- AND business_type = #{businessType}
- AND pid = 0
- AND del_flag = 0
- </select>
- <select id="findProjectNameList" resultType="platform.modules.government.entity.ProjectServiceCategory">
- SELECT
- *
- FROM
- project_service_category
- WHERE
- project_declaration_id = #{declarationId}
- AND pid = #{categoryId}
- AND del_flag = 0
- </select>
- <select id="findByPid" resultType="platform.modules.government.entity.ProjectServiceCategory">
- SELECT
- *
- FROM
- project_service_category
- WHERE
- pid = #{serviceId}
- AND del_flag = 0
- </select>
- <select id="selectByProjectDeclarationId" resultType="platform.modules.government.entity.ProjectServiceCategory">
- select * from project_service_category where del_flag != 1 and project_declaration_id = #{id}
- </select>
- </mapper>
|