数字营销实训算法第四轮修改

master
@t2652009480 7 months ago
parent be68f9f94f
commit b472e7ebc9

@ -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";

@ -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<StuSpendingLevel> stuSpendingLevels=new ArrayList<>();
List<StuUserComment> stuUserComments=new ArrayList<>();
//获取数据
List<List<Object>> 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) {

@ -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 {
}
}
}

@ -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<Term> terms = HanLP.segment(text);
// // 创建词汇表
// Map<String, Integer> 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<Map.Entry<String, Integer>> wordList = new ArrayList<>(wordCount.entrySet());
// // 按词频排序
// wordList.sort((o1, o2) -> o2.getValue().compareTo(o1.getValue()));
// // 输出结果
// for (Map.Entry<String, Integer> entry : wordList) {
// System.out.println(entry.getKey() + ": " + entry.getValue());
// }
// }
}

@ -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();
}
}

@ -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<String> values) {
addCriterion("consumer_goods in", values, "consumerGoods");
return (Criteria) this;
}
public Criteria andConsumerGoodsNotIn(List<String> 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 {

@ -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();
}
}

@ -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<Criteria> 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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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<Date> values) {
addCriterion("creation_time in", values, "creationTime");
return (Criteria) this;
}
public Criteria andCreationTimeNotIn(List<Date> 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<String> values) {
addCriterion("nick_name in", values, "nickName");
return (Criteria) this;
}
public Criteria andNickNameNotIn(List<String> 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<String> values) {
addCriterion("reference_name in", values, "referenceName");
return (Criteria) this;
}
public Criteria andReferenceNameNotIn(List<String> 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<String> values) {
addCriterion("content_type in", values, "contentType");
return (Criteria) this;
}
public Criteria andContentTypeNotIn(List<String> 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);
}
}
}

@ -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;
}
}

@ -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<Criteria> 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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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<Integer> values) {
addCriterion("sales_volume in", values, "salesVolume");
return (Criteria) this;
}
public Criteria andSalesVolumeNotIn(List<Integer> 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<Integer> values) {
addCriterion("sales_forehead in", values, "salesForehead");
return (Criteria) this;
}
public Criteria andSalesForeheadNotIn(List<Integer> 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);
}
}
}

@ -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();
}
}

@ -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<Criteria> 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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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<String> values) {
addCriterion("consumer_goods in", values, "consumerGoods");
return (Criteria) this;
}
public Criteria andConsumerGoodsNotIn(List<String> 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);
}
}
}

@ -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<StuSpendingLevel> stuSpendingLevels);
// void addList(@Param("courseNameLists")List<StuSpendingLevel> stuSpendingLevels);
}

@ -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<StuUserComment> selectByExampleWithBLOBs(StuUserCommentExample example);
List<StuUserComment> 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<StuUserComment> stuUserComments);
}

@ -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<StuUserSalesAbility> 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<StuUserSalesAbility> stuUserSalesAbilities);
}

@ -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<StuUserShoppingCart> 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);
}

