Quellcode durchsuchen

修改订单bug

Wei Ruifeng vor 4 Jahren
Ursprung
Commit
3414429469

+ 4 - 4
lift-ud-service/src/main/java/cn/com/ty/lift/ud/chat/mapper/LiftCaseMapper.xml

@@ -438,7 +438,7 @@
         LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
         LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
         left join question_bank que on que.lift_case_id = t.id
-        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'3,4')
+        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'3')
         union
         SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
         que.examine_flag examineFlag,que.not_examine_reason notExamineReason
@@ -448,7 +448,7 @@
         LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
         LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
         left join question_bank que on que.lift_case_id = t.id
-        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3,4')
+        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'4')
     )temp
     ORDER BY temp.create_time DESC
     limit #{query.pageIndex},#{query.pageSize}
@@ -463,7 +463,7 @@
         LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
         LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
         left join question_bank que on que.lift_case_id = t.id
-        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'3,4')
+        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'3')
         union
         SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
         que.examine_flag examineFlag,que.not_examine_reason notExamineReason
@@ -473,7 +473,7 @@
         LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
         LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
         left join question_bank que on que.lift_case_id = t.id
-        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3,4')
+        where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'4')
     )temp
   </select>
   <!-- 查询用户待评价诊单 -->

+ 41 - 27
lift-ud-service/src/main/java/cn/com/ty/lift/ud/userInfo/mapper/UserInfoMapper.xml

@@ -224,35 +224,49 @@
 
 
 	<select id="getUserRewardList" resultType="cn.com.ty.lift.ud.userInfo.mapper.entity.UserRewardListVo">
-	select * from(
-		select
-			sv.data_id id,
-			sv.user_id userId,
-			CONCAT("电梯学堂","-",info.name) targetUserName,
-			bill.user_id targetUserId,
-			info.avatar_url targetAvatarUrl,
-			bill.amount amount,
-			sv.create_time createTime
-		from school_video_operate sv
-		left join user_bill bill on bill.flow_num=sv.third_order_sn and bill.user_id!=#{userId}
-		left join user_info info on info.user_id = bill.user_id
-		where sv.type = 4 and sv.user_id=#{userId}
+	
+			SELECT
+				a.target_user_id targetUserId,
+				a.user_id userId,
+				b.`name` targetUserName,
+				a.amount amount,
+				a.create_time,
+				b.avatar_url targetAvatarUrl
+			FROM
+				user_bill a
+			LEFT JOIN user_info b ON a.user_id = b.user_id
+			WHERE
+				a.business_type = 2
+			AND a.user_id = #{userId}
+<!-- 	select * from( -->
+<!-- 		select -->
+<!-- 			sv.data_id id, -->
+<!-- 			sv.user_id userId, -->
+<!-- 			CONCAT("电梯学堂","-",info.name) targetUserName, -->
+<!-- 			bill.user_id targetUserId, -->
+<!-- 			info.avatar_url targetAvatarUrl, -->
+<!-- 			bill.amount amount, -->
+<!-- 			sv.create_time createTime -->
+<!-- 		from school_video_operate sv -->
+<!-- 		left join user_bill bill on bill.flow_num=sv.third_order_sn and bill.user_id!=#{userId} -->
+<!-- 		left join user_info info on info.user_id = bill.user_id -->
+<!-- 		where sv.type = 4 and sv.user_id=#{userId} -->
 
-		union
+<!-- 		union -->
 
-		select
-			sv.data_id id,
-			sv.user_id userId,
-			CONCAT("案例中心","-",info.name) targetUserName,
-			bill.user_id targetUserId,
-			info.avatar_url targetAvatarUrl,
-			bill.amount amount,
-			sv.create_time createTime
-		from question_operate sv
-		left join user_bill bill on bill.flow_num=sv.order_serial_number and bill.user_id!=#{userId}
-		left join user_info info on info.user_id = bill.user_id
-		where sv.type = 4 and sv.user_id=#{userId}
-	) temp order by create_time;
+<!-- 		select -->
+<!-- 			sv.data_id id, -->
+<!-- 			sv.user_id userId, -->
+<!-- 			CONCAT("案例中心","-",info.name) targetUserName, -->
+<!-- 			bill.user_id targetUserId, -->
+<!-- 			info.avatar_url targetAvatarUrl, -->
+<!-- 			bill.amount amount, -->
+<!-- 			sv.create_time createTime -->
+<!-- 		from question_operate sv -->
+<!-- 		left join user_bill bill on bill.flow_num=sv.order_serial_number and bill.user_id!=#{userId} -->
+<!-- 		left join user_info info on info.user_id = bill.user_id -->
+<!-- 		where sv.type = 4 and sv.user_id=#{userId} -->
+<!-- 	) temp order by create_time; -->
 
 	</select>
 </mapper>