From 538a022ee2a73bd84c1de112f2287016c7cc198b Mon Sep 17 00:00:00 2001 From: zhangye <654600784@qq.com> Date: Fri, 17 Jan 2020 10:41:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=BE=AE=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ccsens/game/bean/po/GameGroup.java | 84 + .../ccsens/game/bean/po/GameGroupExample.java | 571 +++++++ .../com/ccsens/game/bean/po/GameType.java | 11 + .../ccsens/game/bean/po/GameTypeExample.java | 60 + .../game/bean/po/GameUserJoinGroup.java | 84 + .../bean/po/GameUserJoinGroupExample.java | 561 ++++++ .../game/persist/mapper/GameGroupMapper.java | 30 + .../mapper/GameUserJoinGroupMapper.java | 30 + .../resources/mapper_raw/GameGroupMapper.xml | 228 +++ .../resources/mapper_raw/GameTypeMapper.xml | 27 +- .../mapper_raw/GameUserJoinGroupMapper.xml | 228 +++ game/src/main/resources/mbg.xml | 7 +- .../com/ccsens/mt/bean/po/MtSigninBasic.java | 117 ++ .../mt/bean/po/MtSigninBasicExample.java | 741 ++++++++ .../com/ccsens/mt/bean/po/MtSigninOther.java | 95 ++ .../mt/bean/po/MtSigninOtherExample.java | 641 +++++++ .../persist/mapper/MtSigninBasicMapper.java | 30 + .../persist/mapper/MtSigninOtherMapper.java | 30 + .../mapper_raw/MtSigninBasicMapper.xml | 276 +++ .../mapper_raw/MtSigninOtherMapper.xml | 243 +++ pom.xml | 6 + .../com/ccsens/tall/bean/dto/UserDto.java | 33 +- .../ccsens/tall/bean/po/ProPluginSignin.java | 106 ++ .../tall/bean/po/ProPluginSigninExample.java | 681 ++++++++ .../tall/bean/po/ProPluginSigninFuzzy.java | 95 ++ .../bean/po/ProPluginSigninFuzzyExample.java | 631 +++++++ .../com/ccsens/tall/bean/po/SigninField.java | 117 ++ .../tall/bean/po/SigninFieldExample.java | 781 +++++++++ .../ccsens/tall/bean/po/SysBalanceLog.java | 232 +-- .../tall/bean/po/SysBalanceLogExample.java | 1500 ++++++++--------- .../java/com/ccsens/tall/bean/vo/UserVo.java | 4 - .../tall/persist/dao/SysBalanceLogDao.java | 8 + .../ccsens/tall/persist/dao/SysUserDao.java | 15 + .../mapper/ProPluginSigninFuzzyMapper.java | 30 + .../persist/mapper/ProPluginSigninMapper.java | 30 + .../persist/mapper/SigninFieldMapper.java | 30 + .../persist/mapper/SysBalanceLogMapper.java | 59 +- .../com/ccsens/tall/service/ExcelService.java | 364 ++-- .../ccsens/tall/service/IExcelService.java | 2 + .../com/ccsens/tall/service/IUserService.java | 5 +- .../tall/service/IWbsSubSheetService.java | 18 + .../com/ccsens/tall/service/UserService.java | 504 ++++-- .../tall/service/WbsSubSheetService.java | 252 +++ .../com/ccsens/tall/web/UserController.java | 94 +- .../main/resources/mapper_dao/SysUserDao.xml | 69 + .../mapper_raw/ProPluginSigninFuzzyMapper.xml | 243 +++ .../mapper_raw/ProPluginSigninMapper.xml | 259 +++ .../mapper_raw/SigninFieldMapper.xml | 275 +++ .../mapper_raw/SysBalanceLogMapper.xml | 548 +++--- .../main/java/com/ccsens/util/CodeEnum.java | 8 +- .../java/com/ccsens/util/WebConstant.java | 2 + .../main/java/com/ccsens/util/WechatUtil.java | 860 +++++----- .../test/java/com/ccsens/util/RandomRest.java | 15 + 53 files changed, 9982 insertions(+), 1988 deletions(-) create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameGroup.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroup.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroupExample.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameGroupMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameUserJoinGroupMapper.java create mode 100644 game/src/main/resources/mapper_raw/GameGroupMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameUserJoinGroupMapper.xml create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtSigninBasic.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtSigninBasicExample.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtSigninOther.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtSigninOtherExample.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/mapper/MtSigninBasicMapper.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/mapper/MtSigninOtherMapper.java create mode 100644 mt/src/main/resources/mapper_raw/MtSigninBasicMapper.xml create mode 100644 mt/src/main/resources/mapper_raw/MtSigninOtherMapper.xml create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSignin.java create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninExample.java create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzy.java create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzyExample.java create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/SigninField.java create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/SigninFieldExample.java create mode 100644 tall/src/main/java/com/ccsens/tall/persist/dao/SysBalanceLogDao.java create mode 100644 tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninFuzzyMapper.java create mode 100644 tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninMapper.java create mode 100644 tall/src/main/java/com/ccsens/tall/persist/mapper/SigninFieldMapper.java create mode 100644 tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java create mode 100644 tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java create mode 100644 tall/src/main/resources/mapper_dao/SysUserDao.xml create mode 100644 tall/src/main/resources/mapper_raw/ProPluginSigninFuzzyMapper.xml create mode 100644 tall/src/main/resources/mapper_raw/ProPluginSigninMapper.xml create mode 100644 tall/src/main/resources/mapper_raw/SigninFieldMapper.xml create mode 100644 util/src/test/java/com/ccsens/util/RandomRest.java diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameGroup.java b/game/src/main/java/com/ccsens/game/bean/po/GameGroup.java new file mode 100644 index 00000000..6dc1675f --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameGroup.java @@ -0,0 +1,84 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameGroup implements Serializable { + private Long id; + + private Long recordId; + + private String name; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRecordId() { + return recordId; + } + + public void setRecordId(Long recordId) { + this.recordId = recordId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", recordId=").append(recordId); + sb.append(", name=").append(name); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java new file mode 100644 index 00000000..5c937e0d --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java @@ -0,0 +1,571 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameGroupExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(Long value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(Long value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(Long value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(Long value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(Long value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(Long value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(Long value1, Long value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(Long value1, Long value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + 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/game/src/main/java/com/ccsens/game/bean/po/GameType.java b/game/src/main/java/com/ccsens/game/bean/po/GameType.java index fb7e0b3c..4afa767e 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameType.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameType.java @@ -18,6 +18,8 @@ public class GameType implements Serializable { private String clientUrl; + private Byte isGroup; + private Date createdAt; private Date updatedAt; @@ -82,6 +84,14 @@ public class GameType implements Serializable { this.clientUrl = clientUrl == null ? null : clientUrl.trim(); } + public Byte getIsGroup() { + return isGroup; + } + + public void setIsGroup(Byte isGroup) { + this.isGroup = isGroup; + } + public Date getCreatedAt() { return createdAt; } @@ -119,6 +129,7 @@ public class GameType implements Serializable { sb.append(", payType=").append(payType); sb.append(", screenUrl=").append(screenUrl); sb.append(", clientUrl=").append(clientUrl); + sb.append(", isGroup=").append(isGroup); sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java index 4e4012da..051133ec 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java @@ -575,6 +575,66 @@ public class GameTypeExample { return (Criteria) this; } + public Criteria andIsGroupIsNull() { + addCriterion("is_group is null"); + return (Criteria) this; + } + + public Criteria andIsGroupIsNotNull() { + addCriterion("is_group is not null"); + return (Criteria) this; + } + + public Criteria andIsGroupEqualTo(Byte value) { + addCriterion("is_group =", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupNotEqualTo(Byte value) { + addCriterion("is_group <>", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupGreaterThan(Byte value) { + addCriterion("is_group >", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupGreaterThanOrEqualTo(Byte value) { + addCriterion("is_group >=", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupLessThan(Byte value) { + addCriterion("is_group <", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupLessThanOrEqualTo(Byte value) { + addCriterion("is_group <=", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupIn(List values) { + addCriterion("is_group in", values, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupNotIn(List values) { + addCriterion("is_group not in", values, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupBetween(Byte value1, Byte value2) { + addCriterion("is_group between", value1, value2, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupNotBetween(Byte value1, Byte value2) { + addCriterion("is_group not between", value1, value2, "isGroup"); + return (Criteria) this; + } + public Criteria andCreatedAtIsNull() { addCriterion("created_at is null"); return (Criteria) this; diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroup.java b/game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroup.java new file mode 100644 index 00000000..c1be37d6 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroup.java @@ -0,0 +1,84 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameUserJoinGroup implements Serializable { + private Long id; + + private Long userJoinId; + + private Long gameGroupId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserJoinId() { + return userJoinId; + } + + public void setUserJoinId(Long userJoinId) { + this.userJoinId = userJoinId; + } + + public Long getGameGroupId() { + return gameGroupId; + } + + public void setGameGroupId(Long gameGroupId) { + this.gameGroupId = gameGroupId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userJoinId=").append(userJoinId); + sb.append(", gameGroupId=").append(gameGroupId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroupExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroupExample.java new file mode 100644 index 00000000..bec23189 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameUserJoinGroupExample.java @@ -0,0 +1,561 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameUserJoinGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameUserJoinGroupExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserJoinIdIsNull() { + addCriterion("user_join_id is null"); + return (Criteria) this; + } + + public Criteria andUserJoinIdIsNotNull() { + addCriterion("user_join_id is not null"); + return (Criteria) this; + } + + public Criteria andUserJoinIdEqualTo(Long value) { + addCriterion("user_join_id =", value, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdNotEqualTo(Long value) { + addCriterion("user_join_id <>", value, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdGreaterThan(Long value) { + addCriterion("user_join_id >", value, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_join_id >=", value, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdLessThan(Long value) { + addCriterion("user_join_id <", value, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdLessThanOrEqualTo(Long value) { + addCriterion("user_join_id <=", value, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdIn(List values) { + addCriterion("user_join_id in", values, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdNotIn(List values) { + addCriterion("user_join_id not in", values, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdBetween(Long value1, Long value2) { + addCriterion("user_join_id between", value1, value2, "userJoinId"); + return (Criteria) this; + } + + public Criteria andUserJoinIdNotBetween(Long value1, Long value2) { + addCriterion("user_join_id not between", value1, value2, "userJoinId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdIsNull() { + addCriterion("game_group_id is null"); + return (Criteria) this; + } + + public Criteria andGameGroupIdIsNotNull() { + addCriterion("game_group_id is not null"); + return (Criteria) this; + } + + public Criteria andGameGroupIdEqualTo(Long value) { + addCriterion("game_group_id =", value, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdNotEqualTo(Long value) { + addCriterion("game_group_id <>", value, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdGreaterThan(Long value) { + addCriterion("game_group_id >", value, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("game_group_id >=", value, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdLessThan(Long value) { + addCriterion("game_group_id <", value, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdLessThanOrEqualTo(Long value) { + addCriterion("game_group_id <=", value, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdIn(List values) { + addCriterion("game_group_id in", values, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdNotIn(List values) { + addCriterion("game_group_id not in", values, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdBetween(Long value1, Long value2) { + addCriterion("game_group_id between", value1, value2, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andGameGroupIdNotBetween(Long value1, Long value2) { + addCriterion("game_group_id not between", value1, value2, "gameGroupId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + 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/game/src/main/java/com/ccsens/game/persist/mapper/GameGroupMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameGroupMapper.java new file mode 100644 index 00000000..40074692 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameGroupMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameGroup; +import com.ccsens.game.bean.po.GameGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameGroupMapper { + long countByExample(GameGroupExample example); + + int deleteByExample(GameGroupExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameGroup record); + + int insertSelective(GameGroup record); + + List selectByExample(GameGroupExample example); + + GameGroup selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameGroup record, @Param("example") GameGroupExample example); + + int updateByExample(@Param("record") GameGroup record, @Param("example") GameGroupExample example); + + int updateByPrimaryKeySelective(GameGroup record); + + int updateByPrimaryKey(GameGroup record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameUserJoinGroupMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameUserJoinGroupMapper.java new file mode 100644 index 00000000..5625c64e --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameUserJoinGroupMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameUserJoinGroup; +import com.ccsens.game.bean.po.GameUserJoinGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameUserJoinGroupMapper { + long countByExample(GameUserJoinGroupExample example); + + int deleteByExample(GameUserJoinGroupExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameUserJoinGroup record); + + int insertSelective(GameUserJoinGroup record); + + List selectByExample(GameUserJoinGroupExample example); + + GameUserJoinGroup selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameUserJoinGroup record, @Param("example") GameUserJoinGroupExample example); + + int updateByExample(@Param("record") GameUserJoinGroup record, @Param("example") GameUserJoinGroupExample example); + + int updateByPrimaryKeySelective(GameUserJoinGroup record); + + int updateByPrimaryKey(GameUserJoinGroup record); +} \ No newline at end of file diff --git a/game/src/main/resources/mapper_raw/GameGroupMapper.xml b/game/src/main/resources/mapper_raw/GameGroupMapper.xml new file mode 100644 index 00000000..6cf9a973 --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameGroupMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + 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, record_id, name, created_at, updated_at, rec_status + + + + + delete from t_game_group + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_group + + + + + + insert into t_game_group (id, record_id, name, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_game_group + + + id, + + + record_id, + + + name, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{recordId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_group + + + id = #{record.id,jdbcType=BIGINT}, + + + record_id = #{record.recordId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_group + set id = #{record.id,jdbcType=BIGINT}, + record_id = #{record.recordId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_group + + + record_id = #{recordId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_group + set record_id = #{recordId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/game/src/main/resources/mapper_raw/GameTypeMapper.xml b/game/src/main/resources/mapper_raw/GameTypeMapper.xml index d9241b8d..187e6d62 100644 --- a/game/src/main/resources/mapper_raw/GameTypeMapper.xml +++ b/game/src/main/resources/mapper_raw/GameTypeMapper.xml @@ -9,6 +9,7 @@ + @@ -72,8 +73,8 @@ - id, code, name, description, pay_type, screen_url, client_url, created_at, updated_at, - rec_status + id, code, name, description, pay_type, screen_url, client_url, is_group, created_at, + updated_at, rec_status + select + + distinct + + + from t_game_user_join_group + + + + + order by ${orderByClause} + + + + + delete from t_game_user_join_group + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_user_join_group + + + + + + insert into t_game_user_join_group (id, user_join_id, game_group_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{userJoinId,jdbcType=BIGINT}, #{gameGroupId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_game_user_join_group + + + id, + + + user_join_id, + + + game_group_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userJoinId,jdbcType=BIGINT}, + + + #{gameGroupId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_user_join_group + + + id = #{record.id,jdbcType=BIGINT}, + + + user_join_id = #{record.userJoinId,jdbcType=BIGINT}, + + + game_group_id = #{record.gameGroupId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_user_join_group + set id = #{record.id,jdbcType=BIGINT}, + user_join_id = #{record.userJoinId,jdbcType=BIGINT}, + game_group_id = #{record.gameGroupId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_user_join_group + + + user_join_id = #{userJoinId,jdbcType=BIGINT}, + + + game_group_id = #{gameGroupId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_user_join_group + set user_join_id = #{userJoinId,jdbcType=BIGINT}, + game_group_id = #{gameGroupId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/game/src/main/resources/mbg.xml b/game/src/main/resources/mbg.xml index c1d74b85..915dd651 100644 --- a/game/src/main/resources/mbg.xml +++ b/game/src/main/resources/mbg.xml @@ -55,14 +55,17 @@ - +
-
+ +
+
+ + + org.apache.commons + commons-lang3 + 3.8.1 + diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java index f992c983..16c4a826 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java @@ -101,10 +101,8 @@ public class UserDto { public static class WxMergePhone{ @ApiModelProperty("手机号") private String phone; - @ApiModelProperty("手机验证码") - private String smsCode; - @ApiModelProperty("微信code") - private String wxCode; + @ApiModelProperty("合并方式 0直接合并 1不合并以前的信息") + private int isMerge; } @Data @@ -114,11 +112,26 @@ public class UserDto { private String phone; @ApiModelProperty("手机验证码") private String smsCode; - @ApiModelProperty("用户名") - private String username; - @ApiModelProperty("密码") - private String password; - @ApiModelProperty("微信code") - private String wxCode; + } + + @Data + @ApiModel + public static class WxInfo{ +// @ApiModelProperty("用户id") +// private String userId; + @ApiModelProperty("微信名") + private String nickname; + @ApiModelProperty("微信头像") + private String headImgUrl; + @ApiModelProperty("性别") + private Byte sex; + @ApiModelProperty("省") + private String province; + @ApiModelProperty("市") + private String city; + @ApiModelProperty("国家") + private String country; + @ApiModelProperty("语言") + private String language; } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSignin.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSignin.java new file mode 100644 index 00000000..b5ad1f60 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSignin.java @@ -0,0 +1,106 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProPluginSignin implements Serializable { + private Long id; + + private Long taskPluginId; + + private Long signinFieldId; + + private Byte isFuzzy; + + private Byte isRequired; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getTaskPluginId() { + return taskPluginId; + } + + public void setTaskPluginId(Long taskPluginId) { + this.taskPluginId = taskPluginId; + } + + public Long getSigninFieldId() { + return signinFieldId; + } + + public void setSigninFieldId(Long signinFieldId) { + this.signinFieldId = signinFieldId; + } + + public Byte getIsFuzzy() { + return isFuzzy; + } + + public void setIsFuzzy(Byte isFuzzy) { + this.isFuzzy = isFuzzy; + } + + public Byte getIsRequired() { + return isRequired; + } + + public void setIsRequired(Byte isRequired) { + this.isRequired = isRequired; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", taskPluginId=").append(taskPluginId); + sb.append(", signinFieldId=").append(signinFieldId); + sb.append(", isFuzzy=").append(isFuzzy); + sb.append(", isRequired=").append(isRequired); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninExample.java new file mode 100644 index 00000000..4daf58f0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninExample.java @@ -0,0 +1,681 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProPluginSigninExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProPluginSigninExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdIsNull() { + addCriterion("task_plugin_id is null"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdIsNotNull() { + addCriterion("task_plugin_id is not null"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdEqualTo(Long value) { + addCriterion("task_plugin_id =", value, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdNotEqualTo(Long value) { + addCriterion("task_plugin_id <>", value, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdGreaterThan(Long value) { + addCriterion("task_plugin_id >", value, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdGreaterThanOrEqualTo(Long value) { + addCriterion("task_plugin_id >=", value, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdLessThan(Long value) { + addCriterion("task_plugin_id <", value, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdLessThanOrEqualTo(Long value) { + addCriterion("task_plugin_id <=", value, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdIn(List values) { + addCriterion("task_plugin_id in", values, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdNotIn(List values) { + addCriterion("task_plugin_id not in", values, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdBetween(Long value1, Long value2) { + addCriterion("task_plugin_id between", value1, value2, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andTaskPluginIdNotBetween(Long value1, Long value2) { + addCriterion("task_plugin_id not between", value1, value2, "taskPluginId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdIsNull() { + addCriterion("signin_field_id is null"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdIsNotNull() { + addCriterion("signin_field_id is not null"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdEqualTo(Long value) { + addCriterion("signin_field_id =", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdNotEqualTo(Long value) { + addCriterion("signin_field_id <>", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdGreaterThan(Long value) { + addCriterion("signin_field_id >", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdGreaterThanOrEqualTo(Long value) { + addCriterion("signin_field_id >=", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdLessThan(Long value) { + addCriterion("signin_field_id <", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdLessThanOrEqualTo(Long value) { + addCriterion("signin_field_id <=", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdIn(List values) { + addCriterion("signin_field_id in", values, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdNotIn(List values) { + addCriterion("signin_field_id not in", values, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdBetween(Long value1, Long value2) { + addCriterion("signin_field_id between", value1, value2, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdNotBetween(Long value1, Long value2) { + addCriterion("signin_field_id not between", value1, value2, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andIsFuzzyIsNull() { + addCriterion("is_fuzzy is null"); + return (Criteria) this; + } + + public Criteria andIsFuzzyIsNotNull() { + addCriterion("is_fuzzy is not null"); + return (Criteria) this; + } + + public Criteria andIsFuzzyEqualTo(Byte value) { + addCriterion("is_fuzzy =", value, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyNotEqualTo(Byte value) { + addCriterion("is_fuzzy <>", value, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyGreaterThan(Byte value) { + addCriterion("is_fuzzy >", value, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyGreaterThanOrEqualTo(Byte value) { + addCriterion("is_fuzzy >=", value, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyLessThan(Byte value) { + addCriterion("is_fuzzy <", value, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyLessThanOrEqualTo(Byte value) { + addCriterion("is_fuzzy <=", value, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyIn(List values) { + addCriterion("is_fuzzy in", values, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyNotIn(List values) { + addCriterion("is_fuzzy not in", values, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyBetween(Byte value1, Byte value2) { + addCriterion("is_fuzzy between", value1, value2, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsFuzzyNotBetween(Byte value1, Byte value2) { + addCriterion("is_fuzzy not between", value1, value2, "isFuzzy"); + return (Criteria) this; + } + + public Criteria andIsRequiredIsNull() { + addCriterion("is_required is null"); + return (Criteria) this; + } + + public Criteria andIsRequiredIsNotNull() { + addCriterion("is_required is not null"); + return (Criteria) this; + } + + public Criteria andIsRequiredEqualTo(Byte value) { + addCriterion("is_required =", value, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredNotEqualTo(Byte value) { + addCriterion("is_required <>", value, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredGreaterThan(Byte value) { + addCriterion("is_required >", value, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredGreaterThanOrEqualTo(Byte value) { + addCriterion("is_required >=", value, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredLessThan(Byte value) { + addCriterion("is_required <", value, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredLessThanOrEqualTo(Byte value) { + addCriterion("is_required <=", value, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredIn(List values) { + addCriterion("is_required in", values, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredNotIn(List values) { + addCriterion("is_required not in", values, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredBetween(Byte value1, Byte value2) { + addCriterion("is_required between", value1, value2, "isRequired"); + return (Criteria) this; + } + + public Criteria andIsRequiredNotBetween(Byte value1, Byte value2) { + addCriterion("is_required not between", value1, value2, "isRequired"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + 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/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzy.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzy.java new file mode 100644 index 00000000..9bc9d638 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzy.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProPluginSigninFuzzy implements Serializable { + private Long id; + + private Long projectId; + + private Long signinFieldId; + + private String description; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getSigninFieldId() { + return signinFieldId; + } + + public void setSigninFieldId(Long signinFieldId) { + this.signinFieldId = signinFieldId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", signinFieldId=").append(signinFieldId); + sb.append(", description=").append(description); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzyExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzyExample.java new file mode 100644 index 00000000..077f123a --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProPluginSigninFuzzyExample.java @@ -0,0 +1,631 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProPluginSigninFuzzyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProPluginSigninFuzzyExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdIsNull() { + addCriterion("signin_field_id is null"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdIsNotNull() { + addCriterion("signin_field_id is not null"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdEqualTo(Long value) { + addCriterion("signin_field_id =", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdNotEqualTo(Long value) { + addCriterion("signin_field_id <>", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdGreaterThan(Long value) { + addCriterion("signin_field_id >", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdGreaterThanOrEqualTo(Long value) { + addCriterion("signin_field_id >=", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdLessThan(Long value) { + addCriterion("signin_field_id <", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdLessThanOrEqualTo(Long value) { + addCriterion("signin_field_id <=", value, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdIn(List values) { + addCriterion("signin_field_id in", values, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdNotIn(List values) { + addCriterion("signin_field_id not in", values, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdBetween(Long value1, Long value2) { + addCriterion("signin_field_id between", value1, value2, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andSigninFieldIdNotBetween(Long value1, Long value2) { + addCriterion("signin_field_id not between", value1, value2, "signinFieldId"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + 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/tall/src/main/java/com/ccsens/tall/bean/po/SigninField.java b/tall/src/main/java/com/ccsens/tall/bean/po/SigninField.java new file mode 100644 index 00000000..647acdb8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SigninField.java @@ -0,0 +1,117 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SigninField implements Serializable { + private Long id; + + private String description; + + private String name; + + private Byte type; + + private String fieldValue; + + private String format; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue == null ? null : fieldValue.trim(); + } + + public String getFormat() { + return format; + } + + public void setFormat(String format) { + this.format = format == null ? null : format.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", description=").append(description); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", fieldValue=").append(fieldValue); + sb.append(", format=").append(format); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SigninFieldExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SigninFieldExample.java new file mode 100644 index 00000000..3d117e56 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SigninFieldExample.java @@ -0,0 +1,781 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SigninFieldExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SigninFieldExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andFieldValueIsNull() { + addCriterion("field_value is null"); + return (Criteria) this; + } + + public Criteria andFieldValueIsNotNull() { + addCriterion("field_value is not null"); + return (Criteria) this; + } + + public Criteria andFieldValueEqualTo(String value) { + addCriterion("field_value =", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueNotEqualTo(String value) { + addCriterion("field_value <>", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueGreaterThan(String value) { + addCriterion("field_value >", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueGreaterThanOrEqualTo(String value) { + addCriterion("field_value >=", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueLessThan(String value) { + addCriterion("field_value <", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueLessThanOrEqualTo(String value) { + addCriterion("field_value <=", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueLike(String value) { + addCriterion("field_value like", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueNotLike(String value) { + addCriterion("field_value not like", value, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueIn(List values) { + addCriterion("field_value in", values, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueNotIn(List values) { + addCriterion("field_value not in", values, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueBetween(String value1, String value2) { + addCriterion("field_value between", value1, value2, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFieldValueNotBetween(String value1, String value2) { + addCriterion("field_value not between", value1, value2, "fieldValue"); + return (Criteria) this; + } + + public Criteria andFormatIsNull() { + addCriterion("format is null"); + return (Criteria) this; + } + + public Criteria andFormatIsNotNull() { + addCriterion("format is not null"); + return (Criteria) this; + } + + public Criteria andFormatEqualTo(String value) { + addCriterion("format =", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatNotEqualTo(String value) { + addCriterion("format <>", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatGreaterThan(String value) { + addCriterion("format >", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatGreaterThanOrEqualTo(String value) { + addCriterion("format >=", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatLessThan(String value) { + addCriterion("format <", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatLessThanOrEqualTo(String value) { + addCriterion("format <=", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatLike(String value) { + addCriterion("format like", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatNotLike(String value) { + addCriterion("format not like", value, "format"); + return (Criteria) this; + } + + public Criteria andFormatIn(List values) { + addCriterion("format in", values, "format"); + return (Criteria) this; + } + + public Criteria andFormatNotIn(List values) { + addCriterion("format not in", values, "format"); + return (Criteria) this; + } + + public Criteria andFormatBetween(String value1, String value2) { + addCriterion("format between", value1, value2, "format"); + return (Criteria) this; + } + + public Criteria andFormatNotBetween(String value1, String value2) { + addCriterion("format not between", value1, value2, "format"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + 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/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLog.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLog.java index e614a4e5..c7d45c92 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLog.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLog.java @@ -1,117 +1,117 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class SysBalanceLog implements Serializable { - private Long id; - - private Long userId; - - private Integer balance; - - private Integer offset; - - private Integer type; - - private String phase; - - private Date createdAt; - - private Date updatedAt; - - private Byte recStatus; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Integer getBalance() { - return balance; - } - - public void setBalance(Integer balance) { - this.balance = balance; - } - - public Integer getOffset() { - return offset; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getType() { - return type; - } - - public void setType(Integer type) { - this.type = type; - } - - public String getPhase() { - return phase; - } - - public void setPhase(String phase) { - this.phase = phase == null ? null : phase.trim(); - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public Byte getRecStatus() { - return recStatus; - } - - public void setRecStatus(Byte recStatus) { - this.recStatus = recStatus; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", userId=").append(userId); - sb.append(", balance=").append(balance); - sb.append(", offset=").append(offset); - sb.append(", type=").append(type); - sb.append(", phase=").append(phase); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); - sb.append("]"); - return sb.toString(); - } +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysBalanceLog implements Serializable { + private Long id; + + private Long userId; + + private Long balance; + + private Long offset; + + private Integer type; + + private String description; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getBalance() { + return balance; + } + + public void setBalance(Long balance) { + this.balance = balance; + } + + public Long getOffset() { + return offset; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", balance=").append(balance); + sb.append(", offset=").append(offset); + sb.append(", type=").append(type); + sb.append(", description=").append(description); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLogExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLogExample.java index 8ca70bee..883dbf75 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLogExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysBalanceLogExample.java @@ -1,751 +1,751 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class SysBalanceLogExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SysBalanceLogExample() { - 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(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andUserIdIsNull() { - addCriterion("user_id is null"); - return (Criteria) this; - } - - public Criteria andUserIdIsNotNull() { - addCriterion("user_id is not null"); - return (Criteria) this; - } - - public Criteria andUserIdEqualTo(Long value) { - addCriterion("user_id =", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotEqualTo(Long value) { - addCriterion("user_id <>", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThan(Long value) { - addCriterion("user_id >", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThanOrEqualTo(Long value) { - addCriterion("user_id >=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThan(Long value) { - addCriterion("user_id <", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThanOrEqualTo(Long value) { - addCriterion("user_id <=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdIn(List values) { - addCriterion("user_id in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotIn(List values) { - addCriterion("user_id not in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdBetween(Long value1, Long value2) { - addCriterion("user_id between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotBetween(Long value1, Long value2) { - addCriterion("user_id not between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andBalanceIsNull() { - addCriterion("balance is null"); - return (Criteria) this; - } - - public Criteria andBalanceIsNotNull() { - addCriterion("balance is not null"); - return (Criteria) this; - } - - public Criteria andBalanceEqualTo(Integer value) { - addCriterion("balance =", value, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceNotEqualTo(Integer value) { - addCriterion("balance <>", value, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceGreaterThan(Integer value) { - addCriterion("balance >", value, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceGreaterThanOrEqualTo(Integer value) { - addCriterion("balance >=", value, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceLessThan(Integer value) { - addCriterion("balance <", value, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceLessThanOrEqualTo(Integer value) { - addCriterion("balance <=", value, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceIn(List values) { - addCriterion("balance in", values, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceNotIn(List values) { - addCriterion("balance not in", values, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceBetween(Integer value1, Integer value2) { - addCriterion("balance between", value1, value2, "balance"); - return (Criteria) this; - } - - public Criteria andBalanceNotBetween(Integer value1, Integer value2) { - addCriterion("balance not between", value1, value2, "balance"); - return (Criteria) this; - } - - public Criteria andOffsetIsNull() { - addCriterion("offset is null"); - return (Criteria) this; - } - - public Criteria andOffsetIsNotNull() { - addCriterion("offset is not null"); - return (Criteria) this; - } - - public Criteria andOffsetEqualTo(Integer value) { - addCriterion("offset =", value, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetNotEqualTo(Integer value) { - addCriterion("offset <>", value, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetGreaterThan(Integer value) { - addCriterion("offset >", value, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetGreaterThanOrEqualTo(Integer value) { - addCriterion("offset >=", value, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetLessThan(Integer value) { - addCriterion("offset <", value, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetLessThanOrEqualTo(Integer value) { - addCriterion("offset <=", value, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetIn(List values) { - addCriterion("offset in", values, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetNotIn(List values) { - addCriterion("offset not in", values, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetBetween(Integer value1, Integer value2) { - addCriterion("offset between", value1, value2, "offset"); - return (Criteria) this; - } - - public Criteria andOffsetNotBetween(Integer value1, Integer value2) { - addCriterion("offset not between", value1, value2, "offset"); - return (Criteria) this; - } - - public Criteria andTypeIsNull() { - addCriterion("type is null"); - return (Criteria) this; - } - - public Criteria andTypeIsNotNull() { - addCriterion("type is not null"); - return (Criteria) this; - } - - public Criteria andTypeEqualTo(Integer value) { - addCriterion("type =", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotEqualTo(Integer value) { - addCriterion("type <>", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThan(Integer value) { - addCriterion("type >", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThanOrEqualTo(Integer value) { - addCriterion("type >=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThan(Integer value) { - addCriterion("type <", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThanOrEqualTo(Integer value) { - addCriterion("type <=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeIn(List values) { - addCriterion("type in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotIn(List values) { - addCriterion("type not in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeBetween(Integer value1, Integer value2) { - addCriterion("type between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotBetween(Integer value1, Integer value2) { - addCriterion("type not between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andPhaseIsNull() { - addCriterion("phase is null"); - return (Criteria) this; - } - - public Criteria andPhaseIsNotNull() { - addCriterion("phase is not null"); - return (Criteria) this; - } - - public Criteria andPhaseEqualTo(String value) { - addCriterion("phase =", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseNotEqualTo(String value) { - addCriterion("phase <>", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseGreaterThan(String value) { - addCriterion("phase >", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseGreaterThanOrEqualTo(String value) { - addCriterion("phase >=", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseLessThan(String value) { - addCriterion("phase <", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseLessThanOrEqualTo(String value) { - addCriterion("phase <=", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseLike(String value) { - addCriterion("phase like", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseNotLike(String value) { - addCriterion("phase not like", value, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseIn(List values) { - addCriterion("phase in", values, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseNotIn(List values) { - addCriterion("phase not in", values, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseBetween(String value1, String value2) { - addCriterion("phase between", value1, value2, "phase"); - return (Criteria) this; - } - - public Criteria andPhaseNotBetween(String value1, String value2) { - addCriterion("phase not between", value1, value2, "phase"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNull() { - addCriterion("created_at is null"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNotNull() { - addCriterion("created_at is not null"); - return (Criteria) this; - } - - public Criteria andCreatedAtEqualTo(Date value) { - addCriterion("created_at =", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotEqualTo(Date value) { - addCriterion("created_at <>", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThan(Date value) { - addCriterion("created_at >", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("created_at >=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThan(Date value) { - addCriterion("created_at <", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThanOrEqualTo(Date value) { - addCriterion("created_at <=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtIn(List values) { - addCriterion("created_at in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotIn(List values) { - addCriterion("created_at not in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtBetween(Date value1, Date value2) { - addCriterion("created_at between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotBetween(Date value1, Date value2) { - addCriterion("created_at not between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNull() { - addCriterion("updated_at is null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNotNull() { - addCriterion("updated_at is not null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtEqualTo(Date value) { - addCriterion("updated_at =", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotEqualTo(Date value) { - addCriterion("updated_at <>", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThan(Date value) { - addCriterion("updated_at >", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("updated_at >=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThan(Date value) { - addCriterion("updated_at <", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { - addCriterion("updated_at <=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIn(List values) { - addCriterion("updated_at in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotIn(List values) { - addCriterion("updated_at not in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtBetween(Date value1, Date value2) { - addCriterion("updated_at between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { - addCriterion("updated_at not between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNull() { - addCriterion("rec_status is null"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNotNull() { - addCriterion("rec_status is not null"); - return (Criteria) this; - } - - public Criteria andRecStatusEqualTo(Byte value) { - addCriterion("rec_status =", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotEqualTo(Byte value) { - addCriterion("rec_status <>", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThan(Byte value) { - addCriterion("rec_status >", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("rec_status >=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThan(Byte value) { - addCriterion("rec_status <", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThanOrEqualTo(Byte value) { - addCriterion("rec_status <=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusIn(List values) { - addCriterion("rec_status in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotIn(List values) { - addCriterion("rec_status not in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusBetween(Byte value1, Byte value2) { - addCriterion("rec_status between", value1, value2, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { - addCriterion("rec_status not between", value1, value2, "recStatus"); - 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); - } - } +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysBalanceLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysBalanceLogExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andBalanceIsNull() { + addCriterion("balance is null"); + return (Criteria) this; + } + + public Criteria andBalanceIsNotNull() { + addCriterion("balance is not null"); + return (Criteria) this; + } + + public Criteria andBalanceEqualTo(Long value) { + addCriterion("balance =", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceNotEqualTo(Long value) { + addCriterion("balance <>", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceGreaterThan(Long value) { + addCriterion("balance >", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceGreaterThanOrEqualTo(Long value) { + addCriterion("balance >=", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceLessThan(Long value) { + addCriterion("balance <", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceLessThanOrEqualTo(Long value) { + addCriterion("balance <=", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceIn(List values) { + addCriterion("balance in", values, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceNotIn(List values) { + addCriterion("balance not in", values, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceBetween(Long value1, Long value2) { + addCriterion("balance between", value1, value2, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceNotBetween(Long value1, Long value2) { + addCriterion("balance not between", value1, value2, "balance"); + return (Criteria) this; + } + + public Criteria andOffsetIsNull() { + addCriterion("offset is null"); + return (Criteria) this; + } + + public Criteria andOffsetIsNotNull() { + addCriterion("offset is not null"); + return (Criteria) this; + } + + public Criteria andOffsetEqualTo(Long value) { + addCriterion("offset =", value, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetNotEqualTo(Long value) { + addCriterion("offset <>", value, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetGreaterThan(Long value) { + addCriterion("offset >", value, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetGreaterThanOrEqualTo(Long value) { + addCriterion("offset >=", value, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetLessThan(Long value) { + addCriterion("offset <", value, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetLessThanOrEqualTo(Long value) { + addCriterion("offset <=", value, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetIn(List values) { + addCriterion("offset in", values, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetNotIn(List values) { + addCriterion("offset not in", values, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetBetween(Long value1, Long value2) { + addCriterion("offset between", value1, value2, "offset"); + return (Criteria) this; + } + + public Criteria andOffsetNotBetween(Long value1, Long value2) { + addCriterion("offset not between", value1, value2, "offset"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + 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/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java index 6d26d884..eff45bb8 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java @@ -66,10 +66,6 @@ public class UserVo { @Data @ApiModel public static class WxInfo{ - @ApiModelProperty("openId") - private String openId; - @ApiModelProperty("unionId") - private String unionId; @ApiModelProperty("微信名") private String nickname; @ApiModelProperty("微信头像") diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysBalanceLogDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysBalanceLogDao.java new file mode 100644 index 00000000..5558aa9b --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysBalanceLogDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysBalanceLogMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface SysBalanceLogDao extends SysBalanceLogMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java index 626aea98..239a072c 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java @@ -1,8 +1,23 @@ package com.ccsens.tall.persist.dao; import com.ccsens.tall.persist.mapper.SysUserMapper; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @Repository public interface SysUserDao extends SysUserMapper { + + void replaceAuth(@Param("oldUserId") Long userId,@Param("newUserId") Long currentUserId); + + void replaceAttention(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); + + void replaceBalance(@Param("oldUserId") Long userId,@Param("newUserId") Long currentUserId); + + void replaceProject(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); + + void replaceMember(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); + + void replaceDeliverPostLog(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); + + void replaceProLog(@Param("oldUserId") Long userId,@Param("newUserId") Long currentUserId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninFuzzyMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninFuzzyMapper.java new file mode 100644 index 00000000..c7a7142f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninFuzzyMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProPluginSigninFuzzy; +import com.ccsens.tall.bean.po.ProPluginSigninFuzzyExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProPluginSigninFuzzyMapper { + long countByExample(ProPluginSigninFuzzyExample example); + + int deleteByExample(ProPluginSigninFuzzyExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProPluginSigninFuzzy record); + + int insertSelective(ProPluginSigninFuzzy record); + + List selectByExample(ProPluginSigninFuzzyExample example); + + ProPluginSigninFuzzy selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProPluginSigninFuzzy record, @Param("example") ProPluginSigninFuzzyExample example); + + int updateByExample(@Param("record") ProPluginSigninFuzzy record, @Param("example") ProPluginSigninFuzzyExample example); + + int updateByPrimaryKeySelective(ProPluginSigninFuzzy record); + + int updateByPrimaryKey(ProPluginSigninFuzzy record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninMapper.java new file mode 100644 index 00000000..b3b0a4f3 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProPluginSigninMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProPluginSignin; +import com.ccsens.tall.bean.po.ProPluginSigninExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProPluginSigninMapper { + long countByExample(ProPluginSigninExample example); + + int deleteByExample(ProPluginSigninExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProPluginSignin record); + + int insertSelective(ProPluginSignin record); + + List selectByExample(ProPluginSigninExample example); + + ProPluginSignin selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProPluginSignin record, @Param("example") ProPluginSigninExample example); + + int updateByExample(@Param("record") ProPluginSignin record, @Param("example") ProPluginSigninExample example); + + int updateByPrimaryKeySelective(ProPluginSignin record); + + int updateByPrimaryKey(ProPluginSignin record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SigninFieldMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SigninFieldMapper.java new file mode 100644 index 00000000..90bb02a6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SigninFieldMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SigninField; +import com.ccsens.tall.bean.po.SigninFieldExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SigninFieldMapper { + long countByExample(SigninFieldExample example); + + int deleteByExample(SigninFieldExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SigninField record); + + int insertSelective(SigninField record); + + List selectByExample(SigninFieldExample example); + + SigninField selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SigninField record, @Param("example") SigninFieldExample example); + + int updateByExample(@Param("record") SigninField record, @Param("example") SigninFieldExample example); + + int updateByPrimaryKeySelective(SigninField record); + + int updateByPrimaryKey(SigninField record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysBalanceLogMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysBalanceLogMapper.java index 3c5d6af3..17e66c68 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysBalanceLogMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysBalanceLogMapper.java @@ -1,31 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.SysBalanceLog; -import com.ccsens.tall.bean.po.SysBalanceLogExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SysBalanceLogMapper { - long countByExample(SysBalanceLogExample example); - - int deleteByExample(SysBalanceLogExample example); - - int deleteByPrimaryKey(Long id); - - int insert(SysBalanceLog record); - - int insertSelective(SysBalanceLog record); - - List selectByExample(SysBalanceLogExample example); - - SysBalanceLog selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") SysBalanceLog record, @Param("example") SysBalanceLogExample example); - - int updateByExample(@Param("record") SysBalanceLog record, @Param("example") SysBalanceLogExample example); - - int updateByPrimaryKeySelective(SysBalanceLog record); - - int updateByPrimaryKey(SysBalanceLog record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysBalanceLog; +import com.ccsens.tall.bean.po.SysBalanceLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysBalanceLogMapper { + long countByExample(SysBalanceLogExample example); + + int deleteByExample(SysBalanceLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysBalanceLog record); + + int insertSelective(SysBalanceLog record); + + List selectByExample(SysBalanceLogExample example); + + SysBalanceLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysBalanceLog record, @Param("example") SysBalanceLogExample example); + + int updateByExample(@Param("record") SysBalanceLog record, @Param("example") SysBalanceLogExample example); + + int updateByPrimaryKeySelective(SysBalanceLog record); + + int updateByPrimaryKey(SysBalanceLog record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java index a9663c28..ba8f0ca0 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java @@ -60,6 +60,8 @@ public class ExcelService implements IExcelService { private IUserService userService; @Autowired private IUserAttentionService userAttentionService; + @Autowired + private IWbsSubSheetService wbsSubSheetService; @Override @@ -734,31 +736,38 @@ public class ExcelService implements IExcelService { taskDetail.setHasGroup((byte) 1); switch (subTaskCell) { case "值日表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "运动计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "前端学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "后台学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "硬件学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "方圆学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "全体学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + break; + case "后台签到编码表": + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + break; + case "前端签到编码表": + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "年终总结": - getSubTaskMt(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + wbsSubSheetService.getSubTaskMt(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; default: - throw new BaseException(CodeEnum.WBS_SUB_TASK_ANALYSIS.addMsg(wbsSheet.getSheetName() + i)); +// throw new BaseException(CodeEnum.WBS_SUB_TASK_ANALYSIS.addMsg(wbsSheet.getSheetName() + i)); + wbsSubSheetService.getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); } } else { //不是分组任务,直接添加交付物 @@ -801,173 +810,173 @@ public class ExcelService implements IExcelService { taskDetails.add(endTask); } - /** - * 读取年终总结子表 - */ - public void getSubTaskMt(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, - List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { - List taskNameList = new ArrayList<>(); - - XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); - if (ObjectUtil.isNotNull(subTaskSheet)) { - for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { - String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); - String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); - String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); - //重复时间、相对时间 - String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); - String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); - //备注 - String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); - if (StrUtil.isNotEmpty(nameCell)) { - ProTaskDetail subTask = new ProTaskDetail(); - BeanUtil.copyProperties(parentTaskDetail, subTask); - subTask.setId(snowflake.nextId()); - subTask.setName(nameCell); - subTask.setDescription(descriptionCell); - if (StrUtil.isNotEmpty(beginCell)) { - subTask.setBeginTime(Long.valueOf(beginCell)); - } - if (StrUtil.isNotEmpty(endCell)) { - subTask.setEndTime(Long.valueOf(endCell)); - } - subTask.setLevel((byte) 2); - subTask.setHasGroup((byte) 0); - if (StrUtil.isNotEmpty(memberCell)) { - if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { - subTask.setAllMember((byte) 1); - } else { - subTask.setAllMember((byte) 0); - if (CollectionUtil.isNotEmpty(proMembers)) { - Long proMemberId = null; - for (ProMember proMember : proMembers) { - if (memberCell.equalsIgnoreCase(proMember.getNickname())) { - proMemberId = proMember.getId(); - ProTaskMember proTaskMember = new ProTaskMember(); - proTaskMember.setId(snowflake.nextId()); - proTaskMember.setMemberId(proMemberId); - proTaskMember.setTaskDetailId(subTask.getId()); - taskMemberService.saveTaskMember(proTaskMember); - break; - } - } - if (ObjectUtil.isNull(proMemberId)) { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); - } - } - } - } else { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); - } - - //给每个子任务添加交付物 - readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); - - proTaskDetailService.saveTaskDetail(subTask); - taskDetails.add(subTask); - taskNameList.add(subTask); - } - } - hasGroupMap.put(parentTaskDetail.getName(), taskNameList); - } else { - throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); - } - } - - /** - * 读取子任务表 - */ - public void getSubTask(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, - List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { - XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); - Long startTime = parentTaskDetail.getBeginTime(); - if (ObjectUtil.isNotNull(subTaskSheet)) { - String str = ExcelUtil.getCellValue(subTaskSheet.getRow(1).getCell(4)); - for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { - String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); - String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); - String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); - //重复时间、相对时间 - String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); - String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); - //备注 - String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); - if (StrUtil.isNotEmpty(nameCell)) { - ProTaskDetail subTask = new ProTaskDetail(); - BeanUtil.copyProperties(parentTaskDetail, subTask); - subTask.setId(snowflake.nextId()); - subTask.setName(nameCell); - subTask.setDescription(descriptionCell); - subTask.setLevel((byte) 3); - subTask.setHasGroup((byte) 0); - subTask.setParentId(parentTaskDetail.getId()); - if (StrUtil.isNotEmpty(memberCell)) { - if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { - parentTaskDetail.setAllMember((byte) 1); - subTask.setAllMember((byte) 1); - } else { - parentTaskDetail.setAllMember((byte) 0); - subTask.setAllMember((byte) 0); - List memberList = StringUtil.extractMessage(memberCell); - if (CollectionUtil.isNotEmpty(memberList)) { - for (String memberName : memberList) { - if (CollectionUtil.isNotEmpty(proMembers)) { - Long proMemberId = null; - for (ProMember proMember : proMembers) { - if (memberName.equalsIgnoreCase(proMember.getNickname())) { - proMemberId = proMember.getId(); - ProTaskMember proTaskMember = new ProTaskMember(); - proTaskMember.setId(snowflake.nextId()); - proTaskMember.setTaskDetailId(subTask.getId()); - proTaskMember.setMemberId(proMemberId); - taskMemberService.saveTaskMember(proTaskMember); - break; - } - } - if (ObjectUtil.isNull(proMemberId)) { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); - } - } - } - } else { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); - } - } - } - - if (StrUtil.isNotEmpty(repeatCell)) { - if ("重复时间".equals(str)) { - subTask.setCycle(repeatCell); - } - if ("相对时间".equals(str)) { - subTask.setBeginTime(startTime); - Long relative = StringUtil.severalDay(repeatCell); - if (ObjectUtil.isNotNull(relative)) { - subTask.setEndTime(startTime + relative); - } - } - } else { - if (ObjectUtil.isNotNull(beginCell)) { - subTask.setBeginTime(Long.valueOf(beginCell)); - } - if (ObjectUtil.isNotNull(endCell)) { - subTask.setEndTime(Long.valueOf(endCell)); - } - parentTaskDetail.setBeginTime(subTask.getBeginTime()); - } - startTime = subTask.getEndTime(); - //给每个子任务添加交付物 - readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); +// /** +// * 读取年终总结子表 +// */ +// public void getSubTaskMt(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, +// List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { +// List taskNameList = new ArrayList<>(); +// +// XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); +// if (ObjectUtil.isNotNull(subTaskSheet)) { +// for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { +// String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); +// String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); +// String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); +// //重复时间、相对时间 +// String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); +// String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); +// //备注 +// String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); +// if (StrUtil.isNotEmpty(nameCell)) { +// ProTaskDetail subTask = new ProTaskDetail(); +// BeanUtil.copyProperties(parentTaskDetail, subTask); +// subTask.setId(snowflake.nextId()); +// subTask.setName(nameCell); +// subTask.setDescription(descriptionCell); +// if (StrUtil.isNotEmpty(beginCell)) { +// subTask.setBeginTime(Long.valueOf(beginCell)); +// } +// if (StrUtil.isNotEmpty(endCell)) { +// subTask.setEndTime(Long.valueOf(endCell)); +// } +// subTask.setLevel((byte) 2); +// subTask.setHasGroup((byte) 0); +// if (StrUtil.isNotEmpty(memberCell)) { +// if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { +// subTask.setAllMember((byte) 1); +// } else { +// subTask.setAllMember((byte) 0); +// if (CollectionUtil.isNotEmpty(proMembers)) { +// Long proMemberId = null; +// for (ProMember proMember : proMembers) { +// if (memberCell.equalsIgnoreCase(proMember.getNickname())) { +// proMemberId = proMember.getId(); +// ProTaskMember proTaskMember = new ProTaskMember(); +// proTaskMember.setId(snowflake.nextId()); +// proTaskMember.setMemberId(proMemberId); +// proTaskMember.setTaskDetailId(subTask.getId()); +// taskMemberService.saveTaskMember(proTaskMember); +// break; +// } +// } +// if (ObjectUtil.isNull(proMemberId)) { +// throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); +// } +// } +// } +// } else { +// throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); +// } +// +// //给每个子任务添加交付物 +// readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); +// +// proTaskDetailService.saveTaskDetail(subTask); +// taskDetails.add(subTask); +// taskNameList.add(subTask); +// } +// } +// hasGroupMap.put(parentTaskDetail.getName(), taskNameList); +// } else { +// throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); +// } +// } - proTaskDetailService.saveTaskDetail(subTask); - taskDetails.add(subTask); - } - } - } else { - throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); - } - parentTaskDetail.setRecStatus((byte) 2); - } +// /** +// * 读取子任务表 +// */ +// public void getSubTask(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, +// List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { +// XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); +// Long startTime = parentTaskDetail.getBeginTime(); +// if (ObjectUtil.isNotNull(subTaskSheet)) { +// String str = ExcelUtil.getCellValue(subTaskSheet.getRow(1).getCell(4)); +// for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { +// String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); +// String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); +// String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); +// //重复时间、相对时间 +// String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); +// String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); +// //备注 +// String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); +// if (StrUtil.isNotEmpty(nameCell)) { +// ProTaskDetail subTask = new ProTaskDetail(); +// BeanUtil.copyProperties(parentTaskDetail, subTask); +// subTask.setId(snowflake.nextId()); +// subTask.setName(nameCell); +// subTask.setDescription(descriptionCell); +// subTask.setLevel((byte) 3); +// subTask.setHasGroup((byte) 0); +// subTask.setParentId(parentTaskDetail.getId()); +// if (StrUtil.isNotEmpty(memberCell)) { +// if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { +// parentTaskDetail.setAllMember((byte) 1); +// subTask.setAllMember((byte) 1); +// } else { +// parentTaskDetail.setAllMember((byte) 0); +// subTask.setAllMember((byte) 0); +// List memberList = StringUtil.extractMessage(memberCell); +// if (CollectionUtil.isNotEmpty(memberList)) { +// for (String memberName : memberList) { +// if (CollectionUtil.isNotEmpty(proMembers)) { +// Long proMemberId = null; +// for (ProMember proMember : proMembers) { +// if (memberName.equalsIgnoreCase(proMember.getNickname())) { +// proMemberId = proMember.getId(); +// ProTaskMember proTaskMember = new ProTaskMember(); +// proTaskMember.setId(snowflake.nextId()); +// proTaskMember.setTaskDetailId(subTask.getId()); +// proTaskMember.setMemberId(proMemberId); +// taskMemberService.saveTaskMember(proTaskMember); +// break; +// } +// } +// if (ObjectUtil.isNull(proMemberId)) { +// throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); +// } +// } +// } +// } else { +// throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); +// } +// } +// } +// +// if (StrUtil.isNotEmpty(repeatCell)) { +// if ("重复时间".equals(str)) { +// subTask.setCycle(repeatCell); +// } +// if ("相对时间".equals(str)) { +// subTask.setBeginTime(startTime); +// Long relative = StringUtil.severalDay(repeatCell); +// if (ObjectUtil.isNotNull(relative)) { +// subTask.setEndTime(startTime + relative); +// } +// } +// } else { +// if (ObjectUtil.isNotNull(beginCell)) { +// subTask.setBeginTime(Long.valueOf(beginCell)); +// } +// if (ObjectUtil.isNotNull(endCell)) { +// subTask.setEndTime(Long.valueOf(endCell)); +// } +// parentTaskDetail.setBeginTime(subTask.getBeginTime()); +// } +// startTime = subTask.getEndTime(); +// //给每个子任务添加交付物 +// readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); +// +// proTaskDetailService.saveTaskDetail(subTask); +// taskDetails.add(subTask); +// } +// } +// } else { +// throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); +// } +// parentTaskDetail.setRecStatus((byte) 2); +// } /** * 分解任务时间 @@ -1014,7 +1023,8 @@ public class ExcelService implements IExcelService { /** * 读取交付物表 */ - private void readDeliverSheet(String deliverCell, XSSFWorkbook xssfWorkbook, Long taskId) { + @Override + public void readDeliverSheet(String deliverCell, XSSFWorkbook xssfWorkbook, Long taskId) { if (StrUtil.isNotEmpty(deliverCell)) { String str = ""; if (deliverCell.length() > 4) { @@ -1137,6 +1147,8 @@ public class ExcelService implements IExcelService { } } + + /** * 返回信息 * diff --git a/tall/src/main/java/com/ccsens/tall/service/IExcelService.java b/tall/src/main/java/com/ccsens/tall/service/IExcelService.java index 8040a079..ee78750a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IExcelService.java @@ -2,8 +2,10 @@ package com.ccsens.tall.service; import com.ccsens.tall.bean.vo.ProjectVo; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; public interface IExcelService { ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception; + void readDeliverSheet(String deliverCell, XSSFWorkbook xssfWorkbook, Long taskId); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IUserService.java b/tall/src/main/java/com/ccsens/tall/service/IUserService.java index 28eed49b..21dc163a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IUserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IUserService.java @@ -27,7 +27,7 @@ public interface IUserService { UserVo.UserSign registerUser(UserDto.UserSignup userSignup)throws Exception; - String bindingNewPhone(Long currentUserId,UserDto.WxBindingPhone wxPhone)throws Exception; + UserVo.UserSign bindingNewPhone(Long currentUserId,UserDto.WxBindingPhone wxPhone)throws Exception; String getPhone(Long userId); @@ -61,4 +61,7 @@ public interface IUserService { long defaultRegisterUser(com.ccsens.cloudutil.bean.tall.dto.UserDto.DefaultUserSingup signup); + UserVo.UserSign mergeByPhone(Long currentUserId, UserDto.WxMergePhone wxPhone); + + UserVo.WxInfo updateUserInfo(Long currentUserId, UserDto.WxInfo userInfo); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java b/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java new file mode 100644 index 00000000..963a6dfe --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java @@ -0,0 +1,18 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.po.ProMember; +import com.ccsens.tall.bean.po.ProTaskDetail; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; + +import java.util.List; +import java.util.Map; + +public interface IWbsSubSheetService { + + void getSubTask(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, + List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap); + + void getSubTaskMt(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, + List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap); + +} diff --git a/tall/src/main/java/com/ccsens/tall/service/UserService.java b/tall/src/main/java/com/ccsens/tall/service/UserService.java index 7c6d310e..5e06c763 100644 --- a/tall/src/main/java/com/ccsens/tall/service/UserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/UserService.java @@ -16,7 +16,10 @@ import com.ccsens.util.*; import com.ccsens.util.bean.wx.po.WxOauth2UserInfo; import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxGzhUtil; +import com.ccsens.util.wx.WxXcxUtil; +import io.swagger.annotations.ApiModelProperty; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.RandomStringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -41,12 +44,15 @@ public class UserService implements IUserService { @Autowired private ProMemberRoleDao memberRoleDao; @Autowired + private SysBalanceLogDao sysBalanceLogDao; + @Autowired private Snowflake snowflake; @Autowired private RedisUtil redisUtil; @Autowired private SysWxDao sysWxDao; + /** * 登录 */ @@ -69,9 +75,9 @@ public class UserService implements IUserService { case Wxmp: return wxmplogin(identifier); case OAUTH2_Wx: - return wxLogin(identifyType,identifier); + return wxLogin(identifyType, identifier); case Wx_H5: - return wxH5Login(identifyType,identifier); + return wxH5Login(identifyType, identifier); case OAUTH2_WeiBo: //Fix Me. break; @@ -93,53 +99,82 @@ public class UserService implements IUserService { * @param code * @return */ - private UserVo.UserSign wxH5Login(WebConstant.IDENTIFY_TYPE identifyType,String code) { + private UserVo.UserSign wxH5Login(WebConstant.IDENTIFY_TYPE identifyType, String code) { UserVo.UserSign userSignVo = null; - //获取微信信息并保存 - WxOauth2UserInfo wxOauth2UserInfo = WxGzhUtil.getOauth2UserInfo(identifyType,code); + //获取微信信息 + WxOauth2UserInfo wxOauth2UserInfo = WxGzhUtil.getOauth2UserInfo(identifyType, code); SysAuth theAuth = null; if (ObjectUtil.isNotNull(wxOauth2UserInfo)) { - //查找有无保存的信息 - SysWxExample sysWxExample = new SysWxExample(); - sysWxExample.createCriteria().andUnionIdEqualTo(wxOauth2UserInfo.getUnionId()); - List sysWxList = sysWxDao.selectByExample(sysWxExample); - SysWx sysWx = null; - if (CollUtil.isNotEmpty(sysWxList)) { - //如果有信息,则更新 - sysWx = sysWxList.get(0); - BeanUtil.copyProperties(wxOauth2UserInfo, sysWx); - sysWxDao.updateByPrimaryKeySelective(sysWx); - } else { - //没有则保存微信信息 - sysWx = new SysWx(); - BeanUtil.copyProperties(wxOauth2UserInfo, sysWx); - sysWx.setId(snowflake.nextId()); - sysWxDao.insertSelective(sysWx); - } +// //查找有无保存的信息 +// SysWxExample sysWxExample = new SysWxExample(); +// sysWxExample.createCriteria().andUnionIdEqualTo(wxOauth2UserInfo.getUnionId()); +// List sysWxList = sysWxDao.selectByExample(sysWxExample); +// SysWx sysWx = null; +// if (CollUtil.isNotEmpty(sysWxList)) { +// //如果有信息,则更新 +// sysWx = sysWxList.get(0); +// BeanUtil.copyProperties(wxOauth2UserInfo, sysWx); +// sysWxDao.updateByPrimaryKeySelective(sysWx); +// } else { +// //没有则保存微信信息 +// sysWx = new SysWx(); +// BeanUtil.copyProperties(wxOauth2UserInfo, sysWx); +// sysWx.setId(snowflake.nextId()); +// sysWxDao.insertSelective(sysWx); +// } //查找认证信息 SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Wx_H5.value) - .andIdentifierEqualTo(sysWx.getUnionId()).andCredentialEqualTo(sysWx.getOpenId()); + .andIdentifierEqualTo(wxOauth2UserInfo.getOpenId()); List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { theAuth = authList.get(0); } else { - //1.添加user - SysUser user = new SysUser(); - user.setId(snowflake.nextId()); - userDao.insertSelective(user); - - //2.添加auth - theAuth = new SysAuth(); - theAuth.setId(snowflake.nextId()); - theAuth.setUserId(user.getId()); - theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Wx_H5.value); - theAuth.setIdentifier(sysWx.getUnionId()); - theAuth.setCredential(sysWx.getOpenId()); - authDao.insertSelective(theAuth); + SysAuthExample sysAuthExample = new SysAuthExample(); + authExample.createCriteria().andCredentialEqualTo(wxOauth2UserInfo.getUnionId()); + List sysAuthList = authDao.selectByExample(authExample); + if(CollectionUtil.isNotEmpty(sysAuthList)){ + //添加认证方式 + theAuth = new SysAuth(); + theAuth.setId(snowflake.nextId()); + theAuth.setUserId(sysAuthList.get(0).getUserId()); + theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Wx_H5.value); + theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); + theAuth.setCredential(wxOauth2UserInfo.getUnionId()); + authDao.insertSelective(theAuth); + }else { + //新建用户并保存微信信息 + SysUser user = new SysUser(); + user.setId(snowflake.nextId()); + user.setAvatarUrl(wxOauth2UserInfo.getHeadImgUrl()); + user.setNickname(wxOauth2UserInfo.getNickname()); + user.setGender((byte) wxOauth2UserInfo.getSex()); + user.setCountry(wxOauth2UserInfo.getCountry()); + user.setProvince(wxOauth2UserInfo.getProvince()); + user.setCity(wxOauth2UserInfo.getCity()); + user.setLanguage(wxOauth2UserInfo.getLanguage()); + userDao.insertSelective(user); + //添加认证方式 + theAuth = new SysAuth(); + theAuth.setId(snowflake.nextId()); + theAuth.setUserId(user.getId()); + theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Wx_H5.value); + theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); + theAuth.setCredential(wxOauth2UserInfo.getUnionId()); + authDao.insertSelective(theAuth); + //自动添加账号密码 + String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); + SysAuth accountAuth = new SysAuth(); + accountAuth.setId(snowflake.nextId()); + accountAuth.setUserId(user.getId()); + accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); + accountAuth.setIdentifier("USER_" + accountName); + accountAuth.setCredential("123456"); + authDao.insertSelective(accountAuth); + } } - }else{ + } else { throw new BaseException(CodeEnum.NOT_SELECT_WX); } @@ -157,53 +192,65 @@ public class UserService implements IUserService { * @return * @throws Exception */ - private UserVo.UserSign wxLogin(WebConstant.IDENTIFY_TYPE identifyType,String code) throws Exception { + private UserVo.UserSign wxLogin(WebConstant.IDENTIFY_TYPE identifyType, String code) throws Exception { UserVo.UserSign userSignVo = null; //获取微信信息并保存 - WxOauth2UserInfo wxOauth2UserInfo = WxGzhUtil.getOauth2UserInfo(identifyType,code); + WxOauth2UserInfo wxOauth2UserInfo = WxGzhUtil.getOauth2UserInfo(identifyType, code); SysAuth theAuth = null; if (ObjectUtil.isNotNull(wxOauth2UserInfo)) { - //查找有无保存的信息 - SysWxExample sysWxExample = new SysWxExample(); - sysWxExample.createCriteria().andUnionIdEqualTo(wxOauth2UserInfo.getUnionId()); - List sysWxList = sysWxDao.selectByExample(sysWxExample); - SysWx sysWx = null; - if (CollUtil.isNotEmpty(sysWxList)) { - //如果有信息,则更新 - sysWx = sysWxList.get(0); - BeanUtil.copyProperties(wxOauth2UserInfo, sysWx); - sysWxDao.updateByPrimaryKeySelective(sysWx); - } else { - //没有则保存微信信息 - sysWx = new SysWx(); - BeanUtil.copyProperties(wxOauth2UserInfo, sysWx); - sysWx.setId(snowflake.nextId()); - sysWxDao.insertSelective(sysWx); - } - //查找认证信息 SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value) - .andIdentifierEqualTo(sysWx.getUnionId()).andCredentialEqualTo(sysWx.getOpenId()); + .andIdentifierEqualTo(wxOauth2UserInfo.getOpenId()); List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { theAuth = authList.get(0); } else { - //1.添加user - SysUser user = new SysUser(); - user.setId(snowflake.nextId()); - userDao.insertSelective(user); - - //2.添加auth - theAuth = new SysAuth(); - theAuth.setId(snowflake.nextId()); - theAuth.setUserId(user.getId()); - theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value); - theAuth.setIdentifier(sysWx.getUnionId()); - theAuth.setCredential(sysWx.getOpenId()); - authDao.insertSelective(theAuth); + SysAuthExample sysAuthExample = new SysAuthExample(); + authExample.createCriteria().andCredentialEqualTo(wxOauth2UserInfo.getUnionId()); + List sysAuthList = authDao.selectByExample(authExample); + if(CollectionUtil.isNotEmpty(sysAuthList)){ +// SysAuth sysAuth = sysAuthList.get(0); + //添加认证方式 + theAuth = new SysAuth(); + theAuth.setId(snowflake.nextId()); + theAuth.setUserId(sysAuthList.get(0).getUserId()); + theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value); + theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); + theAuth.setCredential(wxOauth2UserInfo.getUnionId()); + authDao.insertSelective(theAuth); + }else { + //新建用户并保存微信信息 + SysUser user = new SysUser(); + user.setId(snowflake.nextId()); + user.setAvatarUrl(wxOauth2UserInfo.getHeadImgUrl()); + user.setNickname(wxOauth2UserInfo.getNickname()); + user.setGender((byte) wxOauth2UserInfo.getSex()); + user.setCountry(wxOauth2UserInfo.getCountry()); + user.setProvince(wxOauth2UserInfo.getProvince()); + user.setCity(wxOauth2UserInfo.getCity()); + user.setLanguage(wxOauth2UserInfo.getLanguage()); + userDao.insertSelective(user); + //添加认证方式 + theAuth = new SysAuth(); + theAuth.setId(snowflake.nextId()); + theAuth.setUserId(user.getId()); + theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value); + theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); + theAuth.setCredential(wxOauth2UserInfo.getUnionId()); + authDao.insertSelective(theAuth); + //自动添加账号密码 + String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); + SysAuth accountAuth = new SysAuth(); + accountAuth.setId(snowflake.nextId()); + accountAuth.setUserId(user.getId()); + accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); + accountAuth.setIdentifier("USER_" + accountName); + accountAuth.setCredential("123456"); + authDao.insertSelective(accountAuth); + } } - }else{ + } else { throw new BaseException(CodeEnum.NOT_SELECT_WX); } @@ -244,25 +291,17 @@ public class UserService implements IUserService { authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { theAuth = authList.get(0); - SysAuthExample sysAuthExample = new SysAuthExample(); - sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) - .andUserIdEqualTo(theAuth.getUserId()); - List authList1 = authDao.selectByExample(sysAuthExample); - if (CollectionUtil.isNotEmpty(authList1)) { - //2.返回 - userSignVo = new UserVo.UserSign(); - userSignVo.setUserId(theAuth.getUserId()); - userSignVo.setAuthId(theAuth.getId()); - return userSignVo; - } else { - throw new BaseException("该手机号未绑定账号"); - } } else { - throw new BaseException("手机号不存在,请注册后登录"); +// throw new BaseException(CodeEnum.NOT_REGISTER); + theAuth = wxRegist(phone,null,WebConstant.IDENTIFY_TYPE.Phone); } + userSignVo = new UserVo.UserSign(); + userSignVo.setUserId(theAuth.getUserId()); + userSignVo.setAuthId(theAuth.getId()); } else { throw new BaseException(CodeEnum.SMS_CODE_CORRECT); } + return userSignVo; } private UserVo.UserSign emailLogin(String phone, String emailVerifyCode) { @@ -303,8 +342,9 @@ public class UserService implements IUserService { private UserVo.UserSign wxmplogin(String code) throws Exception { UserVo.UserSign userSignVo = null; //0.获取openid - WechatUtil.WechatUser wechatUser = WechatUtil.getUserInfo(code); + WxXcxUtil.WechatUser wechatUser = WxXcxUtil.getUserInfo(code); String openid = wechatUser.openid; + String unionId = wechatUser.unionid; //1.查找对应账户,不存在则注册 List authList = null; @@ -314,7 +354,7 @@ public class UserService implements IUserService { .andIdentifierEqualTo(openid); authList = authDao.selectByExample(authExample); if (CollectionUtil.isEmpty(authList)) { - theAuth = wxRegist(openid); + theAuth = wxRegist(openid, unionId,WebConstant.IDENTIFY_TYPE.Wxmp); } else { theAuth = authList.get(0); } @@ -326,7 +366,12 @@ public class UserService implements IUserService { return userSignVo; } - private SysAuth wxRegist(String openid) { + /** + * 微信登陆后天添加用户和认证方式 + * + * @return + */ + private SysAuth wxRegist(String identifier, String credential,WebConstant.IDENTIFY_TYPE identifyType) { //1.添加user SysUser user = new SysUser(); user.setId(snowflake.nextId()); @@ -336,9 +381,19 @@ public class UserService implements IUserService { SysAuth auth = new SysAuth(); auth.setId(snowflake.nextId()); auth.setUserId(user.getId()); - auth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Wxmp.value); - auth.setIdentifier(openid); + auth.setIdentifyType((byte) identifyType.value); + auth.setIdentifier(identifier); + auth.setCredential(credential); authDao.insertSelective(auth); + //自动添加账号密码 + String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); + SysAuth accountAuth = new SysAuth(); + accountAuth.setId(snowflake.nextId()); + accountAuth.setUserId(user.getId()); + accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); + accountAuth.setIdentifier("USER_" + accountName); + accountAuth.setCredential("123456"); + authDao.insertSelective(accountAuth); return auth; } @@ -347,13 +402,13 @@ public class UserService implements IUserService { * 获取token */ @Override - public UserVo.TokenBean generateToken(WebConstant.CLIENT_TYPE client_type, Object subject, Map payLoads) throws Exception { + public UserVo.TokenBean generateToken(WebConstant.CLIENT_TYPE clientType, Object subject, Map payLoads) throws Exception { UserVo.TokenBean tokenBean = new UserVo.TokenBean(); Long tokenExpired = null; Long refreshTokenExpired = null; - switch (client_type) { + switch (clientType) { case Wxmp: //token(2hours) refreshToken(null) //tokenExpired = 3600 * 1000L * 2; tokenExpired = 3600 * 1000L * 24; @@ -403,12 +458,12 @@ public class UserService implements IUserService { * 发送验证码 */ @Override - public UserVo.SmsCode getSignInSmsCode(String phone,Integer client) throws Exception { + public UserVo.SmsCode getSignInSmsCode(String phone, Integer client) throws Exception { //获取登陆客户端类型 WebConstant.CLIENT_TYPE client_type = null; - if(ObjectUtil.isNotNull(client)) { + if (ObjectUtil.isNotNull(client)) { client_type = WebConstant.CLIENT_TYPE.valueOf(client); - }else { + } else { client_type = WebConstant.CLIENT_TYPE.valueOf(1); } //验证手机号的正确性 @@ -437,7 +492,7 @@ public class UserService implements IUserService { redisUtil.set(RedisKeyManager.getSigninSmsExistKey(phone), verifyCode, codeExistINSeconds); //5.发送验证码 - SmsUtil.sendSms(phone,verifyCode,client_type.phase,codeValidInSeconds); + SmsUtil.sendSms(phone, verifyCode, client_type.phase, codeValidInSeconds); //6.返回 smsCodeVo = new UserVo.SmsCode(); @@ -480,13 +535,13 @@ public class UserService implements IUserService { if (!flag) { userSignVo = saveAuth(userSignup); } else { - throw new BaseException("账号已存在"); + throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); } } else { - throw new BaseException("该手机号已被注册"); + throw new BaseException(CodeEnum.ALREADY_EXIST_PHONE); } } else { - throw new BaseException(-1, "验证信息不正确"); + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); } return userSignVo; } @@ -536,10 +591,17 @@ public class UserService implements IUserService { memberExample.createCriteria().andPhoneEqualTo(phone); List proMemberList = memberDao.selectByExample(memberExample); if (CollectionUtil.isNotEmpty(proMemberList)) { - for (ProMember member : proMemberList) { - if (ObjectUtil.isNull(member.getUserId()) || member.getUserId() == 0) { - member.setUserId(userId); - memberDao.updateByPrimaryKeySelective(member); + SysUser user = userDao.selectByPrimaryKey(userId); + if(ObjectUtil.isNotNull(user)) { + for (ProMember member : proMemberList) { + if (ObjectUtil.isNull(member.getUserId()) || member.getUserId() == 0) { + member.setUserId(userId); + //将用户的昵称和头像复制到成员信息内 + member.setAvatarUrl(user.getAvatarUrl()); + member.setNickname(user.getNickname()); + + memberDao.updateByPrimaryKeySelective(member); + } } } } @@ -616,47 +678,54 @@ public class UserService implements IUserService { * @throws Exception */ @Override - public String bindingNewPhone(Long currentUserId, UserDto.WxBindingPhone wxPhone) throws Exception { -// if (isSmsCodeCorrect(wxPhone.getPhone(), wxPhone.getSmsCode())) { -// //查找该用户以前绑定的手机 -// SysAuthExample authExample = new SysAuthExample(); -// authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) -// .andUserIdEqualTo(currentUserId); -// List authList = authDao.selectByExample(authExample); -// if (CollectionUtil.isNotEmpty(authList)) { -// for (SysAuth auth : authList) { -// if (auth.getIdentifier().equals(wxPhone.getPhone())) { -// throw new BaseException(-1, "您的账号已经绑定过此手机,请勿重复绑定"); -// } else { -// throw new BaseException(-1, "您的账号已绑定手机" + auth.getIdentifier()); -// } -// } -// } else { -// //改手机对应账户,如果有,提示 -// List phoneList = null; -// SysAuth theAuth = null; -// SysAuthExample phoneExample = new SysAuthExample(); -// authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) -// .andIdentifierEqualTo(wxPhone.getPhone()); -// phoneList = authDao.selectByExample(phoneExample); -// if (CollectionUtil.isNotEmpty(phoneList)) {//已被注册 提示 -// //合并 -// } else { + public UserVo.UserSign bindingNewPhone(Long currentUserId, UserDto.WxBindingPhone wxPhone) throws Exception { + if (isSmsCodeCorrect(wxPhone.getPhone(), wxPhone.getSmsCode())) { + //查找该用户以前绑定的手机 + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) + .andUserIdEqualTo(currentUserId); + List authList = authDao.selectByExample(authExample); + if (CollectionUtil.isNotEmpty(authList)) { + throw new BaseException(CodeEnum.ALREADY_BINDING_PHONE); + } else { + //改手机对应账户,如果有,提示 + List phoneList = null; + SysAuth theAuth = null; + SysAuthExample phoneExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) + .andIdentifierEqualTo(wxPhone.getPhone()); + phoneList = authDao.selectByExample(phoneExample); + if (CollectionUtil.isNotEmpty(phoneList)) {//已被注册 提示 + throw new BaseException(CodeEnum.MERGE_WX_PHONE); + } else { // throw new BaseException(CodeEnum.NOT_REGISTER); -//// //绑定 添加auth -//// SysAuth auth = new SysAuth(); -//// auth.setId(snowflake.nextId()); -//// auth.setUserId(currentUserId); -//// auth.setIdentifyType((byte) WebCo nstant.IDENTIFY_TYPE.Phone.value); -//// auth.setIdentifier(phone); -//// auth.setCredential(code); -//// authDao.insertSelective(auth); -// } -// } -// }else { -// throw new BaseException(CodeEnum.SMS_CODE_CORRECT); -// } - return null; + //绑定 添加auth + SysAuth auth = new SysAuth(); + auth.setId(snowflake.nextId()); + auth.setUserId(currentUserId); + auth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + auth.setIdentifier(wxPhone.getPhone()); + authDao.insertSelective(auth); + + //给手机号一样的所有项目内的成员添加userId + memberHandler(currentUserId,wxPhone.getPhone()); + } + } + } else { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + //返回用户信息 + UserVo.UserSign userSignVo = null; + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) + .andIdentifierEqualTo(wxPhone.getPhone()); + List authList = authDao.selectByExample(authExample); + if(CollectionUtil.isNotEmpty(authList)) { + userSignVo = new UserVo.UserSign(); + userSignVo.setAuthId(authList.get(0).getId()); + userSignVo.setUserId(authList.get(0).getUserId()); + } + return userSignVo; } /** @@ -866,21 +935,22 @@ public class UserService implements IUserService { } @Override - public UserVo.TokenBean getUserInfoAndToken(WebConstant.CLIENT_TYPE client_type, UserVo.UserSign userSignVo, Map theMap) throws Exception { + public UserVo.TokenBean getUserInfoAndToken(WebConstant.CLIENT_TYPE clientType, UserVo.UserSign userSignVo, Map theMap) throws Exception { - UserVo.TokenBean tokenBean = generateToken(client_type, userSignVo.getUserId(), theMap); + UserVo.TokenBean tokenBean = generateToken(clientType, userSignVo.getUserId(), theMap); //获取手机号 String phone = getPhone(userSignVo.getUserId()); //获取账号 String account = selectAccountByPhone(phone); - //获取用户的微信信息 - SysAuth sysAuth = authDao.selectByPrimaryKey(userSignVo.getAuthId()); - UserVo.WxInfo wxInfo = new UserVo.WxInfo(); - SysWx sysWx = getSysWx(sysAuth.getIdentifier()); - if(ObjectUtil.isNotNull(sysAuth)){ - BeanUtil.copyProperties(sysWx,wxInfo); + //获取用户的基本信息、 + UserVo.WxInfo wxInfo = null; + SysUser user = userDao.selectByPrimaryKey(userSignVo.getUserId()); + if(ObjectUtil.isNotNull(user)) { + wxInfo = new UserVo.WxInfo(); + BeanUtil.copyProperties(user, wxInfo); + wxInfo.setSex(user.getGender()); + wxInfo.setHeadImgUrl(user.getAvatarUrl()); } - tokenBean.setId(userSignVo.getUserId()); tokenBean.setPhone(phone); tokenBean.setAccount(account); @@ -889,14 +959,136 @@ public class UserService implements IUserService { return tokenBean; } - private SysWx getSysWx(String unionId){ + private SysWx getSysWx(String unionId) { SysWx sysWx = null; SysWxExample sysWxExample = new SysWxExample(); sysWxExample.createCriteria().andUnionIdEqualTo(unionId); List sysWxList = sysWxDao.selectByExample(sysWxExample); - if(CollectionUtil.isNotEmpty(sysWxList)){ - sysWx = sysWxList.get(0); + if (CollectionUtil.isNotEmpty(sysWxList)) { + sysWx = sysWxList.get(0); } return sysWx; } + + /** + * 合并账号 + * @param currentUserId + * @param wxPhone + * @return + */ + @Override + public UserVo.UserSign mergeByPhone(Long currentUserId, UserDto.WxMergePhone wxPhone) { + if (wxPhone.getIsMerge() == 0) { + //直接合并 + //1.查找手机号原来的userId + Long userId = selectUserIdByPhone(wxPhone.getPhone()); + if(ObjectUtil.isNotNull(userId)){ + //处理账号认证信息,保留手机号的账号,删除现在的账号 + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) + .andUserIdEqualTo(currentUserId); + List authList = authDao.selectByExample(authExample); + if(CollectionUtil.isNotEmpty(authList)){ + for(SysAuth auth : authList){ + auth.setRecStatus((byte) 2); + authDao.updateByPrimaryKeySelective(auth); + } + } + userDao.replaceAuth(userId,currentUserId); + //查询所有关联userId的数据库表 auth表 attention表 balance表 project表 member表 DeliverPostLog表 proLog表 + //依次将查出的数据的旧userId 替换成新的userId + userDao.replaceAttention(userId,currentUserId); + userDao.replaceBalance(userId,currentUserId); + userDao.replaceProject(userId,currentUserId); + userDao.replaceMember(userId,currentUserId); + userDao.replaceDeliverPostLog(userId,currentUserId); + userDao.replaceProLog(userId,currentUserId); + //将以前的余额添加至此账号 + SysUser oldUser = userDao.selectByPrimaryKey(userId); + SysUser newUser = userDao.selectByPrimaryKey(currentUserId); + updateBalance(oldUser,newUser); + //将以前的user删除 + oldUser.setRecStatus((byte) 2); + userDao.updateByPrimaryKeySelective(oldUser); + + }else { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + } else { + //不要以前的信息 + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) + .andIdentifierEqualTo(wxPhone.getPhone()); + List authList = authDao.selectByExample(authExample); + if(CollectionUtil.isNotEmpty(authList)){ + SysAuth auth = authList.get(0); + auth.setUserId(currentUserId); + authDao.updateByPrimaryKeySelective(auth); + } + } + + UserVo.UserSign userSignVo = null; + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) + .andIdentifierEqualTo(wxPhone.getPhone()); + List authList = authDao.selectByExample(authExample); + if(CollectionUtil.isNotEmpty(authList)) { + userSignVo = new UserVo.UserSign(); + userSignVo.setAuthId(authList.get(0).getId()); + userSignVo.setUserId(authList.get(0).getUserId()); + } + + return userSignVo; + } + private void updateBalance(SysUser oldUser,SysUser newUser){ + newUser.setBalance(newUser.getBalance() + oldUser.getBalance()); + userDao.updateByPrimaryKeySelective(newUser); + //添加一条余额变更记录 + SysBalanceLog balanceLog = new SysBalanceLog(); + balanceLog.setId(snowflake.nextId()); + balanceLog.setUserId(newUser.getId()); + balanceLog.setBalance(newUser.getBalance()); + balanceLog.setOffset(oldUser.getBalance()); + balanceLog.setDescription("合并账号"); + sysBalanceLogDao.insertSelective(balanceLog); + } + + /** + * 修改用户信息(添加微信信息) + * @return + */ + @Override + public UserVo.WxInfo updateUserInfo(Long currentUserId, UserDto.WxInfo userInfo) { + //通过userid查找到用户 + SysUser user = userDao.selectByPrimaryKey(currentUserId); + + if(StrUtil.isNotEmpty(userInfo.getNickname())){ + user.setNickname(userInfo.getNickname()); + } + if(StrUtil.isNotEmpty(userInfo.getHeadImgUrl())){ + user.setAvatarUrl(userInfo.getHeadImgUrl()); + } + if(ObjectUtil.isNotNull(userInfo.getSex())){ + user.setGender(userInfo.getSex()); + } + if(StrUtil.isNotEmpty(userInfo.getCountry())){ + user.setCountry(userInfo.getCountry()); + } + if(StrUtil.isNotEmpty(userInfo.getProvince())){ + user.setProvince(userInfo.getProvince()); + } + if(StrUtil.isNotEmpty(userInfo.getCity())){ + user.setCity(userInfo.getCity()); + } + if(StrUtil.isNotEmpty(userInfo.getLanguage())){ + user.setLanguage(userInfo.getLanguage()); + } + userDao.updateByPrimaryKeySelective(user); + + UserVo.WxInfo wxInfo = new UserVo.WxInfo(); + BeanUtil.copyProperties(user,wxInfo); + wxInfo.setHeadImgUrl(user.getAvatarUrl()); + wxInfo.setSex(user.getGender()); + return wxInfo; + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java b/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java new file mode 100644 index 00000000..2e9736b0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java @@ -0,0 +1,252 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.po.*; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.ExcelUtil; +import com.ccsens.util.StringUtil; +import com.ccsens.util.WebConstant; +import com.ccsens.util.exception.BaseException; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + + +@Service +public class WbsSubSheetService implements IWbsSubSheetService{ + @Autowired + private Snowflake snowflake; + @Autowired + private ITaskMemberService taskMemberService; + @Autowired + private IProTaskDetailService proTaskDetailService; + @Autowired + private IExcelService excelService; + /** + * 读取子任务表 + */ + @Override + public void getSubTask(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, + List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { + XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); + Long startTime = parentTaskDetail.getBeginTime(); + if (ObjectUtil.isNotNull(subTaskSheet)) { + String str = ExcelUtil.getCellValue(subTaskSheet.getRow(1).getCell(4)); + for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { + String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); + String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); + String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); + //重复时间、相对时间 + String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); + String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); + //备注 + String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); + if (StrUtil.isNotEmpty(nameCell)) { + ProTaskDetail subTask = new ProTaskDetail(); + BeanUtil.copyProperties(parentTaskDetail, subTask); + subTask.setId(snowflake.nextId()); + subTask.setName(nameCell); + subTask.setDescription(descriptionCell); + subTask.setLevel((byte) 3); + subTask.setHasGroup((byte) 0); + subTask.setParentId(parentTaskDetail.getId()); + if (StrUtil.isNotEmpty(memberCell)) { + if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { + parentTaskDetail.setAllMember((byte) 1); + subTask.setAllMember((byte) 1); + } else { + parentTaskDetail.setAllMember((byte) 0); + subTask.setAllMember((byte) 0); + List memberList = StringUtil.extractMessage(memberCell); + if (CollectionUtil.isNotEmpty(memberList)) { + for (String memberName : memberList) { + if (CollectionUtil.isNotEmpty(proMembers)) { + Long proMemberId = null; + for (ProMember proMember : proMembers) { + if (memberName.equalsIgnoreCase(proMember.getNickname())) { + proMemberId = proMember.getId(); + ProTaskMember proTaskMember = new ProTaskMember(); + proTaskMember.setId(snowflake.nextId()); + proTaskMember.setTaskDetailId(subTask.getId()); + proTaskMember.setMemberId(proMemberId); + taskMemberService.saveTaskMember(proTaskMember); + break; + } + } + if (ObjectUtil.isNull(proMemberId)) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + } + } + } else { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + } + } + + if (StrUtil.isNotEmpty(repeatCell)) { + if ("重复时间".equals(str)) { + subTask.setCycle(repeatCell); + } + if ("相对时间".equals(str)) { + subTask.setBeginTime(startTime); + Long relative = StringUtil.severalDay(repeatCell); + if (ObjectUtil.isNotNull(relative)) { + subTask.setEndTime(startTime + relative); + } + } + } else { + if (ObjectUtil.isNotNull(beginCell)) { + subTask.setBeginTime(Long.valueOf(beginCell)); + } + if (ObjectUtil.isNotNull(endCell)) { + subTask.setEndTime(Long.valueOf(endCell)); + } + parentTaskDetail.setBeginTime(subTask.getBeginTime()); + } + startTime = subTask.getEndTime(); + //给每个子任务添加交付物 + excelService.readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); + + proTaskDetailService.saveTaskDetail(subTask); + taskDetails.add(subTask); + } + } + } else { + throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); + } + parentTaskDetail.setRecStatus((byte) 2); + } + + /** + * 读取年终总结子表 + */ + @Override + public void getSubTaskMt(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, + List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { + List taskNameList = new ArrayList<>(); + + XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); + if (ObjectUtil.isNotNull(subTaskSheet)) { + for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { + String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); + String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); + String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); + //重复时间、相对时间 + String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); + String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); + //备注 + String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); + if (StrUtil.isNotEmpty(nameCell)) { + ProTaskDetail subTask = new ProTaskDetail(); + BeanUtil.copyProperties(parentTaskDetail, subTask); + subTask.setId(snowflake.nextId()); + subTask.setName(nameCell); + subTask.setDescription(descriptionCell); + if (StrUtil.isNotEmpty(beginCell)) { + subTask.setBeginTime(Long.valueOf(beginCell)); + } + if (StrUtil.isNotEmpty(endCell)) { + subTask.setEndTime(Long.valueOf(endCell)); + } + subTask.setLevel((byte) 2); + subTask.setHasGroup((byte) 0); + if (StrUtil.isNotEmpty(memberCell)) { + if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { + subTask.setAllMember((byte) 1); + } else { + subTask.setAllMember((byte) 0); + if (CollectionUtil.isNotEmpty(proMembers)) { + Long proMemberId = null; + for (ProMember proMember : proMembers) { + if (memberCell.equalsIgnoreCase(proMember.getNickname())) { + proMemberId = proMember.getId(); + ProTaskMember proTaskMember = new ProTaskMember(); + proTaskMember.setId(snowflake.nextId()); + proTaskMember.setMemberId(proMemberId); + proTaskMember.setTaskDetailId(subTask.getId()); + taskMemberService.saveTaskMember(proTaskMember); + break; + } + } + if (ObjectUtil.isNull(proMemberId)) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + } + } + } else { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + + //给每个子任务添加交付物 + excelService.readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); + + proTaskDetailService.saveTaskDetail(subTask); + taskDetails.add(subTask); + taskNameList.add(subTask); + } + } + hasGroupMap.put(parentTaskDetail.getName(), taskNameList); + } else { + throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); + } + } + + + public void getSigninSheet(XSSFWorkbook xssfWorkbook,List taskDetails){ + XSSFSheet signSheet = xssfWorkbook.getSheet("签到信息表"); + int fuzzyStart = 0; + for (int i = 0; i <= signSheet.getLastRowNum(); i++) { + XSSFRow xssfRow = signSheet.getRow(i); + if (xssfRow == null) { + continue; + } + XSSFCell xssfCell = xssfRow.getCell(0); + if (xssfCell == null) { + continue; + } + String s = ExcelUtil.getCellValue(xssfCell); + + if (s.indexOf("需要模糊查询的信息") == 0) { + fuzzyStart = i + 1; + } + } + + for (int i = 0; i < fuzzyStart; i++) { + String taskName = ExcelUtil.getCellValue(signSheet.getRow(i).getCell(1)); + String pluginName = ExcelUtil.getCellValue(signSheet.getRow(i).getCell(2)); + String signName = ExcelUtil.getCellValue(signSheet.getRow(i).getCell(3)); + String isRequired = ExcelUtil.getCellValue(signSheet.getRow(i).getCell(3)); + + ProPluginSignin proPluginSignin = new ProPluginSignin(); + + + Long taskDetailId = null; + if(StrUtil.isNotEmpty(taskName) && CollectionUtil.isNotEmpty(taskDetails)){ + for(ProTaskDetail taskDetail : taskDetails){ + if(taskName.equalsIgnoreCase(taskDetail.getName())){ + taskDetailId = taskDetail.getId(); + break; + } + } + } + if(ObjectUtil.isNotNull(pluginName)){ + SysPluginExample sysPluginExample = new SysPluginExample(); + sysPluginExample.createCriteria().andNameEqualTo(pluginName); + } + + } + + } +} diff --git a/tall/src/main/java/com/ccsens/tall/web/UserController.java b/tall/src/main/java/com/ccsens/tall/web/UserController.java index e6de7c6f..e6fa38ae 100644 --- a/tall/src/main/java/com/ccsens/tall/web/UserController.java +++ b/tall/src/main/java/com/ccsens/tall/web/UserController.java @@ -44,13 +44,13 @@ public class UserController { @RequestMapping(value = "/signin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse userSignin(HttpServletRequest request, @ApiParam @Validated @RequestBody(required = true) UserDto.UserSginin dto) throws Exception { - WebConstant.CLIENT_TYPE client_type = WebConstant.CLIENT_TYPE.valueOf(dto.getClient()); + WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(dto.getClient()); WebConstant.IDENTIFY_TYPE identify_type = WebConstant.IDENTIFY_TYPE.valueOf(dto.getType()); String identifier = dto.getData().getIdentifier(); String credential = dto.getData().getCredential(); //1.验证参数 - switch (client_type) { + switch (clientType) { case Wxmp: case H5: case Android: @@ -58,7 +58,7 @@ public class UserController { break; default: throw new UserLoginException(-1, String.format("Not supported client type: %1$d(%2$s)", - client_type.value, client_type)); + clientType.value, clientType)); } switch (identify_type) { case Wxmp: @@ -84,14 +84,14 @@ public class UserController { //2.调用业务方法(注册/添加登陆记录) UserVo.UserSign userSignVo = userService.signin( - client_type, identify_type, identifier, credential, + clientType, identify_type, identifier, credential, ServletUtil.getClientIP(request)); //3.生成token(access_token,refresh_token) if (ObjectUtil.isNotNull(userSignVo)) { Map theMap = CollectionUtil.newHashMap(); theMap.put("authId", String.valueOf(userSignVo.getAuthId())); - UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(client_type, userSignVo, theMap); + UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(clientType, userSignVo, theMap); return JsonResponse.newInstance().ok(tokenBean); } else { @@ -105,7 +105,7 @@ public class UserController { @RequestMapping(value = "/smscode", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse getSmsCode(HttpServletRequest request, @ApiParam @RequestParam String phone, - @ApiParam @RequestParam Integer client) throws Exception { + @ApiParam Integer client) throws Exception { UserVo.SmsCode smsCodeVo = userService.getSignInSmsCode(phone,client); return JsonResponse.newInstance().ok(smsCodeVo); @@ -121,16 +121,22 @@ public class UserController { UserVo.UserSign userSignVo = userService.registerUser(userSignup); //3.生成token(access_token,refresh_token) if (ObjectUtil.isNotNull(userSignVo)) { - WebConstant.CLIENT_TYPE client_type = WebConstant.CLIENT_TYPE.valueOf(1); + WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); + Map theMap = CollectionUtil.newHashMap(); theMap.put("authId", String.valueOf(userSignVo.getAuthId())); - UserVo.TokenBean tokenBean = userService.generateToken(client_type, userSignVo.getUserId(), theMap); - //获取手机号 - String phone = userService.getPhone(userSignVo.getUserId()); - String account = userService.selectAccountByPhone(phone); - tokenBean.setId(userSignVo.getUserId()); - tokenBean.setPhone(phone); - tokenBean.setAccount(account); + UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(clientType, userSignVo, theMap); + +// Map theMap = CollectionUtil.newHashMap(); +// theMap.put("authId", String.valueOf(userSignVo.getAuthId())); +// UserVo.TokenBean tokenBean = userService.generateToken(client_type, userSignVo.getUserId(), theMap); +// //获取手机号 +// String phone = userService.getPhone(userSignVo.getUserId()); +// String account = userService.selectAccountByPhone(phone); +// tokenBean.setId(userSignVo.getUserId()); +// tokenBean.setPhone(phone); +// tokenBean.setAccount(account); + return JsonResponse.newInstance().ok(tokenBean); } else { return JsonResponse.newInstance().fail("登陆信息不正确."); @@ -148,15 +154,15 @@ public class UserController { } - @ApiOperation(value = "/检查手机号是否被注册", notes = "") - @ApiImplicitParams({ - }) - @RequestMapping(value = "/phone", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse findPhone(@ApiParam @RequestParam String phone) throws Exception { - - Boolean flag = userService.findPhone(phone); - return JsonResponse.newInstance().ok(flag); - } +// @ApiOperation(value = "/检查手机号是否被注册", notes = "") +// @ApiImplicitParams({ +// }) +// @RequestMapping(value = "/phone", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse findPhone(@ApiParam @RequestParam String phone) throws Exception { +// +// Boolean flag = userService.findPhone(phone); +// return JsonResponse.newInstance().ok(flag); +// } // @ApiOperation(value = "/修改账号信息",notes = "") // @ApiImplicitParams({ @@ -172,22 +178,38 @@ public class UserController { @ApiImplicitParams({ }) @RequestMapping(value="/merge",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) - public JsonResponse bindingPhone(HttpServletRequest request, + public JsonResponse bindingPhone(HttpServletRequest request, @ApiParam @RequestBody UserDto.WxMergePhone wxPhone) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); -// String returnPhone = userService.bindingPhone(currentUserId,wxPhone); - return JsonResponse.newInstance().ok(); + UserVo.UserSign userSignVo = userService.mergeByPhone(currentUserId,wxPhone); + + UserVo.TokenBean tokenBean = null; + if (ObjectUtil.isNotNull(userSignVo)) { + WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); + Map theMap = CollectionUtil.newHashMap(); + theMap.put("authId", String.valueOf(userSignVo.getAuthId())); + tokenBean = userService.getUserInfoAndToken(clientType, userSignVo, theMap); + } + return JsonResponse.newInstance().ok(tokenBean); } - @ApiOperation(value = "/微信绑定账号(没有账号,注册)",notes = "") + @ApiOperation(value = "/微信绑定账号",notes = "") @ApiImplicitParams({ }) - @RequestMapping(value="/phone",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) - public JsonResponse bindingPhone(HttpServletRequest request, + @RequestMapping(value="/binding",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) + public JsonResponse bindingPhone(HttpServletRequest request, @ApiParam @RequestBody UserDto.WxBindingPhone wxPhone) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - String returnPhone = userService.bindingNewPhone(currentUserId,wxPhone); - return JsonResponse.newInstance().ok(returnPhone); + UserVo.UserSign userSignVo = userService.bindingNewPhone(currentUserId,wxPhone); + + UserVo.TokenBean tokenBean = null; + if (ObjectUtil.isNotNull(userSignVo)) { + WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); + Map theMap = CollectionUtil.newHashMap(); + theMap.put("authId", String.valueOf(userSignVo.getAuthId())); + tokenBean = userService.getUserInfoAndToken(clientType, userSignVo, theMap); + } + return JsonResponse.newInstance().ok(tokenBean); } @ApiOperation(value = "/更改绑定手机", notes = "") @@ -201,6 +223,16 @@ public class UserController { return JsonResponse.newInstance().ok(); } + @ApiOperation(value = "/修改用户信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/userInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateUserInfo(HttpServletRequest request, + @ApiParam @RequestBody UserDto.WxInfo userInfo) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + UserVo.WxInfo wxInfo = userService.updateUserInfo(currentUserId, userInfo); + return JsonResponse.newInstance().ok(wxInfo); + } @ApiOperation(value = "修改密码", notes = "") @ApiImplicitParams({ diff --git a/tall/src/main/resources/mapper_dao/SysUserDao.xml b/tall/src/main/resources/mapper_dao/SysUserDao.xml new file mode 100644 index 00000000..4e33a7ff --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysUserDao.xml @@ -0,0 +1,69 @@ + + + + + + + + update + t_sys_auth + set + user_id = #{newUserId} + where + user_id = #{oldUserId} + + + + update + t_sys_user_attention + set + user_id = #{newUserId} + where + user_id = #{oldUserId} + + + + update + t_sys_balance_log + set + user_id = #{newUserId} + where + user_id = #{oldUserId} + + + + update + t_sys_project + set + creator_id = #{newUserId} + where + creator_id = #{oldUserId} + + + + update + t_pro_member + set + user_id = #{newUserId} + where + user_id = #{oldUserId} + + + + update + t_pro_task_deliver_post_log + set + user_id = #{newUserId} + where + user_id = #{oldUserId} + + + + update + t_pro_log + set + user_id = #{newUserId} + where + user_id = #{oldUserId} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProPluginSigninFuzzyMapper.xml b/tall/src/main/resources/mapper_raw/ProPluginSigninFuzzyMapper.xml new file mode 100644 index 00000000..c9ec4c22 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProPluginSigninFuzzyMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + 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, project_id, signin_field_id, description, created_at, updated_at, rec_status + + + + + delete from t_pro_plugin_signin_fuzzy + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_plugin_signin_fuzzy + + + + + + insert into t_pro_plugin_signin_fuzzy (id, project_id, signin_field_id, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{signinFieldId,jdbcType=BIGINT}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_pro_plugin_signin_fuzzy + + + id, + + + project_id, + + + signin_field_id, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{signinFieldId,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_plugin_signin_fuzzy + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + signin_field_id = #{record.signinFieldId,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_plugin_signin_fuzzy + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + signin_field_id = #{record.signinFieldId,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_plugin_signin_fuzzy + + + project_id = #{projectId,jdbcType=BIGINT}, + + + signin_field_id = #{signinFieldId,jdbcType=BIGINT}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_plugin_signin_fuzzy + set project_id = #{projectId,jdbcType=BIGINT}, + signin_field_id = #{signinFieldId,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProPluginSigninMapper.xml b/tall/src/main/resources/mapper_raw/ProPluginSigninMapper.xml new file mode 100644 index 00000000..96a7f78a --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProPluginSigninMapper.xml @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + 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, task_plugin_id, signin_field_id, is_fuzzy, is_required, created_at, updated_at, + rec_status + + + + + delete from t_pro_plugin_signin + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_plugin_signin + + + + + + insert into t_pro_plugin_signin (id, task_plugin_id, signin_field_id, + is_fuzzy, is_required, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{taskPluginId,jdbcType=BIGINT}, #{signinFieldId,jdbcType=BIGINT}, + #{isFuzzy,jdbcType=TINYINT}, #{isRequired,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_pro_plugin_signin + + + id, + + + task_plugin_id, + + + signin_field_id, + + + is_fuzzy, + + + is_required, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{taskPluginId,jdbcType=BIGINT}, + + + #{signinFieldId,jdbcType=BIGINT}, + + + #{isFuzzy,jdbcType=TINYINT}, + + + #{isRequired,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_plugin_signin + + + id = #{record.id,jdbcType=BIGINT}, + + + task_plugin_id = #{record.taskPluginId,jdbcType=BIGINT}, + + + signin_field_id = #{record.signinFieldId,jdbcType=BIGINT}, + + + is_fuzzy = #{record.isFuzzy,jdbcType=TINYINT}, + + + is_required = #{record.isRequired,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_plugin_signin + set id = #{record.id,jdbcType=BIGINT}, + task_plugin_id = #{record.taskPluginId,jdbcType=BIGINT}, + signin_field_id = #{record.signinFieldId,jdbcType=BIGINT}, + is_fuzzy = #{record.isFuzzy,jdbcType=TINYINT}, + is_required = #{record.isRequired,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_plugin_signin + + + task_plugin_id = #{taskPluginId,jdbcType=BIGINT}, + + + signin_field_id = #{signinFieldId,jdbcType=BIGINT}, + + + is_fuzzy = #{isFuzzy,jdbcType=TINYINT}, + + + is_required = #{isRequired,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_plugin_signin + set task_plugin_id = #{taskPluginId,jdbcType=BIGINT}, + signin_field_id = #{signinFieldId,jdbcType=BIGINT}, + is_fuzzy = #{isFuzzy,jdbcType=TINYINT}, + is_required = #{isRequired,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SigninFieldMapper.xml b/tall/src/main/resources/mapper_raw/SigninFieldMapper.xml new file mode 100644 index 00000000..02630f75 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SigninFieldMapper.xml @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + 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, description, name, type, field_value, format, created_at, updated_at, rec_status + + + + + delete from t_sys_signin_field + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_signin_field + + + + + + insert into t_sys_signin_field (id, description, name, + type, field_value, format, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{type,jdbcType=TINYINT}, #{fieldValue,jdbcType=VARCHAR}, #{format,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_signin_field + + + id, + + + description, + + + name, + + + type, + + + field_value, + + + format, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{fieldValue,jdbcType=VARCHAR}, + + + #{format,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_signin_field + + + id = #{record.id,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + type = #{record.type,jdbcType=TINYINT}, + + + field_value = #{record.fieldValue,jdbcType=VARCHAR}, + + + format = #{record.format,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_signin_field + set id = #{record.id,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=TINYINT}, + field_value = #{record.fieldValue,jdbcType=VARCHAR}, + format = #{record.format,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_signin_field + + + description = #{description,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + field_value = #{fieldValue,jdbcType=VARCHAR}, + + + format = #{format,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_signin_field + set description = #{description,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + field_value = #{fieldValue,jdbcType=VARCHAR}, + format = #{format,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysBalanceLogMapper.xml b/tall/src/main/resources/mapper_raw/SysBalanceLogMapper.xml index 0697f8c4..39680820 100644 --- a/tall/src/main/resources/mapper_raw/SysBalanceLogMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysBalanceLogMapper.xml @@ -1,275 +1,275 @@ - - - - - - - - - - - - - - - - - - - - - - - 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, user_id, balance, offset, type, phase, created_at, updated_at, rec_status - - - - - delete from t_sys_balance_log - where id = #{id,jdbcType=BIGINT} - - - delete from t_sys_balance_log - - - - - - insert into t_sys_balance_log (id, user_id, balance, - offset, type, phase, - created_at, updated_at, rec_status - ) - values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{balance,jdbcType=INTEGER}, - #{offset,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{phase,jdbcType=VARCHAR}, - #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} - ) - - - insert into t_sys_balance_log - - - id, - - - user_id, - - - balance, - - - offset, - - - type, - - - phase, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{userId,jdbcType=BIGINT}, - - - #{balance,jdbcType=INTEGER}, - - - #{offset,jdbcType=INTEGER}, - - - #{type,jdbcType=INTEGER}, - - - #{phase,jdbcType=VARCHAR}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_sys_balance_log - - - id = #{record.id,jdbcType=BIGINT}, - - - user_id = #{record.userId,jdbcType=BIGINT}, - - - balance = #{record.balance,jdbcType=INTEGER}, - - - offset = #{record.offset,jdbcType=INTEGER}, - - - type = #{record.type,jdbcType=INTEGER}, - - - phase = #{record.phase,jdbcType=VARCHAR}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_sys_balance_log - set id = #{record.id,jdbcType=BIGINT}, - user_id = #{record.userId,jdbcType=BIGINT}, - balance = #{record.balance,jdbcType=INTEGER}, - offset = #{record.offset,jdbcType=INTEGER}, - type = #{record.type,jdbcType=INTEGER}, - phase = #{record.phase,jdbcType=VARCHAR}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_sys_balance_log - - - user_id = #{userId,jdbcType=BIGINT}, - - - balance = #{balance,jdbcType=INTEGER}, - - - offset = #{offset,jdbcType=INTEGER}, - - - type = #{type,jdbcType=INTEGER}, - - - phase = #{phase,jdbcType=VARCHAR}, - - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - - - where id = #{id,jdbcType=BIGINT} - - - update t_sys_balance_log - set user_id = #{userId,jdbcType=BIGINT}, - balance = #{balance,jdbcType=INTEGER}, - offset = #{offset,jdbcType=INTEGER}, - type = #{type,jdbcType=INTEGER}, - phase = #{phase,jdbcType=VARCHAR}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} - where id = #{id,jdbcType=BIGINT} - + + + + + + + + + + + + + + + + + + + + + + + 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, user_id, balance, offset, type, description, created_at, updated_at, rec_status + + + + + delete from t_sys_balance_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_balance_log + + + + + + insert into t_sys_balance_log (id, user_id, balance, + offset, type, description, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{balance,jdbcType=BIGINT}, + #{offset,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_balance_log + + + id, + + + user_id, + + + balance, + + + offset, + + + type, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{balance,jdbcType=BIGINT}, + + + #{offset,jdbcType=BIGINT}, + + + #{type,jdbcType=INTEGER}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_balance_log + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + balance = #{record.balance,jdbcType=BIGINT}, + + + offset = #{record.offset,jdbcType=BIGINT}, + + + type = #{record.type,jdbcType=INTEGER}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_balance_log + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + balance = #{record.balance,jdbcType=BIGINT}, + offset = #{record.offset,jdbcType=BIGINT}, + type = #{record.type,jdbcType=INTEGER}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_balance_log + + + user_id = #{userId,jdbcType=BIGINT}, + + + balance = #{balance,jdbcType=BIGINT}, + + + offset = #{offset,jdbcType=BIGINT}, + + + type = #{type,jdbcType=INTEGER}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_balance_log + set user_id = #{userId,jdbcType=BIGINT}, + balance = #{balance,jdbcType=BIGINT}, + offset = #{offset,jdbcType=BIGINT}, + type = #{type,jdbcType=INTEGER}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/CodeEnum.java b/util/src/main/java/com/ccsens/util/CodeEnum.java index dc2d452d..594be799 100644 --- a/util/src/main/java/com/ccsens/util/CodeEnum.java +++ b/util/src/main/java/com/ccsens/util/CodeEnum.java @@ -84,9 +84,13 @@ public enum CodeEnum { GAME_PREPARATION(67, "游戏已经开始倒计时了", true), GAME_PROCESSING (68, "游戏已经在火热进行啦", true), GAME_COMPLETED(69, "抱歉,您来晚了,游戏已结束", true), - NOT_REGISTER(70,"该手机号尚未注册账号,请填写用户名与密码进行注册同时绑定微信",true), + NOT_REGISTER(70,"该手机号尚未注册账号",true), PHONE_ERR(71,"请输入正确的手机号",true), - NOT_SELECT_WX(72,"未查到对应的微信信息",true) + NOT_SELECT_WX(72,"未查到对应的微信信息",true), + ALREADY_EXIST_PHONE(73,"手机号已存在",true), + ALREADY_BINDING_PHONE(74,"您已绑定过手机号,请勿重复绑定",true), + MERGE_WX_PHONE(75,"该手机号已经注册过账号,是否将账号合并",true), + ALREADY_EXIST_ACCOUNT(76,"该账号已存在",true), ; public CodeEnum addMsg(String msg){ diff --git a/util/src/main/java/com/ccsens/util/WebConstant.java b/util/src/main/java/com/ccsens/util/WebConstant.java index 4616bcdb..682b7404 100644 --- a/util/src/main/java/com/ccsens/util/WebConstant.java +++ b/util/src/main/java/com/ccsens/util/WebConstant.java @@ -3,6 +3,7 @@ package com.ccsens.util; import cn.hutool.core.codec.Base64; import lombok.Data; import lombok.Getter; +import org.apache.commons.lang3.RandomStringUtils; import java.io.File; @@ -41,6 +42,7 @@ public class WebConstant { public static final String HEADER_KEY_TOKEN_PREFIX = "Bearer "; public static final String REQUEST_KEY_CLAIMS = "claims"; public static final String REQUEST_KEY_TOKEN_USERS = "Token_User"; + public static final String RANDOM_STR = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; diff --git a/util/src/main/java/com/ccsens/util/WechatUtil.java b/util/src/main/java/com/ccsens/util/WechatUtil.java index 1bfc7513..74d3f2cb 100644 --- a/util/src/main/java/com/ccsens/util/WechatUtil.java +++ b/util/src/main/java/com/ccsens/util/WechatUtil.java @@ -1,430 +1,430 @@ -package com.ccsens.util; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import lombok.Data; -import org.apache.commons.codec.digest.DigestUtils; - -import java.io.ByteArrayInputStream; -import java.io.UnsupportedEncodingException; -import java.net.ConnectException; -import java.util.*; - -@Data -class GetUserInfoException extends RuntimeException{ - private int code; - public GetUserInfoException(int code,String message){ - super(message); - this.code = code; - } -} - -@Data -class PayException extends RuntimeException{ - private int code; - public PayException(int code,String message){ - super(message); - this.code = code; - } - - public PayException(String message){ - super(message); - this.code = -1; - } -} - -public class WechatUtil { - - /** - * 被Jasckson使用的内部类 必须是static的 - */ - public static class WechatUser { - public String openid; - public String session_key; - public String unionid; - public String errcode; - public String errmsg; - } - - /** - * Access_Token - */ - public static class WechatToken{ - public String access_token; - public Long expires_in; - public String errcode; - public String errmsg; - public Date create_at; - } - - /** - * Get wx code - */ - public static class WechatCode{ - public String scene; - public String page; - public Integer width; - public Boolean auto_color; - public Boolean line_color; - public Boolean is_hyaline; - } - - /** - * Prepare pay - */ - public static class PreparePayBean{ - public String appid;//小程序ID - public String mch_id;//商户号 - public String device_info;//设备号 - public String nonce_str;//随机字符串 - public String sign;//签名 - public String sign_type; //签名类型 - public String body;//商品描述 - public String detail;//商品详情 - public String attach;//附加数据 - public String out_trade_no;//商户订单号 - public String fee_type;//货币类型 - public Integer total_fee; //金额(分) - public String spbill_create_ip;//终端IP - public String time_start;//交易起始时间 - public String time_expire;//交易结束时间 - public String goods_tag;//商品标记 - public String notify_url;//通知地址 - public String trade_type;//交易类型 - public String product_id;//商品id - public String limit_pay;//指定支付方式 - public String openid;//用户标识 - } - - /** - * Prepare pay result - */ - public static class PreparePayResultBean{ - public String return_code; - public String return_msg; - public String result_code; - public String prepay_id; - public String err_code; - public String err_code_des; - } - - /** - * Prepare pay resign - */ - public static class PreparePayReSignBean{ - public String nonceStr; - public String _package; - public long timeStamp; - public String paySign; - public String signType; - } - - private static final String URL_LOGIN - = "https://api.weixin.qq.com/sns/jscode2session?appid=%1$s&secret=%2$s&js_code=%3$s&grant_type=%4$s"; - private static final String URL_GET_ACCESS_TOKEN - = "https://api.weixin.qq.com/cgi-bin/token?grant_type=%1$s&appid=%2$s&secret=%3$s"; - private static final String URL_GET_WX_CODE_A - = "https://api.weixin.qq.com/wxa/getwxacode?access_token=%1$s"; - private static final String URL_GET_WX_CODE_B - = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=%1$s"; - private static final String URL_GET_WX_CODE_C - = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=%1$s"; - private static final String URL_PREPARE_PAY - = "https://api.mch.weixin.qq.com/pay/unifiedorder"; - private static final String URL_PAY_TO_USR_WX - = "https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers"; - private static final String URL_PAY_TO_USR_BANK - = "https://api.mch.weixin.qq.com/mmpaysptrans/pay_bank"; - - private static final String appid = "wx356e01c7eb01d55d"; - private static final String secret = "83149f3e151d9532f1d2eb76ca10722b"; - private static final String mchid = "1513955071"; - private static final String key = "5a689a2d6b8c4ff499c23d998fde0941"; //商户平台key - - /** - * 小程序登陆,根据code获取用户信息(openid,sessionKey,) - * @param code - * @return - * @throws ConnectException - * @throws Exception - */ - public static WechatUser getUserInfo(String code) throws Exception { - String response = null; - WechatUser wechatUser = null; - String url_login = String.format(URL_LOGIN, appid, secret, code, "authorization_code"); - - try { - response = HttpsUtil.httpsRequest(url_login, "GET", null); - wechatUser = JacksonUtil.jsonToBean(response, WechatUser.class); - }catch (Exception e){ - throw new GetUserInfoException(-1,e.getMessage()); - } - - if(wechatUser == null) { - throw new GetUserInfoException(-1, "Get UserInfoByCode failed."); - } - if(!StrUtil.isEmpty(wechatUser.errcode)) { - throw new GetUserInfoException(Integer.valueOf(wechatUser.errcode), wechatUser.errmsg); - } - - return wechatUser; - } - - /** - * 获取Access_token - * @return - * @throws Exception - */ - public static WechatToken getAccessToken() throws Exception { - String response = null; - WechatToken wechatToken = null; - String url = String.format(URL_GET_ACCESS_TOKEN,"client_credential",appid,secret); - - response = HttpsUtil.httpsRequest(url,"GET",null); - if(StrUtil.isEmpty(response)) { - return null; - } - wechatToken = JacksonUtil.jsonToBean(response,WechatToken.class); - wechatToken.create_at = new Date(); - return wechatToken; - } - - /** - * 获取小程序二维码/小程序码 - * @return - * @throws Exception - */ - public static void getWxCode(String page,String scene,String path) throws Exception { - WechatToken wechatToken = getAccessToken(); - String url = String.format(URL_GET_WX_CODE_B,wechatToken.access_token); - - WechatCode wechatCode = new WechatCode(); - wechatCode.page = page; - wechatCode.scene = scene; - - String postStr = JacksonUtil.beanToJson(wechatCode); - System.out.println(postStr); - - HttpsUtil.httpsRequest(url,"POST",postStr,path); - } - - /** - * 统一下单 - */ - public static PreparePayReSignBean preparePay(String openid,String out_trade_no,String body,int total_fee,String spbill_create_ip, - String notify_url) throws Exception { - PreparePayBean preparePayBean = new PreparePayBean(); - preparePayBean.appid = appid; - preparePayBean.mch_id = mchid; - preparePayBean.openid = openid; - preparePayBean.total_fee = total_fee; - preparePayBean.out_trade_no = out_trade_no; - preparePayBean.body = new String(body.getBytes("ISO-8859-1"),"UTF-8");//以utf-8编码放入paymentPo,微信支付要求字符编码统一采用UTF-8字符编码 - //preparePayBean.body = new String("聊天密码小程序-充值"); - preparePayBean.spbill_create_ip = spbill_create_ip; - preparePayBean.notify_url = notify_url; - preparePayBean.trade_type = "JSAPI"; - preparePayBean.nonce_str = createNonceStr(); - - // 把请求参数打包成数组 - Map sParaTemp = new HashMap(); - sParaTemp.put("appid", preparePayBean.appid); - sParaTemp.put("mch_id", preparePayBean.mch_id); - sParaTemp.put("openid", preparePayBean.openid); - sParaTemp.put("total_fee",preparePayBean.total_fee + ""); - sParaTemp.put("out_trade_no", preparePayBean.out_trade_no); - sParaTemp.put("body", preparePayBean.body); - sParaTemp.put("spbill_create_ip", preparePayBean.spbill_create_ip); - sParaTemp.put("notify_url",preparePayBean.notify_url); - sParaTemp.put("trade_type", preparePayBean.trade_type); - sParaTemp.put("nonce_str", preparePayBean.nonce_str); - - preparePayBean.sign = createSign(sParaTemp); - - String reqrXml = JacksonUtil.beanToXml(preparePayBean,"xml"); - String respXml = HttpsUtil.httpsRequest(URL_PREPARE_PAY,"POST",reqrXml); - - System.out.println("---------------PreparePay Request Xml-----------------"); - System.out.println(reqrXml); - System.out.println("---------------PreparePay Response Xml-----------------"); - System.out.println(respXml); - System.out.println("---------------PreparePay end-----------------"); - - PreparePayResultBean resultBean = null; - PreparePayReSignBean reSignBean = new PreparePayReSignBean(); - resultBean = JacksonUtil.xmlToBean(new ByteArrayInputStream(respXml.getBytes()),PreparePayResultBean.class); - - if(ObjectUtil.isNull(resultBean)) { - throw new PayException("PreparePay 返回的resultBean为空"); - } - - if(!StrUtil.isEmpty(resultBean.return_code) - && !StrUtil.isEmpty(resultBean.result_code)){ - if(resultBean.result_code.equals("SUCCESS") && resultBean.return_code.equals(resultBean.result_code)){ - reSignBean.nonceStr = createNonceStr(); - reSignBean._package = "prepay_id="+resultBean.prepay_id; - reSignBean.timeStamp = System.currentTimeMillis() / 1000; - reSignBean.signType = "MD5"; - - // 把请求参数打包成数组 - sParaTemp = new HashMap(); - sParaTemp.put("appId", appid); - sParaTemp.put("package", reSignBean._package); - sParaTemp.put("nonceStr", reSignBean.nonceStr); - sParaTemp.put("signType", reSignBean.signType); - sParaTemp.put("timeStamp",reSignBean.timeStamp + ""); - - reSignBean.paySign = createSign(sParaTemp); - - return reSignBean; - }else{ - throw new PayException("[" + resultBean.err_code + "]" - + resultBean.err_code_des); - } - }else { - throw new PayException(resultBean.return_msg); - } - //return null; - } - - /** - * Create Sign - * @param sParaTemp - * @return - */ - public static String createSign(Map sParaTemp){ - // 除去数组中的空值和签名参数 - Map sPara = paraFilter(sParaTemp); - String prestr = createLinkString(sPara); // 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串 - //MD5运算生成签名 - String sign = sign(prestr, key, "utf-8").toUpperCase(); - return sign; - } - - /** - * 除去数组中的空值和签名参数 - * @param sArray 签名参数组 - * @return 去掉空值与签名参数后的新签名参数组 - */ - private static Map paraFilter(Map sArray) { - Map result = new HashMap(); - if (sArray == null || sArray.size() <= 0) { - return result; - } - for (String key : sArray.keySet()) { - String value = "" + sArray.get(key); - if (StrUtil.isEmpty(value) || key.equalsIgnoreCase("sign") || key.equalsIgnoreCase("sign_type")) { - continue; - } - result.put(key, value); - } - return result; - } - - /** - * 把数组所有元素排序,并按照“参数=参数值”的模式用“&”字符拼接成字符串 - * @param params 需要排序并参与字符拼接的参数组 - * @return 拼接后字符串 - */ - private static String createLinkString(Map params) { - List keys = new ArrayList(params.keySet()); - Collections.sort(keys); - String prestr = ""; - for (int i = 0; i < keys.size(); i++) { - String key = keys.get(i); - String value = params.get(key); - if (i == keys.size() - 1) {// 拼接时,不包括最后一个&字符 - prestr = prestr + key + "=" + value; - } else { - prestr = prestr + key + "=" + value + "&"; - } - } - return prestr; - } - - /** - * 签名字符串 - * @param text 需要签名的字符串 - * @param key 密钥 - * @param input_charset 编码格式 - * @return 签名结果 - */ - private static String sign(String text, String key, String input_charset) { - text = text + "&key=" + key; - return DigestUtils.md5Hex(getContentBytes(text, input_charset)); - } - - /** - * @param content - * @param charset - * @return - * @throws - * @throws UnsupportedEncodingException - */ - private static byte[] getContentBytes(String content, String charset) { - if (charset == null || "".equals(charset)) { - return content.getBytes(); - } - try { - return content.getBytes(charset); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException("MD5签名过程中出现错误,指定的编码集不对,您目前指定的编码集是:" + charset); - } - } - - private static String createNonceStr(){ - return UUID.randomUUID().toString().replace("-",""); - } - - public static Map payToUsrWx( - String partner_trade_no,String openid,int total_fee,String desc,String spbill_create_ip) - throws Exception{ - //1.构造请求字符串 - Map reqMap = new HashMap(); - reqMap.put("mch_appid",appid); - reqMap.put("mchid",mchid); - //reqMap.put("device_info",null); //不能添加空字段,Jackson会生成闭包xml 导致签名失败 - reqMap.put("nonce_str",createNonceStr()); - reqMap.put("partner_trade_no",partner_trade_no); - reqMap.put("openid",openid); - reqMap.put("check_name","NO_CHECK"); - //reqMap.put("re_user_name",null); - reqMap.put("amount",total_fee + ""); - reqMap.put("desc",desc); - reqMap.put("spbill_create_ip",spbill_create_ip); - reqMap.put("sign",createSign(reqMap)); - - //2.发送付款请求 - String reqrXml = JacksonUtil.mapToXml(reqMap,"xml"); - String respXml = HttpsUtil.httpsRequest(URL_PAY_TO_USR_WX,"POST",reqrXml, - WebConstant.PATH_WX_CRET,mchid); - System.out.println("---------------PayToUsrWx Request Xml-----------------"); - System.out.println(reqrXml); - System.out.println("---------------PayToUsrWx Response Xml-----------------"); - System.out.println(respXml); - System.out.println("---------------PayToUsrWx end-----------------"); - - //3.判断成功失败 - Map respMap = JacksonUtil.xmlToMap(new ByteArrayInputStream(respXml.getBytes())); - String return_code,result_code; - return_code = (String) respMap.get("return_code"); - result_code = (String) respMap.get("result_code"); - - if(!StrUtil.isEmpty(return_code) && !StrUtil.isEmpty(result_code)){ - if(return_code.equals("SUCCESS") && return_code.equals(result_code)){ - return respMap; - }else{ - throw new PayException("[" + respMap.get("err_code") + "]" - + respMap.get("err_code_des")); - } - }else { - throw new PayException((String) respMap.get("return_msg")); - } - //return null; - } - - public static Map payToUsrBank(){ - //Fix Me - return null; - } -} +//package com.ccsens.util; +// +//import cn.hutool.core.util.ObjectUtil; +//import cn.hutool.core.util.StrUtil; +//import lombok.Data; +//import org.apache.commons.codec.digest.DigestUtils; +// +//import java.io.ByteArrayInputStream; +//import java.io.UnsupportedEncodingException; +//import java.net.ConnectException; +//import java.util.*; +// +//@Data +//class GetUserInfoException extends RuntimeException{ +// private int code; +// public GetUserInfoException(int code,String message){ +// super(message); +// this.code = code; +// } +//} +// +//@Data +//class PayException extends RuntimeException{ +// private int code; +// public PayException(int code,String message){ +// super(message); +// this.code = code; +// } +// +// public PayException(String message){ +// super(message); +// this.code = -1; +// } +//} +// +//public class WechatUtil { +// +// /** +// * 被Jasckson使用的内部类 必须是static的 +// */ +// public static class WechatUser { +// public String openid; +// public String session_key; +// public String unionid; +// public String errcode; +// public String errmsg; +// } +// +// /** +// * Access_Token +// */ +// public static class WechatToken{ +// public String access_token; +// public Long expires_in; +// public String errcode; +// public String errmsg; +// public Date create_at; +// } +// +// /** +// * Get wx code +// */ +// public static class WechatCode{ +// public String scene; +// public String page; +// public Integer width; +// public Boolean auto_color; +// public Boolean line_color; +// public Boolean is_hyaline; +// } +// +// /** +// * Prepare pay +// */ +// public static class PreparePayBean{ +// public String appid;//小程序ID +// public String mch_id;//商户号 +// public String device_info;//设备号 +// public String nonce_str;//随机字符串 +// public String sign;//签名 +// public String sign_type; //签名类型 +// public String body;//商品描述 +// public String detail;//商品详情 +// public String attach;//附加数据 +// public String out_trade_no;//商户订单号 +// public String fee_type;//货币类型 +// public Integer total_fee; //金额(分) +// public String spbill_create_ip;//终端IP +// public String time_start;//交易起始时间 +// public String time_expire;//交易结束时间 +// public String goods_tag;//商品标记 +// public String notify_url;//通知地址 +// public String trade_type;//交易类型 +// public String product_id;//商品id +// public String limit_pay;//指定支付方式 +// public String openid;//用户标识 +// } +// +// /** +// * Prepare pay result +// */ +// public static class PreparePayResultBean{ +// public String return_code; +// public String return_msg; +// public String result_code; +// public String prepay_id; +// public String err_code; +// public String err_code_des; +// } +// +// /** +// * Prepare pay resign +// */ +// public static class PreparePayReSignBean{ +// public String nonceStr; +// public String _package; +// public long timeStamp; +// public String paySign; +// public String signType; +// } +// +// private static final String URL_LOGIN +// = "https://api.weixin.qq.com/sns/jscode2session?appid=%1$s&secret=%2$s&js_code=%3$s&grant_type=%4$s"; +// private static final String URL_GET_ACCESS_TOKEN +// = "https://api.weixin.qq.com/cgi-bin/token?grant_type=%1$s&appid=%2$s&secret=%3$s"; +// private static final String URL_GET_WX_CODE_A +// = "https://api.weixin.qq.com/wxa/getwxacode?access_token=%1$s"; +// private static final String URL_GET_WX_CODE_B +// = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=%1$s"; +// private static final String URL_GET_WX_CODE_C +// = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=%1$s"; +// private static final String URL_PREPARE_PAY +// = "https://api.mch.weixin.qq.com/pay/unifiedorder"; +// private static final String URL_PAY_TO_USR_WX +// = "https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers"; +// private static final String URL_PAY_TO_USR_BANK +// = "https://api.mch.weixin.qq.com/mmpaysptrans/pay_bank"; +// +// private static final String appid = "wx356e01c7eb01d55d"; +// private static final String secret = "83149f3e151d9532f1d2eb76ca10722b"; +// private static final String mchid = "1513955071"; +// private static final String key = "5a689a2d6b8c4ff499c23d998fde0941"; //商户平台key +// +// /** +// * 小程序登陆,根据code获取用户信息(openid,sessionKey,) +// * @param code +// * @return +// * @throws ConnectException +// * @throws Exception +// */ +// public static WechatUser getUserInfo(String code) throws Exception { +// String response = null; +// WechatUser wechatUser = null; +// String url_login = String.format(URL_LOGIN, appid, secret, code, "authorization_code"); +// +// try { +// response = HttpsUtil.httpsRequest(url_login, "GET", null); +// wechatUser = JacksonUtil.jsonToBean(response, WechatUser.class); +// }catch (Exception e){ +// throw new GetUserInfoException(-1,e.getMessage()); +// } +// +// if(wechatUser == null) { +// throw new GetUserInfoException(-1, "Get UserInfoByCode failed."); +// } +// if(!StrUtil.isEmpty(wechatUser.errcode)) { +// throw new GetUserInfoException(Integer.valueOf(wechatUser.errcode), wechatUser.errmsg); +// } +// +// return wechatUser; +// } +// +// /** +// * 获取Access_token +// * @return +// * @throws Exception +// */ +// public static WechatToken getAccessToken() throws Exception { +// String response = null; +// WechatToken wechatToken = null; +// String url = String.format(URL_GET_ACCESS_TOKEN,"client_credential",appid,secret); +// +// response = HttpsUtil.httpsRequest(url,"GET",null); +// if(StrUtil.isEmpty(response)) { +// return null; +// } +// wechatToken = JacksonUtil.jsonToBean(response,WechatToken.class); +// wechatToken.create_at = new Date(); +// return wechatToken; +// } +// +// /** +// * 获取小程序二维码/小程序码 +// * @return +// * @throws Exception +// */ +// public static void getWxCode(String page,String scene,String path) throws Exception { +// WechatToken wechatToken = getAccessToken(); +// String url = String.format(URL_GET_WX_CODE_B,wechatToken.access_token); +// +// WechatCode wechatCode = new WechatCode(); +// wechatCode.page = page; +// wechatCode.scene = scene; +// +// String postStr = JacksonUtil.beanToJson(wechatCode); +// System.out.println(postStr); +// +// HttpsUtil.httpsRequest(url,"POST",postStr,path); +// } +// +// /** +// * 统一下单 +// */ +// public static PreparePayReSignBean preparePay(String openid,String out_trade_no,String body,int total_fee,String spbill_create_ip, +// String notify_url) throws Exception { +// PreparePayBean preparePayBean = new PreparePayBean(); +// preparePayBean.appid = appid; +// preparePayBean.mch_id = mchid; +// preparePayBean.openid = openid; +// preparePayBean.total_fee = total_fee; +// preparePayBean.out_trade_no = out_trade_no; +// preparePayBean.body = new String(body.getBytes("ISO-8859-1"),"UTF-8");//以utf-8编码放入paymentPo,微信支付要求字符编码统一采用UTF-8字符编码 +// //preparePayBean.body = new String("聊天密码小程序-充值"); +// preparePayBean.spbill_create_ip = spbill_create_ip; +// preparePayBean.notify_url = notify_url; +// preparePayBean.trade_type = "JSAPI"; +// preparePayBean.nonce_str = createNonceStr(); +// +// // 把请求参数打包成数组 +// Map sParaTemp = new HashMap(); +// sParaTemp.put("appid", preparePayBean.appid); +// sParaTemp.put("mch_id", preparePayBean.mch_id); +// sParaTemp.put("openid", preparePayBean.openid); +// sParaTemp.put("total_fee",preparePayBean.total_fee + ""); +// sParaTemp.put("out_trade_no", preparePayBean.out_trade_no); +// sParaTemp.put("body", preparePayBean.body); +// sParaTemp.put("spbill_create_ip", preparePayBean.spbill_create_ip); +// sParaTemp.put("notify_url",preparePayBean.notify_url); +// sParaTemp.put("trade_type", preparePayBean.trade_type); +// sParaTemp.put("nonce_str", preparePayBean.nonce_str); +// +// preparePayBean.sign = createSign(sParaTemp); +// +// String reqrXml = JacksonUtil.beanToXml(preparePayBean,"xml"); +// String respXml = HttpsUtil.httpsRequest(URL_PREPARE_PAY,"POST",reqrXml); +// +// System.out.println("---------------PreparePay Request Xml-----------------"); +// System.out.println(reqrXml); +// System.out.println("---------------PreparePay Response Xml-----------------"); +// System.out.println(respXml); +// System.out.println("---------------PreparePay end-----------------"); +// +// PreparePayResultBean resultBean = null; +// PreparePayReSignBean reSignBean = new PreparePayReSignBean(); +// resultBean = JacksonUtil.xmlToBean(new ByteArrayInputStream(respXml.getBytes()),PreparePayResultBean.class); +// +// if(ObjectUtil.isNull(resultBean)) { +// throw new PayException("PreparePay 返回的resultBean为空"); +// } +// +// if(!StrUtil.isEmpty(resultBean.return_code) +// && !StrUtil.isEmpty(resultBean.result_code)){ +// if(resultBean.result_code.equals("SUCCESS") && resultBean.return_code.equals(resultBean.result_code)){ +// reSignBean.nonceStr = createNonceStr(); +// reSignBean._package = "prepay_id="+resultBean.prepay_id; +// reSignBean.timeStamp = System.currentTimeMillis() / 1000; +// reSignBean.signType = "MD5"; +// +// // 把请求参数打包成数组 +// sParaTemp = new HashMap(); +// sParaTemp.put("appId", appid); +// sParaTemp.put("package", reSignBean._package); +// sParaTemp.put("nonceStr", reSignBean.nonceStr); +// sParaTemp.put("signType", reSignBean.signType); +// sParaTemp.put("timeStamp",reSignBean.timeStamp + ""); +// +// reSignBean.paySign = createSign(sParaTemp); +// +// return reSignBean; +// }else{ +// throw new PayException("[" + resultBean.err_code + "]" +// + resultBean.err_code_des); +// } +// }else { +// throw new PayException(resultBean.return_msg); +// } +// //return null; +// } +// +// /** +// * Create Sign +// * @param sParaTemp +// * @return +// */ +// public static String createSign(Map sParaTemp){ +// // 除去数组中的空值和签名参数 +// Map sPara = paraFilter(sParaTemp); +// String prestr = createLinkString(sPara); // 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串 +// //MD5运算生成签名 +// String sign = sign(prestr, key, "utf-8").toUpperCase(); +// return sign; +// } +// +// /** +// * 除去数组中的空值和签名参数 +// * @param sArray 签名参数组 +// * @return 去掉空值与签名参数后的新签名参数组 +// */ +// private static Map paraFilter(Map sArray) { +// Map result = new HashMap(); +// if (sArray == null || sArray.size() <= 0) { +// return result; +// } +// for (String key : sArray.keySet()) { +// String value = "" + sArray.get(key); +// if (StrUtil.isEmpty(value) || key.equalsIgnoreCase("sign") || key.equalsIgnoreCase("sign_type")) { +// continue; +// } +// result.put(key, value); +// } +// return result; +// } +// +// /** +// * 把数组所有元素排序,并按照“参数=参数值”的模式用“&”字符拼接成字符串 +// * @param params 需要排序并参与字符拼接的参数组 +// * @return 拼接后字符串 +// */ +// private static String createLinkString(Map params) { +// List keys = new ArrayList(params.keySet()); +// Collections.sort(keys); +// String prestr = ""; +// for (int i = 0; i < keys.size(); i++) { +// String key = keys.get(i); +// String value = params.get(key); +// if (i == keys.size() - 1) {// 拼接时,不包括最后一个&字符 +// prestr = prestr + key + "=" + value; +// } else { +// prestr = prestr + key + "=" + value + "&"; +// } +// } +// return prestr; +// } +// +// /** +// * 签名字符串 +// * @param text 需要签名的字符串 +// * @param key 密钥 +// * @param input_charset 编码格式 +// * @return 签名结果 +// */ +// private static String sign(String text, String key, String input_charset) { +// text = text + "&key=" + key; +// return DigestUtils.md5Hex(getContentBytes(text, input_charset)); +// } +// +// /** +// * @param content +// * @param charset +// * @return +// * @throws +// * @throws UnsupportedEncodingException +// */ +// private static byte[] getContentBytes(String content, String charset) { +// if (charset == null || "".equals(charset)) { +// return content.getBytes(); +// } +// try { +// return content.getBytes(charset); +// } catch (UnsupportedEncodingException e) { +// throw new RuntimeException("MD5签名过程中出现错误,指定的编码集不对,您目前指定的编码集是:" + charset); +// } +// } +// +// private static String createNonceStr(){ +// return UUID.randomUUID().toString().replace("-",""); +// } +// +// public static Map payToUsrWx( +// String partner_trade_no,String openid,int total_fee,String desc,String spbill_create_ip) +// throws Exception{ +// //1.构造请求字符串 +// Map reqMap = new HashMap(); +// reqMap.put("mch_appid",appid); +// reqMap.put("mchid",mchid); +// //reqMap.put("device_info",null); //不能添加空字段,Jackson会生成闭包xml 导致签名失败 +// reqMap.put("nonce_str",createNonceStr()); +// reqMap.put("partner_trade_no",partner_trade_no); +// reqMap.put("openid",openid); +// reqMap.put("check_name","NO_CHECK"); +// //reqMap.put("re_user_name",null); +// reqMap.put("amount",total_fee + ""); +// reqMap.put("desc",desc); +// reqMap.put("spbill_create_ip",spbill_create_ip); +// reqMap.put("sign",createSign(reqMap)); +// +// //2.发送付款请求 +// String reqrXml = JacksonUtil.mapToXml(reqMap,"xml"); +// String respXml = HttpsUtil.httpsRequest(URL_PAY_TO_USR_WX,"POST",reqrXml, +// WebConstant.PATH_WX_CRET,mchid); +// System.out.println("---------------PayToUsrWx Request Xml-----------------"); +// System.out.println(reqrXml); +// System.out.println("---------------PayToUsrWx Response Xml-----------------"); +// System.out.println(respXml); +// System.out.println("---------------PayToUsrWx end-----------------"); +// +// //3.判断成功失败 +// Map respMap = JacksonUtil.xmlToMap(new ByteArrayInputStream(respXml.getBytes())); +// String return_code,result_code; +// return_code = (String) respMap.get("return_code"); +// result_code = (String) respMap.get("result_code"); +// +// if(!StrUtil.isEmpty(return_code) && !StrUtil.isEmpty(result_code)){ +// if(return_code.equals("SUCCESS") && return_code.equals(result_code)){ +// return respMap; +// }else{ +// throw new PayException("[" + respMap.get("err_code") + "]" +// + respMap.get("err_code_des")); +// } +// }else { +// throw new PayException((String) respMap.get("return_msg")); +// } +// //return null; +// } +// +// public static Map payToUsrBank(){ +// //Fix Me +// return null; +// } +//} diff --git a/util/src/test/java/com/ccsens/util/RandomRest.java b/util/src/test/java/com/ccsens/util/RandomRest.java new file mode 100644 index 00000000..8f6590f0 --- /dev/null +++ b/util/src/test/java/com/ccsens/util/RandomRest.java @@ -0,0 +1,15 @@ +package com.ccsens.util; + +import org.apache.commons.lang3.RandomStringUtils; +import org.assertj.core.internal.bytebuddy.utility.RandomString; +import org.junit.Test; + +public class RandomRest { + @Test + public void test01() throws Exception { + + String a = RandomStringUtils.random(8, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); + System.out.println(a); + + } +}