查询项目的行政区域信息接口,项目相关管理接口逻辑完善,行政区划管理相关接口逻辑完善
This commit is contained in:
@ -31,10 +31,15 @@
|
||||
<result property="administrativeAreaCode" column="administrative_area_code" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="level" column="level" />
|
||||
<result property="provinceCode" column="province_code" />
|
||||
<result property="cityCode" column="city_code" />
|
||||
<result property="countyCode" column="county_code" />
|
||||
<result property="townCode" column="town_code" />
|
||||
<result property="villageCode" column="village_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProjectVo">
|
||||
select id, project_name, sys_show_name, central_coordinates, scope, administrative_area, owner, logo, image, video_introduction, remark, p_params, introduce, del_flag, create_time, create_by, update_time, remarks, tenant_id, tenant_name, owner_id, parent_id, dept_id, administrative_area_code, dept_name, level from project
|
||||
select id, project_name, sys_show_name, central_coordinates, scope, administrative_area, owner, logo, image, video_introduction, remark, p_params, introduce, del_flag, create_time, create_by, update_time, remarks, tenant_id, tenant_name, owner_id, parent_id, dept_id, administrative_area_code, dept_name, level, province_code, city_code, county_code, town_code, village_code from project
|
||||
</sql>
|
||||
|
||||
<select id="selectProjectList" parameterType="Project" resultMap="ProjectResult">
|
||||
@ -60,18 +65,22 @@
|
||||
<if test="administrativeAreaCode != null and administrativeAreaCode != ''"> and administrative_area_code = #{administrativeAreaCode}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="level != null and level != ''"> and level = #{level}</if>
|
||||
<if test="provinceCode != null and provinceCode != ''"> and province_code = #{provinceCode}</if>
|
||||
<if test="cityCode != null and cityCode != ''"> and city_code = #{cityCode}</if>
|
||||
<if test="countyCode != null and countyCode != ''"> and county_code = #{countyCode}</if>
|
||||
<if test="townCode != null and townCode != ''"> and town_code = #{townCode}</if>
|
||||
<if test="villageCode != null and villageCode != ''"> and village_code = #{villageCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProjectByProjectId" parameterType="Long" resultMap="ProjectResult">
|
||||
<select id="selectProjectById" parameterType="Long" resultMap="ProjectResult">
|
||||
<include refid="selectProjectVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProject" parameterType="Project">
|
||||
<insert id="insertProject" parameterType="Project" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="projectName != null and projectName != ''">project_name,</if>
|
||||
<if test="sysShowName != null and sysShowName != ''">sys_show_name,</if>
|
||||
<if test="centralCoordinates != null and centralCoordinates != ''">central_coordinates,</if>
|
||||
@ -97,9 +106,13 @@
|
||||
<if test="administrativeAreaCode != null">administrative_area_code,</if>
|
||||
<if test="deptName != null">dept_name,</if>
|
||||
<if test="level != null">level,</if>
|
||||
<if test="provinceCode != null">province_code,</if>
|
||||
<if test="cityCode != null">city_code,</if>
|
||||
<if test="countyCode != null">county_code,</if>
|
||||
<if test="townCode != null">town_code,</if>
|
||||
<if test="villageCode != null">village_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="projectName != null and projectName != ''">#{projectName},</if>
|
||||
<if test="sysShowName != null and sysShowName != ''">#{sysShowName},</if>
|
||||
<if test="centralCoordinates != null and centralCoordinates != ''">#{centralCoordinates},</if>
|
||||
@ -125,6 +138,11 @@
|
||||
<if test="administrativeAreaCode != null">#{administrativeAreaCode},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="level != null">#{level},</if>
|
||||
<if test="provinceCode != null">#{provinceCode},</if>
|
||||
<if test="cityCode != null">#{cityCode},</if>
|
||||
<if test="countyCode != null">#{countyCode},</if>
|
||||
<if test="townCode != null">#{townCode},</if>
|
||||
<if test="villageCode != null">#{villageCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -156,17 +174,22 @@
|
||||
<if test="administrativeAreaCode != null">administrative_area_code = #{administrativeAreaCode},</if>
|
||||
<if test="deptName != null">dept_name = #{deptName},</if>
|
||||
<if test="level != null">level = #{level},</if>
|
||||
<if test="provinceCode != null">province_code = #{provinceCode},</if>
|
||||
<if test="cityCode != null">city_code = #{cityCode},</if>
|
||||
<if test="countyCode != null">county_code = #{countyCode},</if>
|
||||
<if test="townCode != null">town_code = #{townCode},</if>
|
||||
<if test="villageCode != null">village_code = #{villageCode},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProjectByProjectId" parameterType="Long">
|
||||
<delete id="deleteProjectById" parameterType="Long">
|
||||
delete from project where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProjectByProjectIds" parameterType="String">
|
||||
<delete id="deleteProjectByIds" parameterType="String">
|
||||
delete from project where id in
|
||||
<foreach item="projectId" collection="array" open="(" separator="," close=")">
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
Reference in New Issue
Block a user