修改内置表接口

master
whb 7 months ago
parent 02c50fe6c6
commit fdf83ed20b

@ -40,11 +40,11 @@ public class Constant {
public static final String YONGHUSHUXINGBIAO= "用户属性表"; public static final String YONGHUSHUXINGBIAO= "客户细分数据表";
public static final String YONGHUDENGLUHUOYUEBIAO= "用户登录活跃表"; public static final String YONGHUDENGLUHUOYUEBIAO= "销售预测数据表";
public static final String YONGHUXIAOFEINENGLIBIAO= "用户消费能力表"; public static final String YONGHUXIAOFEINENGLIBIAO= "购物车数据表";
public static final String YONGHUXINGWEIBIAO= "用户行为表"; public static final String YONGHUXINGWEIBIAO= "用户评论表";
public static final String YONGHUPINGLUNBIAO= "用户评论表";
public static final String YONGHUXIAOSHOUNLB= "销售预测数据表"; public static final String YONGHUXIAOSHOUNLB= "销售预测数据表";

@ -1,5 +1,6 @@
package com.sztzjy.marketing.entity.dto; package com.sztzjy.marketing.entity.dto;
import com.sztzjy.marketing.entity.StuSpendingLevel;
import com.sztzjy.marketing.entity.StuUserAttribute; import com.sztzjy.marketing.entity.StuUserAttribute;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -25,7 +26,7 @@ public class StuUserProfileDto {
@ApiModelProperty("用户属性表") @ApiModelProperty("用户属性表")
private StuUserAttribute userAttribute; private StuSpendingLevel spendingLevel;
@ApiModelProperty("自建表") @ApiModelProperty("自建表")

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

Loading…
Cancel
Save