折扣
This commit is contained in:
@@ -172,6 +172,8 @@ public class CourseRelearnController {
|
||||
paymentInfo.setAppName("wumen");
|
||||
} else if (buyOrder.getCome()==1) {
|
||||
paymentInfo.setAppName("zmzm");
|
||||
} else if (buyOrder.getCome()==3) {
|
||||
paymentInfo.setAppName("xlkj");
|
||||
}else {
|
||||
paymentInfo.setAppName(buyOrder.getAppName());
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@ public class OfflineActivityController {
|
||||
paymentInfo.setAppName("wumen");
|
||||
} else if (buyOrder.getCome()==1) {
|
||||
paymentInfo.setAppName("zmzm");
|
||||
} else if (buyOrder.getCome()==3) {
|
||||
paymentInfo.setAppName("xlkj");
|
||||
}else {
|
||||
paymentInfo.setAppName(buyOrder.getAppName());
|
||||
}
|
||||
|
||||
@@ -300,6 +300,8 @@ public class UserVipController {
|
||||
paymentInfo.setAppName("wumen");
|
||||
} else if (buyOrder.getCome()==1) {
|
||||
paymentInfo.setAppName("zmzm");
|
||||
} else if (buyOrder.getCome()==3) {
|
||||
paymentInfo.setAppName("xlkj");
|
||||
}else {
|
||||
paymentInfo.setAppName(buyOrder.getAppName());
|
||||
}
|
||||
|
||||
@@ -82,6 +82,10 @@ public class BuyOrder implements Serializable {
|
||||
* 优惠金额
|
||||
*/
|
||||
private BigDecimal districtMoney;
|
||||
/**
|
||||
* VIP优惠金额
|
||||
*/
|
||||
private BigDecimal vipDiscountAmount;
|
||||
/**
|
||||
* 实收金额
|
||||
*/
|
||||
|
||||
@@ -42,6 +42,10 @@ public class ShopProduct implements Serializable {
|
||||
* 商品活动价格
|
||||
*/
|
||||
private BigDecimal activityPrice;
|
||||
/**
|
||||
* 是否有vip折扣
|
||||
*/
|
||||
private Integer isVipPrice;
|
||||
/**
|
||||
* 商品重量
|
||||
*/
|
||||
@@ -186,4 +190,8 @@ public class ShopProduct implements Serializable {
|
||||
//课程id
|
||||
@TableField(exist = false)
|
||||
private List<ShopProductCourseEntity> courseIds;
|
||||
|
||||
//vip价格
|
||||
@TableField(exist = false)
|
||||
private BigDecimal vipPrice;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,15 @@ import java.util.Set;
|
||||
|
||||
public interface UserVipService extends IService<UserVip> {
|
||||
|
||||
boolean noVip();
|
||||
boolean noMedicalVip();
|
||||
boolean isMedicalVip();
|
||||
boolean isAcupunctureVip();
|
||||
boolean istumorVip();
|
||||
boolean isSociologyVip();
|
||||
boolean isPsycheVip();
|
||||
boolean is456SVip();
|
||||
boolean is78SVip();
|
||||
|
||||
//是否是这门课的vip
|
||||
UserVip ownCourseCatalogueByVip(int courseId);
|
||||
|
||||
@@ -30,6 +30,18 @@ public class UserVipServiceImpl extends ServiceImpl<UserVipDao, UserVip> impleme
|
||||
@Autowired
|
||||
private VipBuyConfigDao vipBuyConfigDao;
|
||||
|
||||
@Override
|
||||
public boolean noVip() {
|
||||
List<UserVip> userVipList = userVipDao.selectList(new LambdaQueryWrapper<UserVip>()
|
||||
.eq(UserVip::getUserId, ShiroUtils.getUId())
|
||||
.eq(UserVip::getState,0));
|
||||
if (userVipList.size() > 0) {
|
||||
return false;
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean noMedicalVip() {
|
||||
List<UserVip> userVipList = userVipDao.selectList(new LambdaQueryWrapper<UserVip>()
|
||||
@@ -67,6 +79,23 @@ public class UserVipServiceImpl extends ServiceImpl<UserVipDao, UserVip> impleme
|
||||
public boolean isPsycheVip() {
|
||||
return isVip(8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is456SVip() {
|
||||
if (isVip(4)&&isVip(5)&&isVip(6)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is78SVip() {
|
||||
if (isVip(7)&&isVip(8)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isVip(int type) {
|
||||
List<UserVip> userVipList = userVipDao.selectList(new LambdaQueryWrapper<UserVip>()
|
||||
.eq(UserVip::getUserId, ShiroUtils.getUId())
|
||||
|
||||
Reference in New Issue
Block a user