|
@@ -992,7 +992,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
}
|
|
|
|
|
|
List<User> users = iUserService.getUserByTelNotTenant(bo.getTelphone());
|
|
|
- if (CollectionUtils.isNotEmpty(users)) {
|
|
|
+ if (CollectionUtils.isEmpty(users)) {
|
|
|
throw new CustomException("通过手机号获取用户信息失败");
|
|
|
}
|
|
|
//获取用户订单商品信息
|
|
@@ -1049,15 +1049,15 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
SysConfig sysConfig = iSysConfigService.getOne(new LambdaQueryWrapper<SysConfig>()
|
|
|
.eq(SysConfig::getConfigKey, "wx.small.appid")
|
|
|
.eq(SysConfig::getTenantId, goodsVo.getTenantId()));
|
|
|
- if (ObjectUtils.isNull(sysConfig)) {
|
|
|
- throw new CustomException("获取小程序appId失败");
|
|
|
+ if (ObjectUtils.isNotNull(sysConfig)) {
|
|
|
+ goodsVo.setWeAppId(sysConfig.getConfigValue());
|
|
|
}
|
|
|
//课程
|
|
|
List<Long> courseIds = iGoodsCourseService.getCourseIdsByGoodsAndTenant(goodsVo.getGoodsId(), goodsVo.getTenantId());
|
|
|
if (CollectionUtils.isNotEmpty(courseIds) && courseIds.size() == 1) {
|
|
|
goodsVo.setCourseId(courseIds.get(0));
|
|
|
}
|
|
|
- goodsVo.setWeAppId(sysConfig.getConfigValue());
|
|
|
+
|
|
|
if (goodsVo.getCourseType() == 2) {
|
|
|
//题库
|
|
|
goodsVo.setToWeAppPagePath("/pages/questionBank/index");
|