|
|
@@ -26,6 +26,7 @@ import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.*;
|
|
|
import com.cyksj.mapper.manage.form.FormFieldsDataMapper;
|
|
|
import com.cyksj.mapper.manage.form.QuestionnairePromotionMapper;
|
|
|
+import com.cyksj.mapper.shop.YhShopMapper;
|
|
|
import com.cyksj.model.dto.DoubleVerifyDto;
|
|
|
import com.cyksj.model.dto.GalaxyCoinPayConfigDto;
|
|
|
import com.cyksj.model.dto.QuestionnaireView;
|
|
|
@@ -152,6 +153,8 @@ public class GroupRelationController {
|
|
|
|
|
|
private final BackInfoTranslationsFrontService backInfoTranslationsFrontService;
|
|
|
|
|
|
+ private final YhShopMapper yhShopMapper;
|
|
|
+
|
|
|
private final static Sequence SEQUENCE = new Sequence(0);
|
|
|
|
|
|
@RequestMapping("/get/renewal")
|
|
|
@@ -596,7 +599,7 @@ public class GroupRelationController {
|
|
|
* 推荐平台
|
|
|
*/
|
|
|
@GetMapping("/get/recommend/goods")
|
|
|
- public Result<Page<UserRecommendGoodsFrontView>> getRecommendGoodsViews(@RequestParam(defaultValue = "0") Integer start, @RequestParam(defaultValue = "5") Integer limit) {
|
|
|
+ public Result<Page<UserRecommendGoodsFrontView>> getRecommendGoodsViews(@RequestParam(defaultValue = "0") Integer start, @RequestParam(defaultValue = "5") Integer limit, String customId) {
|
|
|
//推荐用户未购买的车票平台 优先展示ai类平台 然后是影视流媒体
|
|
|
long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
List<Long> userIds = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
@@ -624,7 +627,17 @@ public class GroupRelationController {
|
|
|
if (orders > 0) {
|
|
|
filterCourseGoods = true;
|
|
|
}
|
|
|
- Page<UserRecommendGoodsFrontView> page = groupRelationFrontService.getRecommendGoodsViews(isPayNf, filter_goods_id, filterCourseGoods, start, limit);
|
|
|
+ List<Long> yhShopGoodsIds = null;
|
|
|
+ if (StrUtil.isNotBlank(customId)) {
|
|
|
+ YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
|
|
|
+ .eq(YhShop::getCustomId, customId)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (yhShop != null) {
|
|
|
+ //获取可用的平台
|
|
|
+ yhShopGoodsIds = yhShopMapper.getGoodsIdsByShop(yhShop.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Page<UserRecommendGoodsFrontView> page = groupRelationFrontService.getRecommendGoodsViews(yhShopGoodsIds, isPayNf, filter_goods_id, filterCourseGoods, start, limit);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(page);
|
|
|
}
|
|
|
|