删除优惠卷
新版优惠卷
This commit is contained in:
@@ -8,6 +8,7 @@ import com.peanut.modules.common.dao.*;
|
||||
import com.peanut.modules.common.entity.*;
|
||||
import com.peanut.modules.common.service.ClassEntityService;
|
||||
import com.peanut.modules.common.service.ClassExamService;
|
||||
import com.peanut.modules.common.service.CouponHistoryService;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -34,6 +35,8 @@ public class CommonConsumer {
|
||||
private UserCourseBuyDao userCourseBuyDao;
|
||||
@Autowired
|
||||
private ClassEntityService classEntityService;
|
||||
@Autowired
|
||||
private CouponHistoryService couponHistoryService;
|
||||
|
||||
@RabbitListener(queues = DelayQueueConfig.COMMON_QUEUE)
|
||||
public void commonConsumer(String typeAndParam) {
|
||||
@@ -76,11 +79,14 @@ public class CommonConsumer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
//优惠卷过期
|
||||
if ("couponExpire".equals(typeAndParams[0])){
|
||||
CouponHistory couponHistory = couponHistoryService.getById(typeAndParams[1]);
|
||||
if (couponHistory != null&&couponHistory.getStatus()==0) {
|
||||
couponHistory.setStatus(2);
|
||||
couponHistoryService.updateById(couponHistory);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user