zouxuan 5 роки тому
батько
коміт
46afa94b65

+ 2 - 0
mec-biz/src/main/resources/config/mybatis/StudentGoodsSellMapper.xml

@@ -155,6 +155,7 @@
 	</resultMap>
 	<sql id="queryStudentPaymentOrdersSql">
 		<where>
+				spo.type_ IN ('GOODS_SELL','APPLY','SUBJECT_CHANGE') AND so.id_ IS NOT NULL
 			<if test="status != null">
 				AND spo.status_ = #{status}
 			</if>
@@ -178,6 +179,7 @@
 	<select id="countStudentPaymentOrders" resultType="java.lang.Integer">
 		SELECT COUNT(DISTINCT spo.id_)
 		FROM student_payment_order spo
+		LEFT JOIN sell_order so ON so.order_no_ = spo.order_no_
 		<include refid="queryStudentPaymentOrdersSql"/>
 	</select>
 </mapper>

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/RepairController.java

@@ -150,7 +150,7 @@ public class RepairController extends BaseController {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
         queryInfo.setStudentId(sysUser.getId());
-        return succeed(studentGoodsSellService.queryStudentPaymentOrders(queryInfo));
+        return succeed(studentGoodsSellService.queryStudentGoodsOrders(queryInfo));
     }
 
     @ApiOperation(value = "获取学员商品订单")