课程重复预订提示调整
This commit is contained in:
2
other/libs/maven_install
Normal file
2
other/libs/maven_install
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mvn install:install-file "-Dfile=framework-core-2.1.5.jar" "-DgroupId=com.ydd.framwork.core" "-DartifactId=framework-core" "-Dversion=2.1.5" "-Dpackaging=jar"
|
||||||
|
mvn install:install-file "-Dfile=wechat-base-1.0.47-RELEASE.jar" "-DgroupId=com.dw.ccm.wechat.base" "-DartifactId=wechat-base" "-Dversion=1.0.47-RELEASE" "-Dpackaging=jar"
|
||||||
@@ -150,6 +150,11 @@ public interface MemberLessonTicketMapper {
|
|||||||
*/
|
*/
|
||||||
void updateMemberStatus(@Param("id") Integer id);
|
void updateMemberStatus(@Param("id") Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断,用户是否购买过课程价格为0的
|
||||||
|
*/
|
||||||
|
Integer findByNoPay(@Param("memberId") Integer memberId,@Param("lessonId") Integer lessonId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断,用户是否购买过课程价格为0的
|
* 判断,用户是否购买过课程价格为0的
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -215,6 +215,10 @@ public class MemberLessonTicketService extends BaseServiceImpl {
|
|||||||
venueLessonService.decide(venueLesson, lessonTicketOrderDTO.getNum());
|
venueLessonService.decide(venueLesson, lessonTicketOrderDTO.getNum());
|
||||||
Integer countByZero = memberLessonTicketMapper.findByZero(memberId, lessonTicketOrderDTO.getLessonId());
|
Integer countByZero = memberLessonTicketMapper.findByZero(memberId, lessonTicketOrderDTO.getLessonId());
|
||||||
if (countByZero != 0) {
|
if (countByZero != 0) {
|
||||||
|
Integer contNoPay = memberLessonTicketMapper.findByNoPay(memberId, lessonTicketOrderDTO.getLessonId());
|
||||||
|
if (contNoPay != 0) {
|
||||||
|
throw new ServiceException("您两分钟内已预订过该课程,请稍候再试");
|
||||||
|
}
|
||||||
throw new ServiceException("不可重复预约相同课程");
|
throw new ServiceException("不可重复预约相同课程");
|
||||||
}
|
}
|
||||||
// 判断是否预约过,价格为0的课程
|
// 判断是否预约过,价格为0的课程
|
||||||
|
|||||||
@@ -728,6 +728,19 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!-- 判断,用户是否购买过课程价格为0的 -->
|
||||||
|
<select id="findByNoPay" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
COUNT(0)
|
||||||
|
FROM
|
||||||
|
sv_member_lesson_ticket
|
||||||
|
WHERE
|
||||||
|
member_id = #{memberId}
|
||||||
|
AND lesson_id = #{lessonId}
|
||||||
|
AND `status` != 2
|
||||||
|
AND pay_status = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 判断,用户是否购买过课程价格为0的 -->
|
<!-- 判断,用户是否购买过课程价格为0的 -->
|
||||||
<select id="findByZero" resultType="java.lang.Integer">
|
<select id="findByZero" resultType="java.lang.Integer">
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
Reference in New Issue
Block a user