|
@@ -14,7 +14,7 @@
|
|
<result column="contact_phone_" property="contactPhone"/>
|
|
<result column="contact_phone_" property="contactPhone"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
<result column="update_time_" property="updateTime"/>
|
|
<result column="update_time_" property="updateTime"/>
|
|
- <result column="del_flag_" property="delFlag" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
|
|
|
+ <result column="del_flag_" property="delFlag"/>
|
|
<result column="contact_name_" property="contactName"/>
|
|
<result column="contact_name_" property="contactName"/>
|
|
<result column="longitude_latitude_" property="longitudeLatitude"/>
|
|
<result column="longitude_latitude_" property="longitudeLatitude"/>
|
|
<result column="subsidy_" property="subsidy"/>
|
|
<result column="subsidy_" property="subsidy"/>
|
|
@@ -35,11 +35,6 @@
|
|
<!-- 向数据库增加一条记录 -->
|
|
<!-- 向数据库增加一条记录 -->
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.School" useGeneratedKeys="true" keyColumn="id"
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.School" useGeneratedKeys="true" keyColumn="id"
|
|
keyProperty="id">
|
|
keyProperty="id">
|
|
- <!--
|
|
|
|
- <selectKey resultClass="int" keyProperty="id" >
|
|
|
|
- SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
|
|
- </selectKey>
|
|
|
|
- -->
|
|
|
|
INSERT INTO school
|
|
INSERT INTO school
|
|
(id_,name_,organ_id_,address_,contact_phone_,create_time_,update_time_,contact_name_,longitude_latitude_,subsidy_,cooperation_organ_id_,remark_)
|
|
(id_,name_,organ_id_,address_,contact_phone_,create_time_,update_time_,contact_name_,longitude_latitude_,subsidy_,cooperation_organ_id_,remark_)
|
|
VALUES(#{id},#{name},#{organId},#{address},#{contactPhone},now(),now(),#{contactName},#{longitudeLatitude},#{subsidy},#{cooperationOrganId},#{remark})
|
|
VALUES(#{id},#{name},#{organId},#{address},#{contactPhone},now(),now(),#{contactName},#{longitudeLatitude},#{subsidy},#{cooperationOrganId},#{remark})
|
|
@@ -50,7 +45,7 @@
|
|
UPDATE school
|
|
UPDATE school
|
|
<set>
|
|
<set>
|
|
<if test="delFlag != null">
|
|
<if test="delFlag != null">
|
|
- del_flag_ = #{delFlag,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
|
|
|
+ del_flag_ = #{delFlag},
|
|
</if>
|
|
</if>
|
|
<if test="organId != null">
|
|
<if test="organId != null">
|
|
organ_id_ = #{organId},
|
|
organ_id_ = #{organId},
|
|
@@ -93,13 +88,16 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
<!-- 分页查询 -->
|
|
<select id="queryPage" resultMap="School" parameterType="map">
|
|
<select id="queryPage" resultMap="School" parameterType="map">
|
|
- SELECT * FROM school ORDER BY id_
|
|
|
|
|
|
+ SELECT * FROM school
|
|
|
|
+ where del_flag_ != 1
|
|
|
|
+ ORDER BY id_
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
<!-- 查询当前表的总记录数 -->
|
|
<select id="queryCount" resultType="int">
|
|
<select id="queryCount" resultType="int">
|
|
SELECT COUNT(*) FROM school
|
|
SELECT COUNT(*) FROM school
|
|
|
|
+ where del_flag_ != 1
|
|
</select>
|
|
</select>
|
|
<select id="queryByOrganId" resultMap="School">
|
|
<select id="queryByOrganId" resultMap="School">
|
|
SELECT * FROM school
|
|
SELECT * FROM school
|
|
@@ -108,7 +106,7 @@
|
|
organ_id_ = #{organId}
|
|
organ_id_ = #{organId}
|
|
</if>
|
|
</if>
|
|
<if test="delFlag != null">
|
|
<if test="delFlag != null">
|
|
- AND del_flag_ = #{delFlag,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
|
|
|
+ AND del_flag_ = #{delFlag}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|