|
@@ -0,0 +1,67 @@
|
|
|
+<?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="com.example.nngkxxdp.dao.PartyServiceDao">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.example.nngkxxdp.entity.PartyService">
|
|
|
+ <id property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="partyForm" column="party_form" jdbcType="VARCHAR"/>
|
|
|
+ <result property="information" column="information" jdbcType="VARCHAR"/>
|
|
|
+ <result property="contacts" column="contacts" jdbcType="VARCHAR"/>
|
|
|
+ <result property="contactsPhone" column="contacts_phone" jdbcType="VARCHAR"/>
|
|
|
+ <result property="contactsAddr" column="contacts_addr" jdbcType="VARCHAR"/>
|
|
|
+ <result property="contactsFunction" column="contacts_function" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createWork" column="create_work" jdbcType="VARCHAR"/>
|
|
|
+ <result property="parkId" column="parkId" jdbcType="INTEGER"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <association property="parkData" javaType="com.example.nngkxxdp.entity.ParkData">
|
|
|
+ <result column="title" property="title"/>
|
|
|
+ <result column="id" property="id"/>
|
|
|
+ <result column="industry" property="industry"/>
|
|
|
+ <result column="contacts" property="contacts"/>
|
|
|
+ <result column="contacts_phone" property="contactsPhone"/>
|
|
|
+ <result column="contacts_addr" property="contactsAddr"/>
|
|
|
+ <result column="parkAddr" property="addr"/>
|
|
|
+ </association>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id,party_form,information,
|
|
|
+ contacts,contacts_phone,contacts_addr,
|
|
|
+ contacts_function,create_work,parkId,create_time
|
|
|
+ </sql>
|
|
|
+ <insert id="insert">
|
|
|
+ insert into t_party_service(party_form,information,contacts,contacts_phone,contacts_addr,contacts_function,create_work,parkId,create_time)
|
|
|
+ values(#{partyForm},#{information},#{contacts},#{contactsPhone},#{contactsAddr},#{contactsFunction},#{createWork},#{parkId},#{createTime})
|
|
|
+ </insert>
|
|
|
+ <update id="update">
|
|
|
+ update t_party_service
|
|
|
+ set party_form = #{partyForm},
|
|
|
+ information = #{information},
|
|
|
+ contacts = #{contacts},
|
|
|
+ contacts_phone = #{contactsPhone},
|
|
|
+ contacts_addr = #{contactsAddr},
|
|
|
+ contacts_function = #{contactsFunction},
|
|
|
+ parkId = #{parkId},
|
|
|
+ create_work = #{createWork}
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+ <delete id="deleteById">
|
|
|
+ delete from t_party_service where id = #{id}
|
|
|
+ </delete>
|
|
|
+ <select id="findAll" resultType="com.example.nngkxxdp.entity.PartyService">
|
|
|
+ select ps.*,pd.contacts,pd.contacts_phone,pd.contacts_addr,pd.title
|
|
|
+ from t_party_service ps
|
|
|
+ left join t_park_data pd on pd.id=ps.parkId
|
|
|
+ </select>
|
|
|
+ <select id="findById" resultType="com.example.nngkxxdp.entity.PartyService">
|
|
|
+ select * from t_party_service where id = #{id}
|
|
|
+ </select>
|
|
|
+ <select id="findByParkId" resultType="com.example.nngkxxdp.entity.PartyService">
|
|
|
+ select * from t_party_service where parkId = #{id}
|
|
|
+ </select>
|
|
|
+ <select id="findParkData" resultType="com.example.nngkxxdp.entity.ParkData">
|
|
|
+ select pd.contacts,pd.contacts_phone,pd.contacts_addr from t_park_data pd where id = #{id}
|
|
|
+ </select>
|
|
|
+</mapper>
|