Browse Source

/. 报表-001.1

release_toaliyun_real
xhxu 4 years ago
parent
commit
8ddcfa6308
9 changed files with 26 additions and 28 deletions
  1. +1
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java
  2. +2
    -8
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java
  3. +2
    -6
      mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreRulesController.java
  4. +1
    -1
      mallinkBApi/src/main/java/com/iformall/controller/WxMallController.java
  5. +1
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java
  6. +2
    -2
      mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
  7. +4
    -1
      mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java
  8. +6
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  9. +7
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxUserVisitServiceImpl.java

+ 1
- 2
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java View File

@@ -59,8 +59,7 @@ public class WxMallController extends BaseController {
logger.error("未配置相应的mall");
return new ResultData(Result.ERROR, "未配置相应的mall");
}
if (mall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode()) &&
StringUtils.isBlank(mall.getParentTenantId())) {
if (wxMallService.isgroupSupport(mall)) {
mall.setSubMalls(wxMallService.getSubByParentTenantId(mall.getTenantId()));
}
mall.setValidPrompt(wxMallService.mallValid(getUserId(),mall));


+ 2
- 8
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java View File

@@ -684,10 +684,7 @@ public class WxProjectConfigController extends BaseController {
// }
TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(tenantId);
WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity);
if(parentWxMall == null || parentWxMall.getSaleType() != 100
|| !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())
|| StringUtils.isNotBlank(parentWxMall.getParentTenantId())){
if(!wxMallService.isgroupSupport(tenantEntity)){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
}
wxProjectConfigService.initSubmall(tenantId,subTenantIds);
@@ -721,10 +718,7 @@ public class WxProjectConfigController extends BaseController {
TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(tenantId);

WxMall parentWxMall = wxMallService.getByTenantInfo(tenantEntity);
if(parentWxMall == null || parentWxMall.getSaleType() != 100
|| !parentWxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())
|| StringUtils.isNotBlank(parentWxMall.getParentTenantId())){
if(!wxMallService.isgroupSupport(tenantEntity)){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
}
StringBuilder sb = new StringBuilder();


+ 2
- 6
mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreRulesController.java View File

@@ -58,9 +58,7 @@ public class WxScoreRulesController extends BaseController {
wxScoreRules.updateTenantInfo(tenantEntity);
}else if(wxScoreRules.getType().equals(EnumScoreRules.CREDIT_DOUBLE.getCode())){
TenantEntity tenantEntity = getTenantInfo();
WxMall mall = wxMallService.getByTenantId(getUser().getTenantId());
if(mall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())
&& StringUtils.isBlank(mall.getParentTenantId())){
if(wxMallService.isgroupSupport(tenantEntity)){
return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(), "集团用户无此权限");
}
wxScoreRules.updateTenantInfo(tenantEntity);
@@ -88,9 +86,7 @@ public class WxScoreRulesController extends BaseController {
@SystemControllerLog(description = "积分-配置")
public ResultData creditDoubleRulesList() {
logger.debug("[" + getIpAddr() + "] creditDoubleRulesList::list");
WxMall mall = wxMallService.getByTenantId(getUser().getTenantId());
if(mall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())
&& StringUtils.isBlank(mall.getParentTenantId())){
if(wxMallService.isgroupSupport(getUser())){
return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(), "集团用户无此权限");
}
WxScoreRules scoreRules = wxScoreRulesService.getCreditDoubleRules(getTenantInfo().getTenantId());


+ 1
- 1
mallinkBApi/src/main/java/com/iformall/controller/WxMallController.java View File

@@ -74,7 +74,7 @@ public class WxMallController extends BaseController {
if (mall == null) {
return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND);
}
if (mall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())) {
if (wxMallService.isgroupSupport(mall)) {
List<WxMall> mallList = wxMallService.getSubByParentTenantId(mall.getTenantId());
mall.setSubMalls(mallList);
}


+ 1
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java View File

@@ -206,7 +206,7 @@ public class WxUserGrantController extends BaseController {
if(StringUtils.isNotBlank(wxMall.getParentTenantId())){
mallList = mallService.getSubByParentTenantId(wxMall.getParentTenantId());
}
if (wxMall.getGroupSupport().equals(EnumGroupSupport.SUPPORT.getCode())) {
if (mallService.isgroupSupport(wxMall)) {
mallList = mallService.getSubByParentTenantId(wxMall.getTenantId());
}
if(mallList != null && mallList.size() >0){


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java View File

@@ -134,9 +134,9 @@ public interface WxCUserBasicInfoService {

void importOneMem(String importKey, List<WxTags> tagList, CUserBaseInfoT uBase,MallUserInfo mallUserInfo);

long findCount(WxCUserBasicInfoDto dto);
long findCount(WxCUserBasicInfoDto record);

List<UserCountVo> findCountHistory(WxCUserBasicInfoDto dto);
List<UserCountVo> findCountHistory(WxCUserBasicInfoDto record);
/**
* 停车会员记录导出
* @param record


+ 4
- 1
mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java View File

@@ -202,7 +202,10 @@ public class DataTowerServiceImpl implements DataTowerService {
String date = DateUtils.getTimeBefore(1, new Date());
chartDataQ.setQuerytime(DateUtils.stringToDate(date));
List<WxChartDataEntity> list = wxChartDataMapper.findList(chartDataQ);
Integer carCount = list.stream().map(e -> Integer.parseInt(e.getResult())).reduce(Integer::sum).get();
int carCount = 0;
if(list != null && list.size() > 0){
carCount = list.stream().map(e -> Integer.parseInt(e.getResult())).reduce(Integer::sum).get();
}

HashMap<String, Object> carMap = new HashMap<>();
carMap.put("carCount",carCount);


+ 6
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java View File

@@ -22,6 +22,7 @@ import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
@@ -1173,7 +1174,9 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc
}

@Override
public long findCount(WxCUserBasicInfoDto dto) {
public long findCount(WxCUserBasicInfoDto record) {
WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto();
BeanUtils.copyProperties(record,dto);
if(wxMallService.isgroupSupport(dto)){
dto.setParentTenantId(dto.getTenantId());
dto.setTenantId(null);
@@ -1182,8 +1185,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc
}

@Override
public List<UserCountVo> findCountHistory(WxCUserBasicInfoDto dto) {
return wxCUserBasicInfoMapper.findCountHistory(dto);
public List<UserCountVo> findCountHistory(WxCUserBasicInfoDto record) {
return wxCUserBasicInfoMapper.findCountHistory(record);
}

@Override


+ 7
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxUserVisitServiceImpl.java View File

@@ -11,6 +11,7 @@ import com.iformall.service.WxMallService;
import com.iformall.service.WxUserVisitService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iformall.common.IdWorker;
@@ -65,10 +66,12 @@ public class WxUserVisitServiceImpl implements WxUserVisitService {

@Override
public Long queryVisitUv(WxUserVisit record) {
if(wxMallService.isgroupSupport(record)){
record.setParentTenantId(record.getTenantId());
record.setTenantId(null);
WxUserVisit wuv = new WxUserVisit();
BeanUtils.copyProperties(record,wuv);
if(wxMallService.isgroupSupport(wuv)){
wuv.setParentTenantId(wuv.getTenantId());
wuv.setTenantId(null);
}
return wxUserVisitMapper.queryVisitUv(record);
return wxUserVisitMapper.queryVisitUv(wuv);
}
}

Loading…
Cancel
Save