44323
2024-01-24 9c66102a4fae1922aac72dc153e3e76b5856bae3
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java
@@ -30,6 +30,8 @@
import javax.annotation.Resource;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
 * @author jqs34
@@ -78,7 +80,16 @@
    @Autowired
    private ShopAuthenticationHftxService shopAuthenticationHftxService;
    @PostMapping("/getShopIdsByUserIds")
    public R<List<Long>> getShopIdsByUserIds(@RequestBody List<Long> userIds)
    {
        // 店铺ids
        List<Long> list = shopService.list(new QueryWrapper<Shop>()
                .in("belong_user_id", userIds)
                .eq("del_flag", 0))
                .stream().map(Shop::getShopId).collect(Collectors.toList());
        return R.ok(list);
    }
    /**
     * 企业微信H5登录
@@ -390,4 +401,31 @@
        return R.ok(userTaskMsgVoList);
    }
    /**
     * @description
     * @author  jqs
     * @date    2023/8/10 23:01
     * @param cityCodes
     * @return  R<List<Long>>
     */
    @PostMapping("/listShopByCityCode")
    public R<List<Shop>> listShopByCityCode(@RequestBody List<String> cityCodes){
        List<Shop> shopIdList = shopService.listShopByCityCode(cityCodes);
        return R.ok(shopIdList);
    }
    /**
     * @description
     * @author  jqs
     * @date    2023/8/10 23:01
     * @return  R<List<Long>>
     */
    @PostMapping("/listShopByIds")
    public R<List<Shop>> listShopByIds(@RequestBody List<String> ids){
        List<Shop> shopIdList = shopService.listByIds(ids);
        return R.ok(shopIdList);
    }
}