Browse Source

积分修改

dev_shibei_match
wangchao 5 years ago
parent
commit
b3d5e275fa
  1. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java
  2. 7
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java

@ -38,6 +38,7 @@ import com.epmet.service.UserPointStatisticalDailyService;
import com.epmet.utils.DimIdGenerator;
import com.epmet.utils.ModuleConstant;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -53,6 +54,7 @@ import java.util.stream.Collectors;
* @since v1.0.0 2020-07-20
*/
@Service
@Slf4j
public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPointStatisticalDailyDao, UserPointStatisticalDailyEntity> implements UserPointStatisticalDailyService {
@Autowired
@ -131,6 +133,8 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
epmetUserOpenFeignClient.queryUserBaseInfo(userIdParam);
if(myResiInfoResult.success() && null != myResiInfoResult.getData() && !myResiInfoResult.getData().isEmpty()){
if(StringUtils.isBlank(pointRankFormDTO.getCustomerId())) {
//缓存中的customerId是不准确的,前端一定会传customerId,所以不会执行此代码
log.warn("com.epmet.service.impl.UserPointTotalServiceImpl.getPointRanking,传参缺失客户Id,参数:{}",pointRankFormDTO);
//缓存中陌生人游客也有对应的customerId
pointRankFormDTO.setCustomerId(myResiInfoResult.getData().get(NumConstant.ZERO).getCustomerId());
}

7
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java

@ -36,6 +36,7 @@ import com.epmet.service.UserPointTotalService;
import com.epmet.utils.DimIdGenerator;
import com.epmet.utils.ModuleConstant;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
@ -52,8 +53,10 @@ import java.util.stream.Collectors;
* @since v1.0.0 2020-07-20
*/
@Service
@Slf4j
public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao, UserPointTotalEntity> implements UserPointTotalService {
@Autowired
EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@ -145,6 +148,8 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao
epmetUserOpenFeignClient.queryUserBaseInfo(userIdParam);
if(myResiInfoResult.success() && null != myResiInfoResult.getData() && !myResiInfoResult.getData().isEmpty()){
if(StringUtils.isBlank(pointRankFormDTO.getCustomerId())) {
//缓存中的customerId是不准确的,前端一定会传customerId,所以不会执行此代码
log.warn("com.epmet.service.impl.UserPointTotalServiceImpl.getPointRanking,传参缺失客户Id,参数:{}",pointRankFormDTO);
pointRankFormDTO.setCustomerId(myResiInfoResult.getData().get(NumConstant.ZERO).getCustomerId());
}
//微信昵称
@ -169,7 +174,7 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao
return result;
}
}
//如果当前请求是第一页
//如果当前请求是第一页
if(NumConstant.ONE == pointRankFormDTO.getPageNo()) {
ResiPointRankResultDTO myself = null;
Optional<ResiPointRankResultDTO> opt = rankList.stream().filter(obj -> StringUtils.equals(obj.getUserId(), pointRankFormDTO.getUserId())).findFirst();

Loading…
Cancel
Save