Explorar el Código

/. 报表-001.1

release_toaliyun_real
xhxu hace 4 años
padre
commit
8ddcfa6308
Se han modificado 9 ficheros con 26 adiciones y 28 borrados
  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 Ver fichero

@@ -59,8 +59,7 @@ public class WxMallController extends BaseController {
logger.error("未配置相应的mall"); logger.error("未配置相应的mall");
return new ResultData(Result.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.setSubMalls(wxMallService.getSubByParentTenantId(mall.getTenantId()));
} }
mall.setValidPrompt(wxMallService.mallValid(getUserId(),mall)); mall.setValidPrompt(wxMallService.mallValid(getUserId(),mall));


+ 2
- 8
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java Ver fichero

@@ -684,10 +684,7 @@ public class WxProjectConfigController extends BaseController {
// } // }
TenantEntity tenantEntity = new TenantEntity(); TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(tenantId); 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); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
} }
wxProjectConfigService.initSubmall(tenantId,subTenantIds); wxProjectConfigService.initSubmall(tenantId,subTenantIds);
@@ -721,10 +718,7 @@ public class WxProjectConfigController extends BaseController {
TenantEntity tenantEntity = new TenantEntity(); TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(tenantId); 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); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
} }
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();


+ 2
- 6
mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreRulesController.java Ver fichero

@@ -58,9 +58,7 @@ public class WxScoreRulesController extends BaseController {
wxScoreRules.updateTenantInfo(tenantEntity); wxScoreRules.updateTenantInfo(tenantEntity);
}else if(wxScoreRules.getType().equals(EnumScoreRules.CREDIT_DOUBLE.getCode())){ }else if(wxScoreRules.getType().equals(EnumScoreRules.CREDIT_DOUBLE.getCode())){
TenantEntity tenantEntity = getTenantInfo(); 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(), "集团用户无此权限"); return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(), "集团用户无此权限");
} }
wxScoreRules.updateTenantInfo(tenantEntity); wxScoreRules.updateTenantInfo(tenantEntity);
@@ -88,9 +86,7 @@ public class WxScoreRulesController extends BaseController {
@SystemControllerLog(description = "积分-配置") @SystemControllerLog(description = "积分-配置")
public ResultData creditDoubleRulesList() { public ResultData creditDoubleRulesList() {
logger.debug("[" + getIpAddr() + "] creditDoubleRulesList::list"); 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(), "集团用户无此权限"); return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(), "集团用户无此权限");
} }
WxScoreRules scoreRules = wxScoreRulesService.getCreditDoubleRules(getTenantInfo().getTenantId()); WxScoreRules scoreRules = wxScoreRulesService.getCreditDoubleRules(getTenantInfo().getTenantId());


+ 1
- 1
mallinkBApi/src/main/java/com/iformall/controller/WxMallController.java Ver fichero

@@ -74,7 +74,7 @@ public class WxMallController extends BaseController {
if (mall == null) { if (mall == null) {
return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND); 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()); List<WxMall> mallList = wxMallService.getSubByParentTenantId(mall.getTenantId());
mall.setSubMalls(mallList); mall.setSubMalls(mallList);
} }


+ 1
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java Ver fichero

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


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java Ver fichero

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


void importOneMem(String importKey, List<WxTags> tagList, CUserBaseInfoT uBase,MallUserInfo mallUserInfo); 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 * @param record


+ 4
- 1
mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java Ver fichero

@@ -202,7 +202,10 @@ public class DataTowerServiceImpl implements DataTowerService {
String date = DateUtils.getTimeBefore(1, new Date()); String date = DateUtils.getTimeBefore(1, new Date());
chartDataQ.setQuerytime(DateUtils.stringToDate(date)); chartDataQ.setQuerytime(DateUtils.stringToDate(date));
List<WxChartDataEntity> list = wxChartDataMapper.findList(chartDataQ); 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<>(); HashMap<String, Object> carMap = new HashMap<>();
carMap.put("carCount",carCount); carMap.put("carCount",carCount);


+ 6
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Ver fichero

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


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


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


@Override @Override


+ 7
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxUserVisitServiceImpl.java Ver fichero

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


@Override @Override
public Long queryVisitUv(WxUserVisit record) { 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);
} }
} }

Cargando…
Cancelar
Guardar