jyy
2021-03-09 473c4e9cf23f9e43ae2f93c4da79b2204e34c3f8
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
@@ -57,7 +57,7 @@
     *
     * @return
     */
    public List<CouponReceiveInfoVO> getCartVoCouponList(Long shopId,List<ShopShoppingCart> shopShoppingCarts) {
    public List<CouponReceiveInfoVO> getCartVoCouponList(Long companyId,List<ShopShoppingCart> shopShoppingCarts) {
        //可用优惠券列表
        List<CouponReceiveInfoVO> shopCoupons = new ArrayList<>();
@@ -65,7 +65,7 @@
        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
        //1.找到用户所有的优惠券
        List<CouponReceiveInfoVO> userAllCoupon = shopCouponRecordDao.selectMyCouponByStatus(shopId, bizUser.getOpenId(), AppConstance.MY_COUPON_NOT_USE,
        List<CouponReceiveInfoVO> userAllCoupon = shopCouponRecordDao.selectMyCouponByStatus(companyId, bizUser.getOpenId(), AppConstance.MY_COUPON_NOT_USE,
                null);
        if (CollectionUtils.isNotEmpty(userAllCoupon)) {
            //根据优惠力度排序,优惠力度大的先参与计算
@@ -215,20 +215,20 @@
     * 根据订单状态查询优惠券列表
     *
     *
     * @param shopId
     * @param companyId
     * @param status 1=已使用;2=未使用;3=过期
     * @return
     */
    @Override
    public AjaxResult getMyCouponInfoByStatus(Long shopId, Integer status, PaginationVO pageVo) {
    public AjaxResult getMyCouponInfoByStatus(Long companyId, Integer status, PaginationVO pageVo) {
        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
        // 如果查询使用或未使用状态的优惠券列表
        if (AppConstance.MY_COUPON_USE.equals(status) || AppConstance.MY_COUPON_NOT_USE.equals(status)) {
            List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyCouponByStatus(shopId,bizUser.getOpenId(), status,
            List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyCouponByStatus(companyId,bizUser.getOpenId(), status,
                    pageVo);
            return new AjaxResult(AjaxResult.STATUS_SUCCESS, list);
        }
        List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyPastCoupon(shopId,bizUser.getOpenId(), pageVo);
        List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyPastCoupon(companyId,bizUser.getOpenId(), pageVo);
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, list);
    }