|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
<resultMap type="com.keao.edu.user.entity.Organization" id="Organization">
|
|
|
<result column="id_" property="id" />
|
|
|
+ <result column="user_id_" property="userId" />
|
|
|
<result column="name_" property="name" />
|
|
|
<result column="contact_name_" property="contactName" />
|
|
|
<result column="contact_phone_" property="contactPhone" />
|
|
@@ -36,8 +37,8 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.keao.edu.user.entity.Organization" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO organization (id_,name_,contact_name_,contact_phone_,level_,parent_organ_id_,parent_organ_id_tag_,settlement_type_,share_profit_amount_,is_allow_arrange_exam_,create_time_,update_time_,tenant_id_)
|
|
|
- VALUES(#{id},#{name},#{contactName},#{contactPhone},#{level},#{parentOrganId},#{parentOrganIdTag},#{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
+ INSERT INTO organization (id_,user_id_,name_,contact_name_,contact_phone_,level_,parent_organ_id_,parent_organ_id_tag_,settlement_type_,share_profit_amount_,is_allow_arrange_exam_,create_time_,update_time_,tenant_id_)
|
|
|
+ VALUES(#{id},#{userId},#{name},#{contactName},#{contactPhone},#{level},#{parentOrganId},#{parentOrganIdTag},#{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
#{shareProfitAmount},#{isAllowArrangeExam,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{tenantId})
|
|
|
</insert>
|
|
|
|
|
@@ -78,6 +79,9 @@
|
|
|
<if test="tenantId != null">
|
|
|
tenant_id_ = #{tenantId},
|
|
|
</if>
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id_ = #{userId},
|
|
|
+ </if>
|
|
|
update_time_ = NOW()
|
|
|
</set> WHERE id_ = #{id}
|
|
|
</update>
|