|
@@ -77,9 +77,9 @@
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentRegistration" useGeneratedKeys="true"
|
|
|
keyColumn="id" keyProperty="id">
|
|
|
INSERT INTO student_registration
|
|
|
- (parents_phone_,id_,user_id_,name_,music_group_id_,current_grade_,current_class_,subject_id_,is_allow_adjust_,kit_purchase_method_,remark_,create_time_,update_time_,parents_name_,parents_company_,payment_status_,last_payment_date_,next_payment_date_,actual_subject_id_)
|
|
|
+ (parents_phone_,id_,user_id_,name_,music_group_id_,current_grade_,current_class_,subject_id_,is_allow_adjust_,kit_purchase_method_,remark_,create_time_,update_time_,parents_name_,parents_company_,payment_status_,actual_subject_id_)
|
|
|
VALUES(#{parentsPhone},#{id},#{userId},#{name},#{musicGroupId},#{currentGrade},#{currentClass},#{subjectId},#{isAllowAdjust,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{kitPurchaseMethod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
- #{remark},now(),now(),#{parentsName},#{parentsCompany},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{lastPaymentDate},#{nextPaymentDate},#{subjectId})
|
|
|
+ #{remark},now(),now(),#{parentsName},#{parentsCompany},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{subjectId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -92,15 +92,6 @@
|
|
|
<if test="subjectId != null">
|
|
|
subject_id_ = #{subjectId},
|
|
|
</if>
|
|
|
- <if test="nextPaymentDate != null">
|
|
|
- next_payment_date_ = #{nextPaymentDate},
|
|
|
- </if>
|
|
|
- <if test="currentGrade != null">
|
|
|
- current_grade_ = #{currentGrade},
|
|
|
- </if>
|
|
|
- <if test="lastPaymentDate != null">
|
|
|
- last_payment_date_ = #{lastPaymentDate},
|
|
|
- </if>
|
|
|
<if test="currentClass != null">
|
|
|
current_class_ = #{currentClass},
|
|
|
</if>
|
|
@@ -256,4 +247,36 @@
|
|
|
<select id="queryByUserIdAndMusicGroupId" resultMap="StudentRegistration" parameterType="map">
|
|
|
select * from student_registration where music_group_id_ = #{musicGroupId} and user_id_ = #{userId}
|
|
|
</select>
|
|
|
+
|
|
|
+ <!-- 根据乐团编号和手机号查询注册乐团注册信息-->
|
|
|
+ <select id="getByPhoneAndMusicGroupId" resultMap="StudentRegistration">
|
|
|
+ SELECT * FROM student_registration WHERE music_group_id_=#{musicGroupId} AND parents_phone_ = #{parentsPhone}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <resultMap type="com.ym.mec.auth.api.entity.SysUser" id="FindSysUser">
|
|
|
+ <result column="id_" property="id"/>
|
|
|
+ <result column="username_" property="username"/>
|
|
|
+ <result column="password_" property="password"/>
|
|
|
+ <result column="salt_" property="salt"/>
|
|
|
+ <result column="phone_" property="phone"/>
|
|
|
+ <result column="avatar_" property="avatar"/>
|
|
|
+ <result column="organ_id_" property="organId"/>
|
|
|
+ <result column="create_time_" property="createTime"/>
|
|
|
+ <result column="update_time_" property="updateTime"/>
|
|
|
+ <result column="lock_flag_" property="lockFlag" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
+ <result column="del_flag_" property="delFlag" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
+ <result column="wx_openid_" property="wxOpenid"/>
|
|
|
+ <result column="qq_openid_" property="qqOpenid"/>
|
|
|
+ <result column="user_type_" property="userType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
+ <result column="gender_" property="gender"/>
|
|
|
+ <result column="nation_" property="nation"/>
|
|
|
+ <result column="birthdate_" property="birthdate"/>
|
|
|
+ <result column="email_" property="email"/>
|
|
|
+ <result column="im_token_" property="imToken"/>
|
|
|
+ <result column="id_card_no_" property="idCardNo"/>
|
|
|
+ <result column="wechat_id_" property="wechatId"/>
|
|
|
+ </resultMap>
|
|
|
+ <select id="getSysUserByPhone" resultMap="FindSysUser">
|
|
|
+ SELECT * FROM sys_user WHERE phone_ = #{phone}
|
|
|
+ </select>
|
|
|
</mapper>
|