From b472e7ebc96fdd22dbf7dfad9d642fbe3988a5b5 Mon Sep 17 00:00:00 2001 From: "@t2652009480" <2652009480@qq.com> Date: Mon, 26 Aug 2024 11:26:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E5=AD=97=E8=90=A5=E9=94=80=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E7=AE=97=E6=B3=95=E7=AC=AC=E5=9B=9B=E8=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/sztzjy/marketing/config/Constant.java | 8 + .../StuDigitalMarketingModelController.java | 29 +- .../controller/stu/StuPythonController.java | 2 +- .../sztzjy/marketing/controller/stu/Test.java | 81 --- .../marketing/entity/StuSpendingLevel.java | 11 + .../entity/StuSpendingLevelExample.java | 70 +++ .../marketing/entity/StuUserComment.java | 77 +++ .../entity/StuUserCommentExample.java | 530 ++++++++++++++++++ .../marketing/entity/StuUserSalesAbility.java | 42 ++ .../entity/StuUserSalesAbilityExample.java | 379 +++++++++++++ .../marketing/entity/StuUserShoppingCart.java | 31 + .../entity/StuUserShoppingCartExample.java | 329 +++++++++++ .../mapper/StuSpendingLevelMapper.java | 6 +- .../mapper/StuUserCommentMapper.java | 40 ++ .../mapper/StuUserSalesAbilityMapper.java | 35 ++ .../mapper/StuUserShoppingCartMapper.java | 32 ++ .../StuDigitalMarketingModelServiceImpl.java | 59 +- .../mappers/StuSpendingLevelMapper.xml | 43 +- .../mappers/StuUserCommentMapper.xml | 277 +++++++++ .../mappers/StuUserSalesAbilityMapper.xml | 188 +++++++ .../mappers/StuUserShoppingCartMapper.xml | 164 ++++++ 21 files changed, 2284 insertions(+), 149 deletions(-) delete mode 100644 src/main/java/com/sztzjy/marketing/controller/stu/Test.java create mode 100644 src/main/java/com/sztzjy/marketing/entity/StuUserComment.java create mode 100644 src/main/java/com/sztzjy/marketing/entity/StuUserCommentExample.java create mode 100644 src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbility.java create mode 100644 src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbilityExample.java create mode 100644 src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCart.java create mode 100644 src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCartExample.java create mode 100644 src/main/java/com/sztzjy/marketing/mapper/StuUserCommentMapper.java create mode 100644 src/main/java/com/sztzjy/marketing/mapper/StuUserSalesAbilityMapper.java create mode 100644 src/main/java/com/sztzjy/marketing/mapper/StuUserShoppingCartMapper.java create mode 100644 src/main/resources/mappers/StuUserCommentMapper.xml create mode 100644 src/main/resources/mappers/StuUserSalesAbilityMapper.xml create mode 100644 src/main/resources/mappers/StuUserShoppingCartMapper.xml diff --git a/src/main/java/com/sztzjy/marketing/config/Constant.java b/src/main/java/com/sztzjy/marketing/config/Constant.java index bdfbd48..26ad5da 100644 --- a/src/main/java/com/sztzjy/marketing/config/Constant.java +++ b/src/main/java/com/sztzjy/marketing/config/Constant.java @@ -47,6 +47,14 @@ public class Constant { public static final String YONGHUPINGLUNBIAO= "用户评论表"; + public static final String YONGHUXIAOSHOUNLB= "销售预测数据表"; + public static final String KEHUXISHUJU= "客户细分数据表"; + + public static final String GOUWUCHESHUJU="购物车数据表"; + + + + public static final String FILTEROUTSTATIS_ONE= "剔除"; public static final String FILTEROUTSTATIS_TWO= "纳入"; public static final String FILTEROUTSTATIS_THREE= "4"; diff --git a/src/main/java/com/sztzjy/marketing/controller/stu/StuDigitalMarketingModelController.java b/src/main/java/com/sztzjy/marketing/controller/stu/StuDigitalMarketingModelController.java index eac48c4..63a08ec 100644 --- a/src/main/java/com/sztzjy/marketing/controller/stu/StuDigitalMarketingModelController.java +++ b/src/main/java/com/sztzjy/marketing/controller/stu/StuDigitalMarketingModelController.java @@ -4,11 +4,11 @@ import cn.hutool.core.util.IdUtil; import com.sztzjy.marketing.annotation.AnonymousAccess; import com.sztzjy.marketing.config.Constant; import com.sztzjy.marketing.config.exception.handler.DigitalEconomyxception; -import com.sztzjy.marketing.entity.StuSpendingLevel; -import com.sztzjy.marketing.entity.StuTrainingOperateStepExample; -import com.sztzjy.marketing.entity.StuTrainingOperateStepWithBLOBs; +import com.sztzjy.marketing.entity.*; import com.sztzjy.marketing.entity.dto.*; import com.sztzjy.marketing.mapper.StuSpendingLevelMapper; +import com.sztzjy.marketing.mapper.StuUserCommentMapper; +import com.sztzjy.marketing.mapper.StuUserSalesAbilityMapper; import com.sztzjy.marketing.service.StuDigitalMarketingModelService; import com.sztzjy.marketing.util.DataConverter; import com.sztzjy.marketing.util.ResultEntity; @@ -51,7 +51,7 @@ public class StuDigitalMarketingModelController { @Resource StuDigitalMarketingModelService modelService; @Resource - StuSpendingLevelMapper stuSpendingLevelMapper; + StuUserCommentMapper stuUserCommentMapper; @ApiOperation("选择指标--下拉框") @PostMapping("/dropdownBox") @@ -298,7 +298,7 @@ public class StuDigitalMarketingModelController { try { - List stuSpendingLevels=new ArrayList<>(); + List stuUserComments=new ArrayList<>(); //获取数据 List> listByExcel = ImportExcelUtil.getListByExcel(file.getInputStream(), file.getOriginalFilename()); @@ -311,18 +311,21 @@ public class StuDigitalMarketingModelController { - StuSpendingLevel stuSpendingLevel=new StuSpendingLevel(); - stuSpendingLevel.setId(Integer.valueOf((String) list.get(0))); - stuSpendingLevel.setGender(Integer.valueOf((String) list.get(1))); - stuSpendingLevel.setAge(Integer.valueOf((String) list.get(2))); - stuSpendingLevel.setAnnualIncome(Integer.valueOf((String) list.get(3))); - stuSpendingLevel.setSpendingScore(Integer.valueOf((String) list.get(4))); + StuUserComment stuUserComment=new StuUserComment(); + Integer uuid = UUID.randomUUID().toString().replaceAll("-", "").hashCode(); + uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空 + stuUserComment.setId(uuid); + stuUserComment.setContent(String.valueOf(list.get(0))); + stuUserComment.setCreationTime(new Date(String.valueOf(list.get(1)))); + stuUserComment.setNickName(String.valueOf((list.get(2)))); + stuUserComment.setReferenceName(String.valueOf(list.get(3))); + stuUserComment.setContentType(String.valueOf(list.get(4))); - stuSpendingLevels.add(stuSpendingLevel); + stuUserComments.add(stuUserComment); } - stuSpendingLevelMapper.addList(stuSpendingLevels); + stuUserCommentMapper.addList(stuUserComments); } catch (Exception e) { diff --git a/src/main/java/com/sztzjy/marketing/controller/stu/StuPythonController.java b/src/main/java/com/sztzjy/marketing/controller/stu/StuPythonController.java index 7fd9df3..4153e10 100644 --- a/src/main/java/com/sztzjy/marketing/controller/stu/StuPythonController.java +++ b/src/main/java/com/sztzjy/marketing/controller/stu/StuPythonController.java @@ -2,6 +2,7 @@ package com.sztzjy.marketing.controller.stu; import cn.hutool.core.util.IdUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.sztzjy.marketing.annotation.AnonymousAccess; import com.sztzjy.marketing.entity.dto.SentimentAnalyDTO; @@ -140,5 +141,4 @@ public class StuPythonController { } } - } diff --git a/src/main/java/com/sztzjy/marketing/controller/stu/Test.java b/src/main/java/com/sztzjy/marketing/controller/stu/Test.java deleted file mode 100644 index 99ecd96..0000000 --- a/src/main/java/com/sztzjy/marketing/controller/stu/Test.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.sztzjy.marketing.controller.stu; - -import com.hankcs.hanlp.HanLP; -import com.hankcs.hanlp.restful.HanLPClient; -import com.hankcs.hanlp.seg.common.Term; -import com.sztzjy.marketing.util.algorithm.LogisticRegression; -import com.sztzjy.marketing.util.algorithm.TrainDataSet; -import okhttp3.*; -import java.io.IOException; -import java.util.*; - -/** - * @author tz - * @date 2024/6/17 17:38 - */ -public class Test { - -// static final String content="服务态度很好,环境也不错,就是点歌系统不太好用。"; -// -// static final OkHttpClient HTTP_CLIENT = new OkHttpClient().newBuilder().build(); -// -// public static void main(String []args) throws IOException { -// MediaType mediaType = MediaType.parse("application/json"); -// RequestBody body = RequestBody.create(mediaType, "{\"text\":\""+content+"\"}"); -// Request request = new Request.Builder() -// .url("https://aip.baidubce.com/rpc/2.0/nlp/v2/comment_tag?access_token=24.88968c130db3ca9f266907b5004bec8f.2592000.1721270821.282335-83957582&charset=UTF-8") -// .method("POST", body) -// .addHeader("Content-Type", "application/json") -// .addHeader("Accept", "application/json") -// .build(); -// Response response = HTTP_CLIENT.newCall(request).execute(); -// System.out.println(response.body().string()); -// -// } - - -// public static void main(String[] args) throws IOException { -// -// -//// HanLPClient HanLP = new HanLPClient("https://www.hanlp.com/hanlp/v21/redirect", "66713f44eaf65b7b456a5dec","zh",20); // auth不填则匿名,zh中文,mul多语种 -// -// -// // 初始化文本 -// String text = "据DigiTimes报道,在上海疫情趋缓,防疫管控开始放松后,苹果供应商广达正在逐步恢复其中国工厂的MacBook产品生产。\n" + -// " 据供应链消息人士称,生产厂的订单拉动情况正在慢慢转强,这会提高MacBook Pro机型的供应量,并缩短苹果客户在过去几周所经历的延长交货时间。\n" + -// " 仍有许多苹果笔记本用户在等待3月和4月订购的MacBook Pro机型到货,由于苹果的供应问题,他们的发货时间被大大推迟了。\n" + -// " 据分析师郭明錤表示,广达是高端MacBook Pro的唯一供应商,自防疫封控依赖,MacBook Pro大部分型号交货时间增加了三到五周,\n" + -// " 一些高端定制型号的MacBook Pro配置要到6月底到7月初才能交货"; -// // 使用 HanLP 分词 -// List terms = HanLP.segment(text); -// // 创建词汇表 -// Map wordCount = new HashMap<>(); -// // 统计词频 -// -// // 创建计数器 -// int count = 0; -// for (Term term : terms) { -// String word = term.word.trim(); // 去除空格 -// if(!word.isEmpty()){ -// count++; -// if (wordCount.containsKey(word)) { -// wordCount.put(word, wordCount.get(word) + 1); -// } else { -// wordCount.put(word, 1); -// } -// } -// if (count >= 200) { // 达到200个关键词时结束统计 -// break; -// } -// } -// // 将词汇表转换为列表,便于排序 -// List> wordList = new ArrayList<>(wordCount.entrySet()); -// // 按词频排序 -// wordList.sort((o1, o2) -> o2.getValue().compareTo(o1.getValue())); -// // 输出结果 -// for (Map.Entry entry : wordList) { -// System.out.println(entry.getKey() + ": " + entry.getValue()); -// } -// } - -} diff --git a/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevel.java b/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevel.java index 784a73e..7720d44 100644 --- a/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevel.java +++ b/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevel.java @@ -22,6 +22,9 @@ public class StuSpendingLevel { @ApiModelProperty("消费水平(1-100)") private Integer spendingScore; + @ApiModelProperty("消费商品") + private String consumerGoods; + public Integer getId() { return id; } @@ -61,4 +64,12 @@ public class StuSpendingLevel { public void setSpendingScore(Integer spendingScore) { this.spendingScore = spendingScore; } + + public String getConsumerGoods() { + return consumerGoods; + } + + public void setConsumerGoods(String consumerGoods) { + this.consumerGoods = consumerGoods == null ? null : consumerGoods.trim(); + } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevelExample.java b/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevelExample.java index 2776b29..496917e 100644 --- a/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevelExample.java +++ b/src/main/java/com/sztzjy/marketing/entity/StuSpendingLevelExample.java @@ -403,6 +403,76 @@ public class StuSpendingLevelExample { addCriterion("spending_score not between", value1, value2, "spendingScore"); return (Criteria) this; } + + public Criteria andConsumerGoodsIsNull() { + addCriterion("consumer_goods is null"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsIsNotNull() { + addCriterion("consumer_goods is not null"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsEqualTo(String value) { + addCriterion("consumer_goods =", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotEqualTo(String value) { + addCriterion("consumer_goods <>", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsGreaterThan(String value) { + addCriterion("consumer_goods >", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsGreaterThanOrEqualTo(String value) { + addCriterion("consumer_goods >=", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsLessThan(String value) { + addCriterion("consumer_goods <", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsLessThanOrEqualTo(String value) { + addCriterion("consumer_goods <=", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsLike(String value) { + addCriterion("consumer_goods like", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotLike(String value) { + addCriterion("consumer_goods not like", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsIn(List values) { + addCriterion("consumer_goods in", values, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotIn(List values) { + addCriterion("consumer_goods not in", values, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsBetween(String value1, String value2) { + addCriterion("consumer_goods between", value1, value2, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotBetween(String value1, String value2) { + addCriterion("consumer_goods not between", value1, value2, "consumerGoods"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/sztzjy/marketing/entity/StuUserComment.java b/src/main/java/com/sztzjy/marketing/entity/StuUserComment.java new file mode 100644 index 0000000..2520173 --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/entity/StuUserComment.java @@ -0,0 +1,77 @@ +package com.sztzjy.marketing.entity; + +import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; +/** + * + * @author whb + * stu_user_comment + */ +public class StuUserComment { + @ApiModelProperty("ID") + private Integer id; + + @ApiModelProperty("评论时间") + private Date creationTime; + + @ApiModelProperty("昵称") + private String nickName; + + @ApiModelProperty("评论对象") + private String referenceName; + + @ApiModelProperty("评论类型") + private String contentType; + + @ApiModelProperty("评论内容") + private String content; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Date getCreationTime() { + return creationTime; + } + + public void setCreationTime(Date creationTime) { + this.creationTime = creationTime; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName == null ? null : nickName.trim(); + } + + public String getReferenceName() { + return referenceName; + } + + public void setReferenceName(String referenceName) { + this.referenceName = referenceName == null ? null : referenceName.trim(); + } + + public String getContentType() { + return contentType; + } + + public void setContentType(String contentType) { + this.contentType = contentType == null ? null : contentType.trim(); + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content == null ? null : content.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/entity/StuUserCommentExample.java b/src/main/java/com/sztzjy/marketing/entity/StuUserCommentExample.java new file mode 100644 index 0000000..e9e4fbd --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/entity/StuUserCommentExample.java @@ -0,0 +1,530 @@ +package com.sztzjy.marketing.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StuUserCommentExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuUserCommentExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreationTimeIsNull() { + addCriterion("creation_time is null"); + return (Criteria) this; + } + + public Criteria andCreationTimeIsNotNull() { + addCriterion("creation_time is not null"); + return (Criteria) this; + } + + public Criteria andCreationTimeEqualTo(Date value) { + addCriterion("creation_time =", value, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeNotEqualTo(Date value) { + addCriterion("creation_time <>", value, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeGreaterThan(Date value) { + addCriterion("creation_time >", value, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeGreaterThanOrEqualTo(Date value) { + addCriterion("creation_time >=", value, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeLessThan(Date value) { + addCriterion("creation_time <", value, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeLessThanOrEqualTo(Date value) { + addCriterion("creation_time <=", value, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeIn(List values) { + addCriterion("creation_time in", values, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeNotIn(List values) { + addCriterion("creation_time not in", values, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeBetween(Date value1, Date value2) { + addCriterion("creation_time between", value1, value2, "creationTime"); + return (Criteria) this; + } + + public Criteria andCreationTimeNotBetween(Date value1, Date value2) { + addCriterion("creation_time not between", value1, value2, "creationTime"); + return (Criteria) this; + } + + public Criteria andNickNameIsNull() { + addCriterion("nick_name is null"); + return (Criteria) this; + } + + public Criteria andNickNameIsNotNull() { + addCriterion("nick_name is not null"); + return (Criteria) this; + } + + public Criteria andNickNameEqualTo(String value) { + addCriterion("nick_name =", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotEqualTo(String value) { + addCriterion("nick_name <>", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThan(String value) { + addCriterion("nick_name >", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThanOrEqualTo(String value) { + addCriterion("nick_name >=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThan(String value) { + addCriterion("nick_name <", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThanOrEqualTo(String value) { + addCriterion("nick_name <=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLike(String value) { + addCriterion("nick_name like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotLike(String value) { + addCriterion("nick_name not like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameIn(List values) { + addCriterion("nick_name in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotIn(List values) { + addCriterion("nick_name not in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameBetween(String value1, String value2) { + addCriterion("nick_name between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotBetween(String value1, String value2) { + addCriterion("nick_name not between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andReferenceNameIsNull() { + addCriterion("reference_name is null"); + return (Criteria) this; + } + + public Criteria andReferenceNameIsNotNull() { + addCriterion("reference_name is not null"); + return (Criteria) this; + } + + public Criteria andReferenceNameEqualTo(String value) { + addCriterion("reference_name =", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameNotEqualTo(String value) { + addCriterion("reference_name <>", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameGreaterThan(String value) { + addCriterion("reference_name >", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameGreaterThanOrEqualTo(String value) { + addCriterion("reference_name >=", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameLessThan(String value) { + addCriterion("reference_name <", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameLessThanOrEqualTo(String value) { + addCriterion("reference_name <=", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameLike(String value) { + addCriterion("reference_name like", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameNotLike(String value) { + addCriterion("reference_name not like", value, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameIn(List values) { + addCriterion("reference_name in", values, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameNotIn(List values) { + addCriterion("reference_name not in", values, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameBetween(String value1, String value2) { + addCriterion("reference_name between", value1, value2, "referenceName"); + return (Criteria) this; + } + + public Criteria andReferenceNameNotBetween(String value1, String value2) { + addCriterion("reference_name not between", value1, value2, "referenceName"); + return (Criteria) this; + } + + public Criteria andContentTypeIsNull() { + addCriterion("content_type is null"); + return (Criteria) this; + } + + public Criteria andContentTypeIsNotNull() { + addCriterion("content_type is not null"); + return (Criteria) this; + } + + public Criteria andContentTypeEqualTo(String value) { + addCriterion("content_type =", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotEqualTo(String value) { + addCriterion("content_type <>", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeGreaterThan(String value) { + addCriterion("content_type >", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeGreaterThanOrEqualTo(String value) { + addCriterion("content_type >=", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeLessThan(String value) { + addCriterion("content_type <", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeLessThanOrEqualTo(String value) { + addCriterion("content_type <=", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeLike(String value) { + addCriterion("content_type like", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotLike(String value) { + addCriterion("content_type not like", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeIn(List values) { + addCriterion("content_type in", values, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotIn(List values) { + addCriterion("content_type not in", values, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeBetween(String value1, String value2) { + addCriterion("content_type between", value1, value2, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotBetween(String value1, String value2) { + addCriterion("content_type not between", value1, value2, "contentType"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbility.java b/src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbility.java new file mode 100644 index 0000000..9c864fb --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbility.java @@ -0,0 +1,42 @@ +package com.sztzjy.marketing.entity; + +import io.swagger.annotations.ApiModelProperty; +/** + * + * @author whb + * stu_user_sales_ability + */ +public class StuUserSalesAbility { + @ApiModelProperty("ID") + private Integer id; + + @ApiModelProperty("销售量") + private Integer salesVolume; + + @ApiModelProperty("销售额") + private Integer salesForehead; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getSalesVolume() { + return salesVolume; + } + + public void setSalesVolume(Integer salesVolume) { + this.salesVolume = salesVolume; + } + + public Integer getSalesForehead() { + return salesForehead; + } + + public void setSalesForehead(Integer salesForehead) { + this.salesForehead = salesForehead; + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbilityExample.java b/src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbilityExample.java new file mode 100644 index 0000000..bb6c07d --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/entity/StuUserSalesAbilityExample.java @@ -0,0 +1,379 @@ +package com.sztzjy.marketing.entity; + +import java.util.ArrayList; +import java.util.List; + +public class StuUserSalesAbilityExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuUserSalesAbilityExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andSalesVolumeIsNull() { + addCriterion("sales_volume is null"); + return (Criteria) this; + } + + public Criteria andSalesVolumeIsNotNull() { + addCriterion("sales_volume is not null"); + return (Criteria) this; + } + + public Criteria andSalesVolumeEqualTo(Integer value) { + addCriterion("sales_volume =", value, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeNotEqualTo(Integer value) { + addCriterion("sales_volume <>", value, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeGreaterThan(Integer value) { + addCriterion("sales_volume >", value, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeGreaterThanOrEqualTo(Integer value) { + addCriterion("sales_volume >=", value, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeLessThan(Integer value) { + addCriterion("sales_volume <", value, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeLessThanOrEqualTo(Integer value) { + addCriterion("sales_volume <=", value, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeIn(List values) { + addCriterion("sales_volume in", values, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeNotIn(List values) { + addCriterion("sales_volume not in", values, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeBetween(Integer value1, Integer value2) { + addCriterion("sales_volume between", value1, value2, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesVolumeNotBetween(Integer value1, Integer value2) { + addCriterion("sales_volume not between", value1, value2, "salesVolume"); + return (Criteria) this; + } + + public Criteria andSalesForeheadIsNull() { + addCriterion("sales_forehead is null"); + return (Criteria) this; + } + + public Criteria andSalesForeheadIsNotNull() { + addCriterion("sales_forehead is not null"); + return (Criteria) this; + } + + public Criteria andSalesForeheadEqualTo(Integer value) { + addCriterion("sales_forehead =", value, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadNotEqualTo(Integer value) { + addCriterion("sales_forehead <>", value, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadGreaterThan(Integer value) { + addCriterion("sales_forehead >", value, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadGreaterThanOrEqualTo(Integer value) { + addCriterion("sales_forehead >=", value, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadLessThan(Integer value) { + addCriterion("sales_forehead <", value, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadLessThanOrEqualTo(Integer value) { + addCriterion("sales_forehead <=", value, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadIn(List values) { + addCriterion("sales_forehead in", values, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadNotIn(List values) { + addCriterion("sales_forehead not in", values, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadBetween(Integer value1, Integer value2) { + addCriterion("sales_forehead between", value1, value2, "salesForehead"); + return (Criteria) this; + } + + public Criteria andSalesForeheadNotBetween(Integer value1, Integer value2) { + addCriterion("sales_forehead not between", value1, value2, "salesForehead"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCart.java b/src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCart.java new file mode 100644 index 0000000..25c0af0 --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCart.java @@ -0,0 +1,31 @@ +package com.sztzjy.marketing.entity; + +import io.swagger.annotations.ApiModelProperty; +/** + * + * @author whb + * stu_user_shopping_cart + */ +public class StuUserShoppingCart { + @ApiModelProperty("ID") + private Integer id; + + @ApiModelProperty("消费商品") + private String consumerGoods; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getConsumerGoods() { + return consumerGoods; + } + + public void setConsumerGoods(String consumerGoods) { + this.consumerGoods = consumerGoods == null ? null : consumerGoods.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCartExample.java b/src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCartExample.java new file mode 100644 index 0000000..a97733d --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/entity/StuUserShoppingCartExample.java @@ -0,0 +1,329 @@ +package com.sztzjy.marketing.entity; + +import java.util.ArrayList; +import java.util.List; + +public class StuUserShoppingCartExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuUserShoppingCartExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsIsNull() { + addCriterion("consumer_goods is null"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsIsNotNull() { + addCriterion("consumer_goods is not null"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsEqualTo(String value) { + addCriterion("consumer_goods =", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotEqualTo(String value) { + addCriterion("consumer_goods <>", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsGreaterThan(String value) { + addCriterion("consumer_goods >", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsGreaterThanOrEqualTo(String value) { + addCriterion("consumer_goods >=", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsLessThan(String value) { + addCriterion("consumer_goods <", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsLessThanOrEqualTo(String value) { + addCriterion("consumer_goods <=", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsLike(String value) { + addCriterion("consumer_goods like", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotLike(String value) { + addCriterion("consumer_goods not like", value, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsIn(List values) { + addCriterion("consumer_goods in", values, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotIn(List values) { + addCriterion("consumer_goods not in", values, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsBetween(String value1, String value2) { + addCriterion("consumer_goods between", value1, value2, "consumerGoods"); + return (Criteria) this; + } + + public Criteria andConsumerGoodsNotBetween(String value1, String value2) { + addCriterion("consumer_goods not between", value1, value2, "consumerGoods"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/mapper/StuSpendingLevelMapper.java b/src/main/java/com/sztzjy/marketing/mapper/StuSpendingLevelMapper.java index 2bc0659..e928cad 100644 --- a/src/main/java/com/sztzjy/marketing/mapper/StuSpendingLevelMapper.java +++ b/src/main/java/com/sztzjy/marketing/mapper/StuSpendingLevelMapper.java @@ -4,9 +4,9 @@ import com.sztzjy.marketing.entity.StuSpendingLevel; import com.sztzjy.marketing.entity.StuSpendingLevelExample; import java.util.List; -import com.sztzjy.marketing.util.ResultEntity; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; - +@Mapper public interface StuSpendingLevelMapper { long countByExample(StuSpendingLevelExample example); @@ -30,6 +30,6 @@ public interface StuSpendingLevelMapper { int updateByPrimaryKey(StuSpendingLevel record); - void addList(@Param("stuSpendingLevels")List stuSpendingLevels); +// void addList(@Param("courseNameLists")List stuSpendingLevels); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/mapper/StuUserCommentMapper.java b/src/main/java/com/sztzjy/marketing/mapper/StuUserCommentMapper.java new file mode 100644 index 0000000..d34ff89 --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/mapper/StuUserCommentMapper.java @@ -0,0 +1,40 @@ +package com.sztzjy.marketing.mapper; + +import com.sztzjy.marketing.entity.StuUserComment; +import com.sztzjy.marketing.entity.StuUserCommentExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface StuUserCommentMapper { + long countByExample(StuUserCommentExample example); + + int deleteByExample(StuUserCommentExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuUserComment record); + + int insertSelective(StuUserComment record); + + List selectByExampleWithBLOBs(StuUserCommentExample example); + + List selectByExample(StuUserCommentExample example); + + StuUserComment selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuUserComment record, @Param("example") StuUserCommentExample example); + + int updateByExampleWithBLOBs(@Param("record") StuUserComment record, @Param("example") StuUserCommentExample example); + + int updateByExample(@Param("record") StuUserComment record, @Param("example") StuUserCommentExample example); + + int updateByPrimaryKeySelective(StuUserComment record); + + int updateByPrimaryKeyWithBLOBs(StuUserComment record); + + int updateByPrimaryKey(StuUserComment record); + + void addList(@Param("courseNameLists")List stuUserComments); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/mapper/StuUserSalesAbilityMapper.java b/src/main/java/com/sztzjy/marketing/mapper/StuUserSalesAbilityMapper.java new file mode 100644 index 0000000..e74b0b6 --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/mapper/StuUserSalesAbilityMapper.java @@ -0,0 +1,35 @@ +package com.sztzjy.marketing.mapper; + +import com.sztzjy.marketing.entity.StuSpendingLevel; +import com.sztzjy.marketing.entity.StuUserSalesAbility; +import com.sztzjy.marketing.entity.StuUserSalesAbilityExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface StuUserSalesAbilityMapper { + long countByExample(StuUserSalesAbilityExample example); + + int deleteByExample(StuUserSalesAbilityExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuUserSalesAbility record); + + int insertSelective(StuUserSalesAbility record); + + List selectByExample(StuUserSalesAbilityExample example); + + StuUserSalesAbility selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuUserSalesAbility record, @Param("example") StuUserSalesAbilityExample example); + + int updateByExample(@Param("record") StuUserSalesAbility record, @Param("example") StuUserSalesAbilityExample example); + + int updateByPrimaryKeySelective(StuUserSalesAbility record); + + int updateByPrimaryKey(StuUserSalesAbility record); + + void addList(@Param("courseNameLists")List stuUserSalesAbilities); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/mapper/StuUserShoppingCartMapper.java b/src/main/java/com/sztzjy/marketing/mapper/StuUserShoppingCartMapper.java new file mode 100644 index 0000000..c4265df --- /dev/null +++ b/src/main/java/com/sztzjy/marketing/mapper/StuUserShoppingCartMapper.java @@ -0,0 +1,32 @@ +package com.sztzjy.marketing.mapper; + +import com.sztzjy.marketing.entity.StuUserShoppingCart; +import com.sztzjy.marketing.entity.StuUserShoppingCartExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface StuUserShoppingCartMapper { + long countByExample(StuUserShoppingCartExample example); + + int deleteByExample(StuUserShoppingCartExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuUserShoppingCart record); + + int insertSelective(StuUserShoppingCart record); + + List selectByExample(StuUserShoppingCartExample example); + + StuUserShoppingCart selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuUserShoppingCart record, @Param("example") StuUserShoppingCartExample example); + + int updateByExample(@Param("record") StuUserShoppingCart record, @Param("example") StuUserShoppingCartExample example); + + int updateByPrimaryKeySelective(StuUserShoppingCart record); + + int updateByPrimaryKey(StuUserShoppingCart record); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/marketing/service/impl/StuDigitalMarketingModelServiceImpl.java b/src/main/java/com/sztzjy/marketing/service/impl/StuDigitalMarketingModelServiceImpl.java index fc074a6..67b12a0 100644 --- a/src/main/java/com/sztzjy/marketing/service/impl/StuDigitalMarketingModelServiceImpl.java +++ b/src/main/java/com/sztzjy/marketing/service/impl/StuDigitalMarketingModelServiceImpl.java @@ -50,16 +50,6 @@ public class StuDigitalMarketingModelServiceImpl implements StuDigitalMarketingM @Resource StuUploadExcelUserMapper uploadExcelUserMapper; - @Resource - StuSelectIndicatorsMapper indicatorsMapper; - @Resource - StuUserAttributeMapper userAttributeMapper; - @Resource - StuUserLoginActiveMapper userLoginActiveMapper; - @Resource - StuUserConsumptionAbilityMapper userConsumptionAbilityMapper; - @Resource - StuUserBehaviorMapper userBehaviorMapper; @Override public List dropdownBox(String userId) { @@ -67,7 +57,7 @@ public class StuDigitalMarketingModelServiceImpl implements StuDigitalMarketingM List list=stuTableNameMapper.getTableName(userId); if(list.isEmpty()){ //设置默认值 - String[] arr={"用户属性表","用户登录活跃表","用户消费能力表","用户行为表","用户评论表"}; + String[] arr={"客户细分数据表","销售预测数据表","购物车数据表","用户评论表"}; StuTableName stuTableName=new StuTableName(); for (int i = 0; i < arr.length; i++) { @@ -314,42 +304,36 @@ public class StuDigitalMarketingModelServiceImpl implements StuDigitalMarketingM List list=new ArrayList<>(); - if(algorithmName.equals("情感分析")){ - list.add("text"); - }else { - if(tableName.equals(Constant.YHSXB)){ + if(tableName.equals(Constant.KEHUXISHUJU)){ // list=indicatorsMapper.getYHSXB(); list.add("id"); - list.add("role_gender"); - list.add("role_age"); + list.add("gender"); + list.add("age"); + list.add("annual_income"); + list.add("spending_score"); } - if(tableName.equals(Constant.YHDLHYB)){ + else if(tableName.equals(Constant.YONGHUXIAOSHOUNLB)){ // list=indicatorsMapper.getYHDLHYB(); list.add("id"); - list.add("login_frequency"); - list.add("login_duration"); + list.add("sales_volume"); + list.add("sales_forehead"); } - if(tableName.equals(Constant.YHXFNLB)){ + else if(tableName.equals(Constant.GOUWUCHESHUJU)){ // list=indicatorsMapper.getYHXFNLB(); if(algorithmName.equals("关联规则挖掘")){ list.add("consumer_goods"); } else { list.add("id"); - list.add("consumer_amount"); - list.add("consumer_number"); - list.add("consumer_past_seven_days_amount"); - list.add("consumer_past_seven_days_number"); } } - if(tableName.equals(Constant.YHPLB) || tableName.equals(Constant.YHXWB)){ + else if(tableName.equals(Constant.YHPLB)){ // list=indicatorsMapper.getYHPLB(); - if(algorithmName.equals("关联规则挖掘")){ - list.add("goods_name"); + if(algorithmName.equals("情感分析")){ + list.add("content"); }else { list.add("id"); - list.add("user_behavior_type"); } }else { //查询导入的表数据 @@ -377,7 +361,6 @@ public class StuDigitalMarketingModelServiceImpl implements StuDigitalMarketingM } } - } return list; @@ -392,20 +375,20 @@ public class StuDigitalMarketingModelServiceImpl implements StuDigitalMarketingM String table=null; - if(analyzeDataDTO.getTableName().equals(Constant.YHSXB)){ //查询用户属性表 - table="stu_user_attribute"; + if(analyzeDataDTO.getTableName().equals(Constant.KEHUXISHUJU)){ //查询客户细分数据表 + table="stu_spending_level"; } - else if(analyzeDataDTO.getTableName().equals(Constant.YHDLHYB)){ //查询用户登录活跃表 - table="stu_user_login_active"; + else if(analyzeDataDTO.getTableName().equals(Constant.YONGHUXIAOSHOUNLB)){ //查询销售预测数据表 + table="stu_user_sales_ability"; } - else if(analyzeDataDTO.getTableName().equals(Constant.YHXFNLB)){ //查询用户消费能力表 - table="stu_user_consumption_ability"; + else if(analyzeDataDTO.getTableName().equals(Constant.GOUWUCHESHUJU)){ //查询购物车数据表 + table="stu_user_shopping_cart"; } - else if(analyzeDataDTO.getTableName().equals(Constant.YHPLB) || analyzeDataDTO.getTableName().equals(Constant.YHXWB)){ //查询用户评论或行为表 - table="stu_user_behavior"; + else if(analyzeDataDTO.getTableName().equals(Constant.YHPLB)){ //查询用户评论 + table="stu_user_comment"; }else { table="stu_upload_excel_user"; //查询用户自建表 diff --git a/src/main/resources/mappers/StuSpendingLevelMapper.xml b/src/main/resources/mappers/StuSpendingLevelMapper.xml index 388134f..c95a201 100644 --- a/src/main/resources/mappers/StuSpendingLevelMapper.xml +++ b/src/main/resources/mappers/StuSpendingLevelMapper.xml @@ -7,6 +7,7 @@ + @@ -67,7 +68,7 @@ - id, gender, age, annual_income, spending_score + id, gender, age, annual_income, spending_score, consumer_goods + + select + + distinct + + + , + + from stu_user_comment + + + + + order by ${orderByClause} + + + + + + delete from stu_user_comment + where id = #{id,jdbcType=INTEGER} + + + delete from stu_user_comment + + + + + + insert into stu_user_comment (id, creation_time, nick_name, + reference_name, content_type, content + ) + values (#{id,jdbcType=INTEGER}, #{creationTime,jdbcType=TIMESTAMP}, #{nickName,jdbcType=VARCHAR}, + #{referenceName,jdbcType=VARCHAR}, #{contentType,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} + ) + + + insert into stu_user_comment + + + id, + + + creation_time, + + + nick_name, + + + reference_name, + + + content_type, + + + content, + + + + + #{id,jdbcType=INTEGER}, + + + #{creationTime,jdbcType=TIMESTAMP}, + + + #{nickName,jdbcType=VARCHAR}, + + + #{referenceName,jdbcType=VARCHAR}, + + + #{contentType,jdbcType=VARCHAR}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update stu_user_comment + + + id = #{record.id,jdbcType=INTEGER}, + + + creation_time = #{record.creationTime,jdbcType=TIMESTAMP}, + + + nick_name = #{record.nickName,jdbcType=VARCHAR}, + + + reference_name = #{record.referenceName,jdbcType=VARCHAR}, + + + content_type = #{record.contentType,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update stu_user_comment + set id = #{record.id,jdbcType=INTEGER}, + creation_time = #{record.creationTime,jdbcType=TIMESTAMP}, + nick_name = #{record.nickName,jdbcType=VARCHAR}, + reference_name = #{record.referenceName,jdbcType=VARCHAR}, + content_type = #{record.contentType,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update stu_user_comment + set id = #{record.id,jdbcType=INTEGER}, + creation_time = #{record.creationTime,jdbcType=TIMESTAMP}, + nick_name = #{record.nickName,jdbcType=VARCHAR}, + reference_name = #{record.referenceName,jdbcType=VARCHAR}, + content_type = #{record.contentType,jdbcType=VARCHAR} + + + + + + update stu_user_comment + + + creation_time = #{creationTime,jdbcType=TIMESTAMP}, + + + nick_name = #{nickName,jdbcType=VARCHAR}, + + + reference_name = #{referenceName,jdbcType=VARCHAR}, + + + content_type = #{contentType,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update stu_user_comment + set creation_time = #{creationTime,jdbcType=TIMESTAMP}, + nick_name = #{nickName,jdbcType=VARCHAR}, + reference_name = #{referenceName,jdbcType=VARCHAR}, + content_type = #{contentType,jdbcType=VARCHAR}, + content = #{content,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update stu_user_comment + set creation_time = #{creationTime,jdbcType=TIMESTAMP}, + nick_name = #{nickName,jdbcType=VARCHAR}, + reference_name = #{referenceName,jdbcType=VARCHAR}, + content_type = #{contentType,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + INSERT INTO stu_user_comment (id, content, creation_time,nick_name,reference_name,content_type) + VALUES + + (#{stuUserComment.id}, #{stuUserComment.content}, #{stuUserComment.creationTime},#{stuUserComment.nickName},#{stuUserComment.referenceName},#{stuUserComment.contentType}) + + + \ No newline at end of file diff --git a/src/main/resources/mappers/StuUserSalesAbilityMapper.xml b/src/main/resources/mappers/StuUserSalesAbilityMapper.xml new file mode 100644 index 0000000..0f0e159 --- /dev/null +++ b/src/main/resources/mappers/StuUserSalesAbilityMapper.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, sales_volume, sales_forehead + + + + + delete from stu_user_sales_ability + where id = #{id,jdbcType=INTEGER} + + + delete from stu_user_sales_ability + + + + + + insert into stu_user_sales_ability (id, sales_volume, sales_forehead + ) + values (#{id,jdbcType=INTEGER}, #{salesVolume,jdbcType=INTEGER}, #{salesForehead,jdbcType=INTEGER} + ) + + + insert into stu_user_sales_ability + + + id, + + + sales_volume, + + + sales_forehead, + + + + + #{id,jdbcType=INTEGER}, + + + #{salesVolume,jdbcType=INTEGER}, + + + #{salesForehead,jdbcType=INTEGER}, + + + + + + update stu_user_sales_ability + + + id = #{record.id,jdbcType=INTEGER}, + + + sales_volume = #{record.salesVolume,jdbcType=INTEGER}, + + + sales_forehead = #{record.salesForehead,jdbcType=INTEGER}, + + + + + + + + update stu_user_sales_ability + set id = #{record.id,jdbcType=INTEGER}, + sales_volume = #{record.salesVolume,jdbcType=INTEGER}, + sales_forehead = #{record.salesForehead,jdbcType=INTEGER} + + + + + + update stu_user_sales_ability + + + sales_volume = #{salesVolume,jdbcType=INTEGER}, + + + sales_forehead = #{salesForehead,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + update stu_user_sales_ability + set sales_volume = #{salesVolume,jdbcType=INTEGER}, + sales_forehead = #{salesForehead,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + + INSERT INTO stu_user_sales_ability (id, sales_volume, sales_forehead) + VALUES + + (#{stuUserSalesAbility.id}, #{stuUserSalesAbility.salesVolume}, #{stuUserSalesAbility.salesForehead}) + + + \ No newline at end of file diff --git a/src/main/resources/mappers/StuUserShoppingCartMapper.xml b/src/main/resources/mappers/StuUserShoppingCartMapper.xml new file mode 100644 index 0000000..c966aca --- /dev/null +++ b/src/main/resources/mappers/StuUserShoppingCartMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, consumer_goods + + + + + delete from stu_user_shopping_cart + where id = #{id,jdbcType=INTEGER} + + + delete from stu_user_shopping_cart + + + + + + insert into stu_user_shopping_cart (id, consumer_goods) + values (#{id,jdbcType=INTEGER}, #{consumerGoods,jdbcType=VARCHAR}) + + + insert into stu_user_shopping_cart + + + id, + + + consumer_goods, + + + + + #{id,jdbcType=INTEGER}, + + + #{consumerGoods,jdbcType=VARCHAR}, + + + + + + update stu_user_shopping_cart + + + id = #{record.id,jdbcType=INTEGER}, + + + consumer_goods = #{record.consumerGoods,jdbcType=VARCHAR}, + + + + + + + + update stu_user_shopping_cart + set id = #{record.id,jdbcType=INTEGER}, + consumer_goods = #{record.consumerGoods,jdbcType=VARCHAR} + + + + + + update stu_user_shopping_cart + + + consumer_goods = #{consumerGoods,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update stu_user_shopping_cart + set consumer_goods = #{consumerGoods,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file