zhibing.pu
2024-08-22 490db2e9cc769bd0aa3571fad345c7a01bc01bdd
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppCouponController.java
@@ -144,8 +144,8 @@
     * 管理后台远程调用 根据优惠券ids 查询对应的发放数量
     * @return 优惠券ids 查询每个优惠券的发放数量
     */
    @PostMapping("/getCountByCouponIds")
    public R<List<Integer>> getCountByCouponIds( String couponIds) {
    @PostMapping("/getCountByCouponIds/{couponIds}")
    public R<List<Integer>> getCountByCouponIds(@PathVariable("couponIds")String couponIds) {
        // 最终结果 和优惠券id一一对应
        List<Integer> res = new ArrayList<>();
        String[] split = couponIds.split(",");
@@ -164,8 +164,8 @@
     * @param couponId
     * @return
     */
    @PostMapping("/getUseCountByCouponId")
    public R<Integer> getUseCountByCouponId(Integer couponId){
    @PostMapping("/getUseCountByCouponId/{couponId}")
    public R<Integer> getUseCountByCouponId(@PathVariable("couponId") Integer couponId){
        return R.ok(tAppCouponService.list(new QueryWrapper<TAppCoupon>()
                .eq("coupon_id", couponId)
                .eq("status",2)).size());