master:系统列表状态右下角数量调整;
parent
a5335052c3
commit
1aa40f8e58
|
|
@ -9,7 +9,7 @@ import com.ruoyi.xkt.dto.advertRound.AdvertRoundStorePageDTO;
|
|||
import com.ruoyi.xkt.dto.advertRound.AdvertRoundStorePageResDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -65,9 +65,11 @@ public interface AdvertRoundMapper extends BaseMapper<AdvertRound> {
|
|||
/**
|
||||
* 推广状态数量
|
||||
*
|
||||
* @param sixMonthAgo 6个月前
|
||||
* @param now 当前时间
|
||||
* @return AdminAdRoundStatusCountResDTO
|
||||
*/
|
||||
AdminAdRoundStatusCountResDTO statusCount();
|
||||
AdminAdRoundStatusCountResDTO statusCount(@Param("sixMonthAgo") Date sixMonthAgo, @Param("now") Date now);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.ruoyi.xkt.dto.userShoppingCart.ShopCartPageResDTO;
|
|||
import com.ruoyi.xkt.dto.userShoppingCart.ShopCartStatusCountResDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -38,9 +39,13 @@ public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {
|
|||
/**
|
||||
* 获取用户进货车各状态数量
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId 用户ID
|
||||
* @param sixMonthAgo 6个月前
|
||||
* @param now 现在
|
||||
* @return ShopCartStatusCountResDTO
|
||||
*/
|
||||
ShopCartStatusCountResDTO getStatusNum(@Param("userId") Long userId);
|
||||
ShopCartStatusCountResDTO getStatusNum(@Param("userId") Long userId,
|
||||
@Param("sixMonthAgo") Date sixMonthAgo,
|
||||
@Param("now") Date now);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.ruoyi.xkt.domain.StoreProductDemand;
|
|||
import com.ruoyi.xkt.dto.storeProductDemand.StoreProdDemandStatusCountResDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -35,8 +36,12 @@ public interface StoreProductDemandMapper extends BaseMapper<StoreProductDemand>
|
|||
/**
|
||||
* 查询各状态数量
|
||||
*
|
||||
* @param storeId 档口ID
|
||||
* @param storeId 档口ID
|
||||
* @param sixMonthAgo 六个月前的时间
|
||||
* @param now 当前时间
|
||||
* @return StoreProdDemandStatusCountResDTO
|
||||
*/
|
||||
StoreProdDemandStatusCountResDTO getStatusNum(@Param("storeId") Long storeId);
|
||||
StoreProdDemandStatusCountResDTO getStatusNum(@Param("storeId") Long storeId,
|
||||
@Param("sixMonthAgo") Date sixMonthAgo,
|
||||
@Param("now") Date now);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,10 +113,14 @@ public interface StoreProductMapper extends BaseMapper<StoreProduct> {
|
|||
/**
|
||||
* 获取档口各个状态的数量
|
||||
*
|
||||
* @param storeId 档口ID
|
||||
* @param storeId 档口ID
|
||||
* @param sixMonthAgo 六个月前
|
||||
* @param now 当前时间
|
||||
* @return StoreProdStatusCountResDTO
|
||||
*/
|
||||
StoreProdStatusCountResDTO getStatusNum(@Param("storeId") Long storeId);
|
||||
StoreProdStatusCountResDTO getStatusNum(@Param("storeId") Long storeId,
|
||||
@Param("sixMonthAgo") Date sixMonthAgo,
|
||||
@Param("now") Date now);
|
||||
|
||||
/**
|
||||
* 获取档口各个状态的分类数量
|
||||
|
|
|
|||
|
|
@ -39,8 +39,12 @@ public interface UserFavoritesMapper extends BaseMapper<UserFavorites> {
|
|||
/**
|
||||
* 获取用户收藏商品各状态数量
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId 用户ID
|
||||
* @param sixMonthAgo 六个月前
|
||||
* @param now 当前时间
|
||||
* @return
|
||||
*/
|
||||
UserFavStatusCountResDTO getStatusNum(@Param("userId") Long userId);
|
||||
UserFavStatusCountResDTO getStatusNum(@Param("userId") Long userId,
|
||||
@Param("sixMonthAgo") Date sixMonthAgo,
|
||||
@Param("now") Date now);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -281,7 +281,9 @@ public class AdminAdvertRoundServiceImpl implements IAdminAdvertRoundService {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public AdminAdRoundStatusCountResDTO statusCount() {
|
||||
return this.advertRoundMapper.statusCount();
|
||||
final Date now = java.sql.Date.valueOf(LocalDate.now().plusDays(1));
|
||||
final Date sixMonthAgo = java.sql.Date.valueOf(LocalDate.now().minusMonths(6));
|
||||
return this.advertRoundMapper.statusCount(sixMonthAgo, now);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.ruoyi.xkt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
|
@ -9,6 +10,7 @@ import com.ruoyi.common.constant.HttpStatus;
|
|||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.page.Page;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.xkt.domain.*;
|
||||
import com.ruoyi.xkt.dto.storeProductFile.StoreProdMainPicDTO;
|
||||
|
|
@ -24,6 +26,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -311,7 +314,9 @@ public class ShoppingCartServiceImpl implements IShoppingCartService {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public ShopCartStatusCountResDTO getStatusNum() {
|
||||
return this.shopCartMapper.getStatusNum(SecurityUtils.getUserId());
|
||||
final Date now = java.sql.Date.valueOf(LocalDate.now().plusDays(1));
|
||||
final Date sixMonthAgo = java.sql.Date.valueOf(LocalDate.now().minusMonths(6));
|
||||
return this.shopCartMapper.getStatusNum(SecurityUtils.getUserId(), sixMonthAgo, now);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import org.apache.ibatis.executor.BatchResult;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -60,7 +61,9 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public StoreProdDemandStatusCountResDTO getStatusNum(Long storeId) {
|
||||
return this.storeProdDemandMapper.getStatusNum(storeId);
|
||||
final Date now = java.sql.Date.valueOf(LocalDate.now().plusDays(1));
|
||||
final Date sixMonthAgo = java.sql.Date.valueOf(LocalDate.now().minusMonths(6));
|
||||
return this.storeProdDemandMapper.getStatusNum(storeId, sixMonthAgo, now);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -854,7 +854,9 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public StoreProdStatusCountResDTO getStatusNum(Long storeId) {
|
||||
return this.storeProdMapper.getStatusNum(storeId);
|
||||
final Date now = java.sql.Date.valueOf(LocalDate.now().plusDays(1));
|
||||
final Date sixMonthAgo = java.sql.Date.valueOf(LocalDate.now().minusMonths(6));
|
||||
return this.storeProdMapper.getStatusNum(storeId, sixMonthAgo, now);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -265,7 +266,9 @@ public class UserFavoritesServiceImpl implements IUserFavoritesService {
|
|||
if (ObjectUtils.isEmpty(userId)) {
|
||||
throw new ServiceException("用户未登录,请先登录!", HttpStatus.ERROR);
|
||||
}
|
||||
return this.userFavMapper.getStatusNum(userId);
|
||||
final Date now = java.sql.Date.valueOf(LocalDate.now().plusDays(1));
|
||||
final Date sixMonthAgo = java.sql.Date.valueOf(LocalDate.now().minusMonths(6));
|
||||
return this.userFavMapper.getStatusNum(userId, sixMonthAgo, now);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
advert_round ar
|
||||
WHERE
|
||||
ar.del_flag = 0
|
||||
AND ar.create_time BETWEEN #{sixMonthAgo} AND #{now}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
sc.del_flag = 0
|
||||
AND sc.user_id = #{userId}
|
||||
AND sc.create_time BETWEEN #{sixMonthAgo} AND #{now}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
store_product_demand spd
|
||||
WHERE
|
||||
spd.del_flag = 0 AND spd.store_id = #{storeId}
|
||||
AND spd.create_time between #{sixMonthAgo} AND #{now}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
sp.del_flag = 0
|
||||
AND sp.store_id = #{storeId}
|
||||
AND sp.create_time between #{sixMonthAgo} AND #{now}
|
||||
</select>
|
||||
|
||||
<select id="getStatusCateNum" resultType="com.ruoyi.xkt.dto.storeProduct.StoreProdStatusCateCountDTO">
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
uf.del_flag = 0
|
||||
AND uf.user_id = #{userId}
|
||||
AND uf.create_time BETWEEN #{sixMonthAgo} AND #{now}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue