zouxuan 5 years ago
parent
commit
57332496c4

+ 3 - 3
src/main/java/com/ym/mec/collectfee/controller/UserController.java

@@ -104,10 +104,10 @@ public class UserController extends BaseController {
      * 推送用户到mec注册
      * 推送用户到mec注册
      * @return
      * @return
      */
      */
-    @PostMapping("/userRegister")
+    /*@PostMapping("/userRegister")
     public Object userRegister(String phone){
     public Object userRegister(String phone){
         return succeed(applyInfoService.userRegister(phone));
         return succeed(applyInfoService.userRegister(phone));
-    }
+    }*/
 
 
     /**
     /**
      * 获取乐团课程组列表
      * 获取乐团课程组列表
@@ -176,6 +176,6 @@ public class UserController extends BaseController {
     public Object updateUser(ApplyInfo applyInfo){
     public Object updateUser(ApplyInfo applyInfo){
         applyInfo.setUpdateTime(new Date());
         applyInfo.setUpdateTime(new Date());
         applyInfoService.update(applyInfo);
         applyInfoService.update(applyInfo);
-        return succeed();
+        return succeed("修改成功");
     }
     }
 }
 }

+ 16 - 1
src/main/resources/config/mybatis/AccountMapper.xml

@@ -36,7 +36,22 @@
 	
 	
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.Account">
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.Account">
-		UPDATE `account` SET has_routing = #{hasRouting},seller_no = #{sellerNo},max_routing = #{maxRouting},branch_id = #{branchId},id = #{id} WHERE id = #{id} 
+		UPDATE `account`
+		<set>
+			<if test="hasRouting != null">
+				has_routing = #{hasRouting},
+			</if>
+			<if test="sellerNo != null">
+				seller_no = #{sellerNo},
+			</if>
+			<if test="maxRouting != null">
+				max_routing = #{maxRouting},
+			</if>
+			<if test="branchId != null">
+				branch_id = #{branchId},
+			</if>
+		</set>
+		 WHERE id = #{id}
 	</update>
 	</update>
 	
 	
 	<!-- 根据主键删除一条记录 -->
 	<!-- 根据主键删除一条记录 -->

+ 64 - 2
src/main/resources/config/mybatis/ApplyInfoMapper.xml

@@ -74,7 +74,64 @@
 	
 	
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.ApplyInfo">
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.ApplyInfo">
-		UPDATE apply_info SET class_id_ = #{classId},user_id_ = #{userId},branch_id_ = #{branchId},push_status_ = #{pushStatus},sub_id_ = #{subId},school_ = #{school},is_adjust_ = #{isAdjust},status_ = #{status},id_ = #{id},g_class_ = #{gClass},sex_ = #{sex},birthday_ = #{birthday},name_ = #{name},city_ = #{city},patriarch_phone_ = #{patriarchPhone},patriarch_name_ = #{patriarchName},patriarch_unit_ = #{patriarchUnit},update_time_ = #{updateTime},grade_ = #{grade} WHERE id_ = #{id}
+		UPDATE apply_info
+		<set>
+			<if test="classId != null">
+				class_id_ = #{classId},
+			</if>
+			<if test="userId != null">
+				user_id_ = #{userId},
+			</if>
+			<if test="branchId != null">
+				branch_id_ = #{branchId},
+			</if>
+			<if test="pushStatus != null">
+				push_status_ = #{pushStatus},
+			</if>
+			<if test="subId != null">
+				sub_id_ = #{subId},
+			</if>
+			<if test="school != null">
+				school_ = #{school},
+			</if>
+			<if test="isAdjust != null">
+				is_adjust_ = #{isAdjust},
+			</if>
+			<if test="status != null">
+				status_ = #{status},
+			</if>
+			<if test="gClass != null">
+				g_class_ = #{gClass},
+			</if>
+			<if test="sex != null">
+				sex_ = #{sex},
+			</if>
+			<if test="birthday != null">
+				birthday_ = #{birthday},
+			</if>
+			<if test="name != null">
+				name_ = #{name},
+			</if>
+			<if test="city != null">
+				city_ = #{city},
+			</if>
+			<if test="patriarchPhone != null">
+				patriarch_phone_ = #{patriarchPhone},
+			</if>
+			<if test="patriarchName != null">
+				patriarch_name_ = #{patriarchName},
+			</if>
+			<if test="patriarchUnit != null">
+				patriarch_unit_ = #{patriarchUnit},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="grade != null">
+				grade_ = #{grade}
+			</if>
+		</set>
+		WHERE id_ = #{id}
 	</update>
 	</update>
 
 
 	<!-- 根据主键删除一条记录 -->
 	<!-- 根据主键删除一条记录 -->
@@ -114,7 +171,11 @@
 	</select>
 	</select>
 
 
 	<select id="getUserRegisterVIewDetail" resultType="java.util.Map">
 	<select id="getUserRegisterVIewDetail" resultType="java.util.Map">
-		SELECT ai.*,cgi.sub_name_,cgi.plan_num_,cgi.fee_amount_,cgi.fee_type_ FROM apply_info ai LEFT JOIN course_group_info cgi ON ai.course_id_ = cgi.id_ WHERE ai.id_ = #{stuId}
+		SELECT ai.sub_id_,ai.is_adjust_,ai.status_,ai.sex_,ai.name_,ai.patriarch_phone_,ai.sub_id_,
+		ai.grade_,ai.school_,ai.id_,ai.g_class_,ai.city_,ai.patriarch_name_,ai.patriarch_unit_,ai.course_id_,
+		cgi.sub_name_,cgi.plan_num_,cgi.fee_amount_,cgi.fee_type_,s.status_ push_status_
+		FROM apply_info ai LEFT JOIN course_group_info cgi ON ai.course_id_ = cgi.id_
+		 LEFT JOIN school s ON ai.class_id_ = s.id_ WHERE ai.id_ = #{stuId}
 	</select>
 	</select>
 
 
 	<select id="queryUserPage" resultMap="ApplyInfoPage" parameterType="map">
 	<select id="queryUserPage" resultMap="ApplyInfoPage" parameterType="map">
@@ -122,6 +183,7 @@
 		LEFT JOIN course_group_info cgi ON ai.sub_id_ = cgi.sub_id_
 		LEFT JOIN course_group_info cgi ON ai.sub_id_ = cgi.sub_id_
 		LEFT JOIN `order` o ON ai.id_ = o.user_id
 		LEFT JOIN `order` o ON ai.id_ = o.user_id
 		<include refid="studentsPage"/>
 		<include refid="studentsPage"/>
+		ORDER BY ai.update_time_ DESC
 		<include refid="global.limit"/>
 		<include refid="global.limit"/>
 	</select>
 	</select>
 
 

+ 13 - 1
src/main/resources/config/mybatis/BranchMapper.xml

@@ -42,7 +42,19 @@
 
 
     <!-- 根据主键查询一条记录 -->
     <!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.Branch">
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.Branch">
-		UPDATE branch SET city_ = #{city},branch_id_ = #{branchId},branch_name_ = #{branchName},province_ = #{province} WHERE branch_id_ = #{branchId} 
+		UPDATE branch
+		<set>
+			<if test="city != null">
+				city_ = #{city},
+			</if>
+			<if test="branchName != null">
+				branch_name_ = #{branchName},
+			</if>
+			<if test="province != null">
+				province_ = #{province}
+			</if>
+		</set>
+		WHERE branch_id_ = #{branchId}
 	</update>
 	</update>
 	
 	
 	<!-- 根据主键删除一条记录 -->
 	<!-- 根据主键删除一条记录 -->

+ 31 - 1
src/main/resources/config/mybatis/CourseGroupInfoMapper.xml

@@ -42,7 +42,37 @@
 	
 	
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.CourseGroupInfo">
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.CourseGroupInfo">
-		UPDATE course_group_info SET class_id_ = #{classId},sub_id_ = #{subId},plan_num_ = #{planNum},fee_type_ = #{feeType},id_ = #{id},fee_amount_ = #{feeAmount},sub_name_ = #{subName},update_time_ = #{updateTime},reg_num_ = #{regNum},name_ = #{name},create_time_ = #{createTime} WHERE id_ = #{id}
+		UPDATE course_group_info
+		<set>
+			<if test="classId != null">
+				class_id_ = #{classId},
+			</if>
+			<if test="subId != null">
+				sub_id_ = #{subId},
+			</if>
+			<if test="planNum != null">
+				plan_num_ = #{planNum},
+			</if>
+			<if test="feeAmount != null">
+				fee_amount_ = #{feeAmount},
+			</if>
+			<if test="feeType != null">
+				fee_type_ = #{feeType},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="subName != null">
+				sub_name_ = #{subName},
+			</if>
+			<if test="regNum != null">
+				reg_num_ = #{regNum},
+			</if>
+			<if test="name != null">
+				name_ = #{name},
+			</if>
+		</set>
+		WHERE id_ = #{id}
 	</update>
 	</update>
 	
 	
 	<!-- 根据主键删除一条记录 -->
 	<!-- 根据主键删除一条记录 -->

+ 64 - 2
src/main/resources/config/mybatis/OrderMapper.xml

@@ -55,8 +55,70 @@
 
 
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.Order">
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.Order">
-		UPDATE order SET tui_fee = #{tuiFee},goods_fee = #{goodsFee},sd_name = #{sdName},sd_fee = #{sdFee},
-		amount = #{amount},create_time = #{createTime},class_id = #{classId},pay = #{pay},u_account = #{uAccount},remark = #{remark},oid = #{oid},batch_num = #{batchNum},pay_time = #{payTime},bank = #{bank},balance = #{balance},user_id = #{userId},voicy_part = #{voicyPart},po_name = #{poName},id = #{id},pay_id = #{payId},account = #{account},status = #{status} WHERE id = #{id}
+		UPDATE order
+		<set>
+			<if test="tuiFee != null">
+				tui_fee = #{tuiFee},
+			</if>
+			<if test="goodsFee != null">
+				goods_fee = #{goodsFee},
+			</if>
+			<if test="sdName != null">
+				sd_name = #{sdName},
+			</if>
+			<if test="sdFee != null">
+				sd_fee = #{sdFee},
+			</if>
+			<if test="amount != null">
+				amount = #{amount},
+			</if>
+			<if test="classId != null">
+				class_id = #{classId},
+			</if>
+			<if test="pay != null">
+				pay = #{pay},
+			</if>
+			<if test="uAccount != null">
+				u_account = #{uAccount},
+			</if>
+			<if test="remark != null">
+				remark = #{remark},
+			</if>
+			<if test="oid != null">
+				oid = #{oid},
+			</if>
+			<if test="batchNum != null">
+				batch_num = #{batchNum},
+			</if>
+			<if test="payTime != null">
+				pay_time = #{payTime},
+			</if>
+			<if test="bank != null">
+				bank = #{bank},
+			</if>
+			<if test="balance != null">
+				balance = #{balance},
+			</if>
+			<if test="userId != null">
+				user_id = #{userId},
+			</if>
+			<if test="voicyPart != null">
+				voicy_part = #{voicyPart},
+			</if>
+			<if test="poName != null">
+				po_name = #{poName},
+			</if>
+			<if test="account != null">
+				account = #{account},
+			</if>
+			<if test="payId != null">
+				pay_id = #{payId},
+			</if>
+			<if test="status != null">
+				status = #{status},
+			</if>
+		</set>
+		WHERE id = #{id}
 	</update>
 	</update>
 
 
 	<!-- 根据主键删除一条记录 -->
 	<!-- 根据主键删除一条记录 -->

+ 28 - 1
src/main/resources/config/mybatis/SchoolMapper.xml

@@ -41,7 +41,34 @@
 	
 	
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.School">
 	<update id="update" parameterType="com.ym.mec.collectfee.entity.School">
-		UPDATE school SET status_ = #{status},school_id_ = #{schoolId},e_deposit__ = #{eDeposit},school_name_ = #{schoolName},update_time_ = #{updateTime},branch_id_ = #{branchId},branch_name_ = #{branchName},name_ = #{name},create_time_ = #{createTime} WHERE id_ = #{id}
+		UPDATE school
+		<set>
+			<if test="status != null">
+				status_ = #{status},
+			</if>
+			<if test="schoolId != null">
+				school_id_ = #{schoolId},
+			</if>
+			<if test="eDeposit != null">
+				e_deposit__ = #{eDeposit},
+			</if>
+			<if test="schoolName != null">
+				school_name_ = #{schoolName},
+			</if>
+			<if test="branchId != null">
+				branch_id_ = #{branchId},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="branchName != null">
+				branch_name_ = #{branchName},
+			</if>
+			<if test="name != null">
+				name_ = #{name},
+			</if>
+		</set>
+		WHERE id_ = #{id}
 	</update>
 	</update>
 	
 	
 	<!-- 根据主键删除一条记录 -->
 	<!-- 根据主键删除一条记录 -->