|
|
|
@ -31,13 +31,13 @@ public class StuUserProfileDatabaseServiceImpl implements StuUserProfileDatabase
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuUserAttributeMapper userAttributeMapper;
|
|
|
|
|
private StuSpendingLevelMapper stuSpendingLevelMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuUserAttributeBehaviorMapper userAttributeBehaviorMapper;
|
|
|
|
|
private StuUserSalesAbilityMapper stuUserSalesAbilityMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuUserConsumptionAbilityMapper userConsumptionAbilityMapper;
|
|
|
|
|
private StuUserShoppingCartMapper stuUserShoppingCartMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuUserLoginActiveMapper userLoginActiveMapper;
|
|
|
|
|
private StuUserCommentMapper stuUserCommentMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuUploadExcelUserMapper uploadExcelUserMapper;
|
|
|
|
|
|
|
|
|
@ -59,9 +59,9 @@ public class StuUserProfileDatabaseServiceImpl implements StuUserProfileDatabase
|
|
|
|
|
list.add("用户评论表");
|
|
|
|
|
|
|
|
|
|
//用户属性表
|
|
|
|
|
StuUserAttributeExample userAttributeExample = new StuUserAttributeExample();
|
|
|
|
|
StuSpendingLevelExample userAttributeExample = new StuSpendingLevelExample();
|
|
|
|
|
userAttributeExample.setOrderByClause("id asc");
|
|
|
|
|
List<StuUserAttribute> userAttributeList = userAttributeMapper.selectByExample(userAttributeExample);
|
|
|
|
|
List<StuSpendingLevel> userAttributeList = stuSpendingLevelMapper.selectByExample(userAttributeExample);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (userAttributeList.isEmpty()) {
|
|
|
|
@ -74,7 +74,7 @@ public class StuUserProfileDatabaseServiceImpl implements StuUserProfileDatabase
|
|
|
|
|
List<String> nameList = uploadExcelUserMapper.selectDistModuleName(userId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StuUserProfileDto userProfileDto = StuUserProfileDto.builder().userAttribute(userAttributeList.get(0)).selfBuiltTable(nameList)
|
|
|
|
|
StuUserProfileDto userProfileDto = StuUserProfileDto.builder().spendingLevel(userAttributeList.get(0)).selfBuiltTable(nameList)
|
|
|
|
|
.tableNames(list).build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -104,9 +104,9 @@ public class StuUserProfileDatabaseServiceImpl implements StuUserProfileDatabase
|
|
|
|
|
//开启分页
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
//用户属性表
|
|
|
|
|
StuUserAttributeExample userAttributeExample = new StuUserAttributeExample();
|
|
|
|
|
StuSpendingLevelExample userAttributeExample = new StuSpendingLevelExample();
|
|
|
|
|
userAttributeExample.setOrderByClause("id asc");
|
|
|
|
|
List<StuUserAttribute> userAttributeList = userAttributeMapper.selectByExample(userAttributeExample);
|
|
|
|
|
List<StuSpendingLevel> userAttributeList = stuSpendingLevelMapper.selectByExample(userAttributeExample);
|
|
|
|
|
if (userAttributeList.isEmpty()) {
|
|
|
|
|
throw new ServiceException(HttpStatus.OK, "未查询到用户数据!");
|
|
|
|
|
}
|
|
|
|
@ -117,9 +117,9 @@ public class StuUserProfileDatabaseServiceImpl implements StuUserProfileDatabase
|
|
|
|
|
//开启分页
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
//用户登录活跃表
|
|
|
|
|
StuUserLoginActiveExample userLoginActiveExample = new StuUserLoginActiveExample();
|
|
|
|
|
StuUserSalesAbilityExample userLoginActiveExample = new StuUserSalesAbilityExample();
|
|
|
|
|
userLoginActiveExample.setOrderByClause("id asc");
|
|
|
|
|
List<StuUserLoginActive> userLoginActiveList = userLoginActiveMapper.selectByExample(userLoginActiveExample);
|
|
|
|
|
List<StuUserSalesAbility> userLoginActiveList = stuUserSalesAbilityMapper.selectByExample(userLoginActiveExample);
|
|
|
|
|
if (userLoginActiveList.isEmpty()) {
|
|
|
|
|
throw new ServiceException(HttpStatus.OK, "未查询到用户数据!");
|
|
|
|
|
}
|
|
|
|
@ -131,9 +131,9 @@ public class StuUserProfileDatabaseServiceImpl implements StuUserProfileDatabase
|
|
|
|
|
//开启分页
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
//用户消费能力表
|
|
|
|
|
StuUserConsumptionAbilityExample userConsumptionAbilityExample = new StuUserConsumptionAbilityExample();
|
|
|
|
|
StuUserShoppingCartExample userConsumptionAbilityExample = new StuUserShoppingCartExample();
|
|
|
|
|
userConsumptionAbilityExample.setOrderByClause("id asc");
|
|
|
|
|
List<StuUserConsumptionAbility> userConsumptionAbilityList = userConsumptionAbilityMapper.selectByExample(userConsumptionAbilityExample);
|
|
|
|
|
List<StuUserShoppingCart> userConsumptionAbilityList = stuUserShoppingCartMapper.selectByExample(userConsumptionAbilityExample);
|
|
|
|
|
if (userConsumptionAbilityList.isEmpty()) {
|
|
|
|
|
throw new ServiceException(HttpStatus.OK, "未查询到用户数据!");
|
|
|
|
|
}
|
|
|
|
@ -144,30 +144,16 @@ public class StuUserProfileDatabaseServiceImpl implements StuUserProfileDatabase
|
|
|
|
|
//开启分页
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
//用户行为表
|
|
|
|
|
StuUserAttributeBehaviorExample userAttributeBehaviorExample = new StuUserAttributeBehaviorExample();
|
|
|
|
|
StuUserCommentExample userAttributeBehaviorExample = new StuUserCommentExample();
|
|
|
|
|
userAttributeBehaviorExample.setOrderByClause("id asc");
|
|
|
|
|
List<StuUserAttributeBehavior> userAttributeBehaviorList = userAttributeBehaviorMapper.selectByExample(userAttributeBehaviorExample);
|
|
|
|
|
List<StuUserComment> userAttributeBehaviorList = stuUserCommentMapper.selectByExample(userAttributeBehaviorExample);
|
|
|
|
|
if (userAttributeBehaviorList.isEmpty()) {
|
|
|
|
|
throw new ServiceException(HttpStatus.OK, "未查询到用户数据!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, new PageInfo<>(userAttributeBehaviorList));
|
|
|
|
|
|
|
|
|
|
//todo 用户评论表
|
|
|
|
|
case Constant.YONGHUPINGLUNBIAO:
|
|
|
|
|
//开启分页
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
//用户行为表
|
|
|
|
|
StuUserAttributeBehaviorExample behaviorExample = new StuUserAttributeBehaviorExample();
|
|
|
|
|
behaviorExample.setOrderByClause("id asc");
|
|
|
|
|
List<StuUserAttributeBehavior> behaviorList = userAttributeBehaviorMapper.selectByExample(behaviorExample);
|
|
|
|
|
if (behaviorList.isEmpty()) {
|
|
|
|
|
throw new ServiceException(HttpStatus.OK, "未查询到用户数据!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, new PageInfo<>(behaviorList));
|
|
|
|
|
|
|
|
|
|
//todo 用户评论表
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|