@ -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<String> dropdownBox(String userId) {
@ -67,7 +57,7 @@ public class StuDigitalMarketingModelServiceImpl implements StuDigitalMarketingM
List<String> 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<String> 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"; //查询用户自建表

@ -7,6 +7,7 @@
<result column="age" jdbcType="INTEGER" property="age" />
<result column="annual_income" jdbcType="INTEGER" property="annualIncome" />
<result column="spending_score" jdbcType="INTEGER" property="spendingScore" />
<result column="consumer_goods" jdbcType="VARCHAR" property="consumerGoods" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -67,7 +68,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, gender, age, annual_income, spending_score
id, gender, age, annual_income, spending_score, consumer_goods
</sql>
<select id="selectByExample" parameterType="com.sztzjy.marketing.entity.StuSpendingLevelExample" resultMap="BaseResultMap">
select
@ -101,9 +102,11 @@
</delete>
<insert id="insert" parameterType="com.sztzjy.marketing.entity.StuSpendingLevel">
insert into stu_spending_level (id, gender, age,
annual_income, spending_score)
annual_income, spending_score, consumer_goods
)
values (#{id,jdbcType=INTEGER}, #{gender,jdbcType=INTEGER}, #{age,jdbcType=INTEGER},
#{annualIncome,jdbcType=INTEGER}, #{spendingScore,jdbcType=INTEGER})
#{annualIncome,jdbcType=INTEGER}, #{spendingScore,jdbcType=INTEGER}, #{consumerGoods,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.marketing.entity.StuSpendingLevel">
insert into stu_spending_level
@ -123,6 +126,9 @@
<if test="spendingScore != null">
spending_score,
</if>
<if test="consumerGoods != null">
consumer_goods,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -140,9 +146,12 @@
<if test="spendingScore != null">
#{spendingScore,jdbcType=INTEGER},
</if>
<if test="consumerGoods != null">
#{consumerGoods,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.marketing.entity.StuSpendingLevelExample" resultType="java.lang.Long">
<select id="countByExample" parameterType="com.sztzjy.marketing.entity.StuSpendingLevelExample" resultType="java.lang.Long">
select count(*) from stu_spending_level
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
@ -166,6 +175,9 @@
<if test="record.spendingScore != null">
spending_score = #{record.spendingScore,jdbcType=INTEGER},
</if>
<if test="record.consumerGoods != null">
consumer_goods = #{record.consumerGoods,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -177,7 +189,8 @@
gender = #{record.gender,jdbcType=INTEGER},
age = #{record.age,jdbcType=INTEGER},
annual_income = #{record.annualIncome,jdbcType=INTEGER},
spending_score = #{record.spendingScore,jdbcType=INTEGER}
spending_score = #{record.spendingScore,jdbcType=INTEGER},
consumer_goods = #{record.consumerGoods,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -197,6 +210,9 @@
<if test="spendingScore != null">
spending_score = #{spendingScore,jdbcType=INTEGER},
</if>
<if test="consumerGoods != null">
consumer_goods = #{consumerGoods,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@ -205,14 +221,15 @@
set gender = #{gender,jdbcType=INTEGER},
age = #{age,jdbcType=INTEGER},
annual_income = #{annualIncome,jdbcType=INTEGER},
spending_score = #{spendingScore,jdbcType=INTEGER}
spending_score = #{spendingScore,jdbcType=INTEGER},
consumer_goods = #{consumerGoods,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="addList">
INSERT INTO stu_spending_level (id, gender, age, annual_income, spending_score)
VALUES
<foreach collection="stuSpendingLevels" item="stuSpendingLevel" separator=",">
(#{stuSpendingLevel.id}, #{stuSpendingLevel.gender}, #{stuSpendingLevel.age}, #{stuSpendingLevel.annualIncome}, #{stuSpendingLevel.spendingScore})
</foreach>
</insert>
<!-- <insert id="addList">-->
<!-- INSERT INTO stu_spending_level (id, gender, age, annual_income, spending_score)-->
<!-- VALUES-->
<!-- <foreach collection="stuSpendingLevels" item="stuSpendingLevel" separator=",">-->
<!-- (#{stuSpendingLevel.id}, #{stuSpendingLevel.gender}, #{stuSpendingLevel.age}, #{stuSpendingLevel.annualIncome}, #{stuSpendingLevel.spendingScore})-->
<!-- </foreach>-->
<!-- </insert>-->
</mapper>

@ -0,0 +1,277 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.marketing.mapper.StuUserCommentMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.marketing.entity.StuUserComment">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="creation_time" jdbcType="TIMESTAMP" property="creationTime" />
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="reference_name" jdbcType="VARCHAR" property="referenceName" />
<result column="content_type" jdbcType="VARCHAR" property="contentType" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.marketing.entity.StuUserComment">
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, creation_time, nick_name, reference_name, content_type
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.marketing.entity.StuUserCommentExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from stu_user_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.sztzjy.marketing.entity.StuUserCommentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_user_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from stu_user_comment
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_user_comment
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.marketing.entity.StuUserCommentExample">
delete from stu_user_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.marketing.entity.StuUserComment">
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>
<insert id="insertSelective" parameterType="com.sztzjy.marketing.entity.StuUserComment">
insert into stu_user_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="creationTime != null">
creation_time,
</if>
<if test="nickName != null">
nick_name,
</if>
<if test="referenceName != null">
reference_name,
</if>
<if test="contentType != null">
content_type,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="creationTime != null">
#{creationTime,jdbcType=TIMESTAMP},
</if>
<if test="nickName != null">
#{nickName,jdbcType=VARCHAR},
</if>
<if test="referenceName != null">
#{referenceName,jdbcType=VARCHAR},
</if>
<if test="contentType != null">
#{contentType,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.marketing.entity.StuUserCommentExample" resultType="java.lang.Long">
select count(*) from stu_user_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_user_comment
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.creationTime != null">
creation_time = #{record.creationTime,jdbcType=TIMESTAMP},
</if>
<if test="record.nickName != null">
nick_name = #{record.nickName,jdbcType=VARCHAR},
</if>
<if test="record.referenceName != null">
reference_name = #{record.referenceName,jdbcType=VARCHAR},
</if>
<if test="record.contentType != null">
content_type = #{record.contentType,jdbcType=VARCHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.marketing.entity.StuUserComment">
update stu_user_comment
<set>
<if test="creationTime != null">
creation_time = #{creationTime,jdbcType=TIMESTAMP},
</if>
<if test="nickName != null">
nick_name = #{nickName,jdbcType=VARCHAR},
</if>
<if test="referenceName != null">
reference_name = #{referenceName,jdbcType=VARCHAR},
</if>
<if test="contentType != null">
content_type = #{contentType,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.marketing.entity.StuUserComment">
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>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.marketing.entity.StuUserComment">
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}
</update>
<insert id="addList">
INSERT INTO stu_user_comment (id, content, creation_time,nick_name,reference_name,content_type)
VALUES
<foreach collection="courseNameLists" item="stuUserComment" separator=",">
(#{stuUserComment.id}, #{stuUserComment.content}, #{stuUserComment.creationTime},#{stuUserComment.nickName},#{stuUserComment.referenceName},#{stuUserComment.contentType})
</foreach>
</insert>
</mapper>

@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.marketing.mapper.StuUserSalesAbilityMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.marketing.entity.StuUserSalesAbility">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="sales_volume" jdbcType="INTEGER" property="salesVolume" />
<result column="sales_forehead" jdbcType="INTEGER" property="salesForehead" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, sales_volume, sales_forehead
</sql>
<select id="selectByExample" parameterType="com.sztzjy.marketing.entity.StuUserSalesAbilityExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_user_sales_ability
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from stu_user_sales_ability
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_user_sales_ability
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.marketing.entity.StuUserSalesAbilityExample">
delete from stu_user_sales_ability
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.marketing.entity.StuUserSalesAbility">
insert into stu_user_sales_ability (id, sales_volume, sales_forehead
)
values (#{id,jdbcType=INTEGER}, #{salesVolume,jdbcType=INTEGER}, #{salesForehead,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.marketing.entity.StuUserSalesAbility">
insert into stu_user_sales_ability
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="salesVolume != null">
sales_volume,
</if>
<if test="salesForehead != null">
sales_forehead,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="salesVolume != null">
#{salesVolume,jdbcType=INTEGER},
</if>
<if test="salesForehead != null">
#{salesForehead,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.marketing.entity.StuUserSalesAbilityExample" resultType="java.lang.Long">
select count(*) from stu_user_sales_ability
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_user_sales_ability
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.salesVolume != null">
sales_volume = #{record.salesVolume,jdbcType=INTEGER},
</if>
<if test="record.salesForehead != null">
sales_forehead = #{record.salesForehead,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update stu_user_sales_ability
set id = #{record.id,jdbcType=INTEGER},
sales_volume = #{record.salesVolume,jdbcType=INTEGER},
sales_forehead = #{record.salesForehead,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.marketing.entity.StuUserSalesAbility">
update stu_user_sales_ability
<set>
<if test="salesVolume != null">
sales_volume = #{salesVolume,jdbcType=INTEGER},
</if>
<if test="salesForehead != null">
sales_forehead = #{salesForehead,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.marketing.entity.StuUserSalesAbility">
update stu_user_sales_ability
set sales_volume = #{salesVolume,jdbcType=INTEGER},
sales_forehead = #{salesForehead,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="addList">
INSERT INTO stu_user_sales_ability (id, sales_volume, sales_forehead)
VALUES
<foreach collection="courseNameLists" item="stuUserSalesAbility" separator=",">
(#{stuUserSalesAbility.id}, #{stuUserSalesAbility.salesVolume}, #{stuUserSalesAbility.salesForehead})
</foreach>
</insert>
</mapper>

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.marketing.mapper.StuUserShoppingCartMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.marketing.entity.StuUserShoppingCart">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="consumer_goods" jdbcType="VARCHAR" property="consumerGoods" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, consumer_goods
</sql>
<select id="selectByExample" parameterType="com.sztzjy.marketing.entity.StuUserShoppingCartExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_user_shopping_cart
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from stu_user_shopping_cart
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_user_shopping_cart
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.marketing.entity.StuUserShoppingCartExample">
delete from stu_user_shopping_cart
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.marketing.entity.StuUserShoppingCart">
insert into stu_user_shopping_cart (id, consumer_goods)
values (#{id,jdbcType=INTEGER}, #{consumerGoods,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.marketing.entity.StuUserShoppingCart">
insert into stu_user_shopping_cart
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="consumerGoods != null">
consumer_goods,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="consumerGoods != null">
#{consumerGoods,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.marketing.entity.StuUserShoppingCartExample" resultType="java.lang.Long">
select count(*) from stu_user_shopping_cart
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_user_shopping_cart
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.consumerGoods != null">
consumer_goods = #{record.consumerGoods,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update stu_user_shopping_cart
set id = #{record.id,jdbcType=INTEGER},
consumer_goods = #{record.consumerGoods,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.marketing.entity.StuUserShoppingCart">
update stu_user_shopping_cart
<set>
<if test="consumerGoods != null">
consumer_goods = #{consumerGoods,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.marketing.entity.StuUserShoppingCart">
update stu_user_shopping_cart
set consumer_goods = #{consumerGoods,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
Loading…
Cancel
Save