205 changed files with 24520 additions and 491 deletions
@ -0,0 +1,28 @@ |
|||
//package com.ccsens.cloudutil.ribbon;
|
|||
//
|
|||
//import com.netflix.client.config.IClientConfig;
|
|||
//import com.netflix.loadbalancer.AbstractLoadBalancerRule;
|
|||
//import com.netflix.loadbalancer.ILoadBalancer;
|
|||
//import com.netflix.loadbalancer.Server;
|
|||
//import org.springframework.context.annotation.Primary;
|
|||
//
|
|||
////@Primary
|
|||
//public class WpsBalanceRule extends AbstractLoadBalancerRule {
|
|||
//
|
|||
// @Override
|
|||
// public void initWithNiwsConfig(IClientConfig clientConfig) {
|
|||
//
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// public Server choose(Object key) {
|
|||
// return choose(getLoadBalancer(), key);
|
|||
// }
|
|||
//
|
|||
// private Server choose(ILoadBalancer loadBalancer, Object key) {
|
|||
// System.out.println(key);
|
|||
// return null;
|
|||
// }
|
|||
//
|
|||
//
|
|||
//}
|
@ -0,0 +1,69 @@ |
|||
#服务端点暴露 |
|||
management: |
|||
endpoints: |
|||
web: |
|||
exposure: |
|||
# 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' |
|||
include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream |
|||
# # 不暴露哪些端点 |
|||
exclude: env,beans,configprops |
|||
endpoint: |
|||
health: |
|||
# 是否展示健康检查详情 |
|||
show-details: always |
|||
health: |
|||
redis: |
|||
enabled: false |
|||
#eureka注册 |
|||
eureka: |
|||
client: |
|||
service-url: |
|||
# 指定eureka server通信地址,注意/eureka/小尾巴不能少 |
|||
#defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ |
|||
|
|||
# defaultZone: http://admin:admin@81.70.54.64:7010/eureka/ |
|||
defaultZone: http://admin:admin@192.144.182.42:7010/eureka/ |
|||
|
|||
instance: |
|||
# 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server |
|||
prefer-ip-address: true |
|||
metadata-map: |
|||
management: |
|||
context-path: ${server.servlet.context-path:}/actuator |
|||
home-page-url-path: ${server.servlet.context-path:}/ |
|||
status-page-url-path: ${server.servlet.context-path:}/actuator/info |
|||
health-check-url-path: ${server.servlet.context-path:}/actuator/health |
|||
feign: |
|||
client: |
|||
config: |
|||
default: |
|||
connectTime: 5000 |
|||
readTimeout: 5000 |
|||
# NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 |
|||
# BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 |
|||
# HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 |
|||
# FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 |
|||
loggerLevel: basic |
|||
hystrix: |
|||
enabled: true |
|||
hystrix: |
|||
threadpool: |
|||
default: |
|||
coreSize: 200 #并发执行的最大线程数,默认10 |
|||
maxQueueSize: 1000 #BlockingQueue的最大队列数,默认值-1 |
|||
queueSizeRejectionThreshold: 800 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝,默认值5 |
|||
# sleuth |
|||
logging: |
|||
level: |
|||
root: info |
|||
org.springframework.cloud.sleuth: DEBUG |
|||
spring: |
|||
# zipkin: |
|||
# base-url: http://140.143.228.3:9411 |
|||
# sleuth: |
|||
# sampler: |
|||
# # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 |
|||
# probability: 0.1 |
|||
cloud: |
|||
inetutils: |
|||
ignored-interfaces: ['VMware.*'] |
@ -0,0 +1,44 @@ |
|||
server: |
|||
port: 7050 |
|||
servlet: |
|||
context-path: |
|||
spring: |
|||
snowflake: |
|||
datacenterId: 2 |
|||
workerId: 2 |
|||
application: |
|||
name: game |
|||
datasource: |
|||
type: com.alibaba.druid.pool.DruidDataSource |
|||
rabbitmq: |
|||
host: www.tall.wiki |
|||
password: 111111 |
|||
port: 5672 |
|||
username: admin |
|||
redis: |
|||
database: 0 |
|||
host: www.tall.wiki |
|||
jedis: |
|||
pool: |
|||
max-active: 200 |
|||
max-idle: 10 |
|||
max-wait: -1ms |
|||
min-idle: 0 |
|||
password: 'areowqr!@43ef' |
|||
port: 6379 |
|||
timeout: 1000ms |
|||
swagger: |
|||
enable: true |
|||
eureka: |
|||
instance: |
|||
ip-address: 81.70.54.64 |
|||
|
|||
gatewayUrl: https://www.tall.wiki/gateway/ |
|||
notGatewayUrl: https://www.tall.wiki/ |
|||
gameMqName: game_status_sd |
|||
saveWpsFile: tall/v1.0/wps/saveWps |
|||
queryVisitUrls: tall/v1.0/wps/visitUrls |
|||
getWpsFilePath: tall/v1.0/v1/3rd/getFilePath |
|||
file: |
|||
qrCode: https://www.tall.wiki/gateway/tall/v1.0/uploads/ |
|||
openWX: 1 |
@ -0,0 +1,33 @@ |
|||
spring: |
|||
datasource: |
|||
druid: |
|||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|||
driverClassName: com.mysql.cj.jdbc.Driver |
|||
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
|||
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
|||
filterName: druidFilter |
|||
filterProfileEnable: true |
|||
filterUrlPattern: /* |
|||
filters: stat,wall |
|||
initialSize: 5 |
|||
maxActive: 20 |
|||
maxPoolPreparedStatementPerConnectionSize: 20 |
|||
maxWait: 60000 |
|||
minEvictableIdleTimeMillis: 300000 |
|||
minIdle: 5 |
|||
password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 |
|||
poolPreparedStatements: true |
|||
servletLogSlowSql: true |
|||
servletLoginPassword: 111111 |
|||
servletLoginUsername: druid |
|||
servletName: druidServlet |
|||
servletResetEnable: true |
|||
servletUrlMapping: /druid/* |
|||
testOnBorrow: false |
|||
testOnReturn: false |
|||
testWhileIdle: true |
|||
timeBetweenEvictionRunsMillis: 60000 |
|||
url: jdbc:mysql://www.tall.wiki/game?useUnicode=true&characterEncoding=UTF-8 |
|||
username: root |
|||
validationQuery: SELECT 1 FROM DUAL |
|||
env: CCSENS_GAME |
@ -1,4 +1,4 @@ |
|||
spring: |
|||
profiles: |
|||
active: test |
|||
include: common, util-test |
|||
active: prod |
|||
include: common, util-prod |
|||
|
@ -0,0 +1,128 @@ |
|||
package com.ccsens.mt.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class CompeteSpeedVideo implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long companyId; |
|||
|
|||
private String companyName; |
|||
|
|||
private String playerName; |
|||
|
|||
private Long userId; |
|||
|
|||
private String videoUrlOne; |
|||
|
|||
private String videoUrlTwo; |
|||
|
|||
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 getCompanyId() { |
|||
return companyId; |
|||
} |
|||
|
|||
public void setCompanyId(Long companyId) { |
|||
this.companyId = companyId; |
|||
} |
|||
|
|||
public String getCompanyName() { |
|||
return companyName; |
|||
} |
|||
|
|||
public void setCompanyName(String companyName) { |
|||
this.companyName = companyName == null ? null : companyName.trim(); |
|||
} |
|||
|
|||
public String getPlayerName() { |
|||
return playerName; |
|||
} |
|||
|
|||
public void setPlayerName(String playerName) { |
|||
this.playerName = playerName == null ? null : playerName.trim(); |
|||
} |
|||
|
|||
public Long getUserId() { |
|||
return userId; |
|||
} |
|||
|
|||
public void setUserId(Long userId) { |
|||
this.userId = userId; |
|||
} |
|||
|
|||
public String getVideoUrlOne() { |
|||
return videoUrlOne; |
|||
} |
|||
|
|||
public void setVideoUrlOne(String videoUrlOne) { |
|||
this.videoUrlOne = videoUrlOne == null ? null : videoUrlOne.trim(); |
|||
} |
|||
|
|||
public String getVideoUrlTwo() { |
|||
return videoUrlTwo; |
|||
} |
|||
|
|||
public void setVideoUrlTwo(String videoUrlTwo) { |
|||
this.videoUrlTwo = videoUrlTwo == null ? null : videoUrlTwo.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(", companyId=").append(companyId); |
|||
sb.append(", companyName=").append(companyName); |
|||
sb.append(", playerName=").append(playerName); |
|||
sb.append(", userId=").append(userId); |
|||
sb.append(", videoUrlOne=").append(videoUrlOne); |
|||
sb.append(", videoUrlTwo=").append(videoUrlTwo); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,841 @@ |
|||
package com.ccsens.mt.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class CompeteSpeedVideoExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public CompeteSpeedVideoExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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 andCompanyIdIsNull() { |
|||
addCriterion("company_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdIsNotNull() { |
|||
addCriterion("company_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdEqualTo(Long value) { |
|||
addCriterion("company_id =", value, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdNotEqualTo(Long value) { |
|||
addCriterion("company_id <>", value, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdGreaterThan(Long value) { |
|||
addCriterion("company_id >", value, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("company_id >=", value, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdLessThan(Long value) { |
|||
addCriterion("company_id <", value, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("company_id <=", value, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdIn(List<Long> values) { |
|||
addCriterion("company_id in", values, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdNotIn(List<Long> values) { |
|||
addCriterion("company_id not in", values, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdBetween(Long value1, Long value2) { |
|||
addCriterion("company_id between", value1, value2, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("company_id not between", value1, value2, "companyId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameIsNull() { |
|||
addCriterion("company_name is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameIsNotNull() { |
|||
addCriterion("company_name is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameEqualTo(String value) { |
|||
addCriterion("company_name =", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameNotEqualTo(String value) { |
|||
addCriterion("company_name <>", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameGreaterThan(String value) { |
|||
addCriterion("company_name >", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { |
|||
addCriterion("company_name >=", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameLessThan(String value) { |
|||
addCriterion("company_name <", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameLessThanOrEqualTo(String value) { |
|||
addCriterion("company_name <=", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameLike(String value) { |
|||
addCriterion("company_name like", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameNotLike(String value) { |
|||
addCriterion("company_name not like", value, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameIn(List<String> values) { |
|||
addCriterion("company_name in", values, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameNotIn(List<String> values) { |
|||
addCriterion("company_name not in", values, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameBetween(String value1, String value2) { |
|||
addCriterion("company_name between", value1, value2, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNameNotBetween(String value1, String value2) { |
|||
addCriterion("company_name not between", value1, value2, "companyName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameIsNull() { |
|||
addCriterion("player_name is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameIsNotNull() { |
|||
addCriterion("player_name is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameEqualTo(String value) { |
|||
addCriterion("player_name =", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameNotEqualTo(String value) { |
|||
addCriterion("player_name <>", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameGreaterThan(String value) { |
|||
addCriterion("player_name >", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameGreaterThanOrEqualTo(String value) { |
|||
addCriterion("player_name >=", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameLessThan(String value) { |
|||
addCriterion("player_name <", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameLessThanOrEqualTo(String value) { |
|||
addCriterion("player_name <=", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameLike(String value) { |
|||
addCriterion("player_name like", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameNotLike(String value) { |
|||
addCriterion("player_name not like", value, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameIn(List<String> values) { |
|||
addCriterion("player_name in", values, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameNotIn(List<String> values) { |
|||
addCriterion("player_name not in", values, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameBetween(String value1, String value2) { |
|||
addCriterion("player_name between", value1, value2, "playerName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPlayerNameNotBetween(String value1, String value2) { |
|||
addCriterion("player_name not between", value1, value2, "playerName"); |
|||
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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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 andVideoUrlOneIsNull() { |
|||
addCriterion("video_url_one is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneIsNotNull() { |
|||
addCriterion("video_url_one is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneEqualTo(String value) { |
|||
addCriterion("video_url_one =", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneNotEqualTo(String value) { |
|||
addCriterion("video_url_one <>", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneGreaterThan(String value) { |
|||
addCriterion("video_url_one >", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneGreaterThanOrEqualTo(String value) { |
|||
addCriterion("video_url_one >=", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneLessThan(String value) { |
|||
addCriterion("video_url_one <", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneLessThanOrEqualTo(String value) { |
|||
addCriterion("video_url_one <=", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneLike(String value) { |
|||
addCriterion("video_url_one like", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneNotLike(String value) { |
|||
addCriterion("video_url_one not like", value, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneIn(List<String> values) { |
|||
addCriterion("video_url_one in", values, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneNotIn(List<String> values) { |
|||
addCriterion("video_url_one not in", values, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneBetween(String value1, String value2) { |
|||
addCriterion("video_url_one between", value1, value2, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlOneNotBetween(String value1, String value2) { |
|||
addCriterion("video_url_one not between", value1, value2, "videoUrlOne"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoIsNull() { |
|||
addCriterion("video_url_two is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoIsNotNull() { |
|||
addCriterion("video_url_two is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoEqualTo(String value) { |
|||
addCriterion("video_url_two =", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoNotEqualTo(String value) { |
|||
addCriterion("video_url_two <>", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoGreaterThan(String value) { |
|||
addCriterion("video_url_two >", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoGreaterThanOrEqualTo(String value) { |
|||
addCriterion("video_url_two >=", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoLessThan(String value) { |
|||
addCriterion("video_url_two <", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoLessThanOrEqualTo(String value) { |
|||
addCriterion("video_url_two <=", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoLike(String value) { |
|||
addCriterion("video_url_two like", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoNotLike(String value) { |
|||
addCriterion("video_url_two not like", value, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoIn(List<String> values) { |
|||
addCriterion("video_url_two in", values, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoNotIn(List<String> values) { |
|||
addCriterion("video_url_two not in", values, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoBetween(String value1, String value2) { |
|||
addCriterion("video_url_two between", value1, value2, "videoUrlTwo"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andVideoUrlTwoNotBetween(String value1, String value2) { |
|||
addCriterion("video_url_two not between", value1, value2, "videoUrlTwo"); |
|||
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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.mt.persist.mapper; |
|||
|
|||
import com.ccsens.mt.bean.po.CompeteSpeedVideo; |
|||
import com.ccsens.mt.bean.po.CompeteSpeedVideoExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface CompeteSpeedVideoMapper { |
|||
long countByExample(CompeteSpeedVideoExample example); |
|||
|
|||
int deleteByExample(CompeteSpeedVideoExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(CompeteSpeedVideo record); |
|||
|
|||
int insertSelective(CompeteSpeedVideo record); |
|||
|
|||
List<CompeteSpeedVideo> selectByExample(CompeteSpeedVideoExample example); |
|||
|
|||
CompeteSpeedVideo selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") CompeteSpeedVideo record, @Param("example") CompeteSpeedVideoExample example); |
|||
|
|||
int updateByExample(@Param("record") CompeteSpeedVideo record, @Param("example") CompeteSpeedVideoExample example); |
|||
|
|||
int updateByPrimaryKeySelective(CompeteSpeedVideo record); |
|||
|
|||
int updateByPrimaryKey(CompeteSpeedVideo record); |
|||
} |
@ -1,6 +1,6 @@ |
|||
spring: |
|||
profiles: |
|||
active: dev |
|||
include: common, util-dev |
|||
active: prod |
|||
include: common, util-prod |
|||
|
|||
|
|||
|
File diff suppressed because it is too large
@ -0,0 +1,291 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.mapper.CompeteSpeedVideoMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteSpeedVideo"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="company_id" jdbcType="BIGINT" property="companyId" /> |
|||
<result column="company_name" jdbcType="VARCHAR" property="companyName" /> |
|||
<result column="player_name" jdbcType="VARCHAR" property="playerName" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="video_url_one" jdbcType="VARCHAR" property="videoUrlOne" /> |
|||
<result column="video_url_two" jdbcType="VARCHAR" property="videoUrlTwo" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, company_id, company_name, player_name, user_id, video_url_one, video_url_two, |
|||
created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteSpeedVideoExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_compete_speed_video |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_compete_speed_video |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_compete_speed_video |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.CompeteSpeedVideoExample"> |
|||
delete from t_compete_speed_video |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteSpeedVideo"> |
|||
insert into t_compete_speed_video (id, company_id, company_name, |
|||
player_name, user_id, video_url_one, |
|||
video_url_two, created_at, updated_at, |
|||
rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, |
|||
#{playerName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{videoUrlOne,jdbcType=VARCHAR}, |
|||
#{videoUrlTwo,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.CompeteSpeedVideo"> |
|||
insert into t_compete_speed_video |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="companyId != null"> |
|||
company_id, |
|||
</if> |
|||
<if test="companyName != null"> |
|||
company_name, |
|||
</if> |
|||
<if test="playerName != null"> |
|||
player_name, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="videoUrlOne != null"> |
|||
video_url_one, |
|||
</if> |
|||
<if test="videoUrlTwo != null"> |
|||
video_url_two, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="companyId != null"> |
|||
#{companyId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="companyName != null"> |
|||
#{companyName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="playerName != null"> |
|||
#{playerName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="videoUrlOne != null"> |
|||
#{videoUrlOne,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="videoUrlTwo != null"> |
|||
#{videoUrlTwo,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.CompeteSpeedVideoExample" resultType="java.lang.Long"> |
|||
select count(*) from t_compete_speed_video |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_compete_speed_video |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.companyId != null"> |
|||
company_id = #{record.companyId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.companyName != null"> |
|||
company_name = #{record.companyName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.playerName != null"> |
|||
player_name = #{record.playerName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.videoUrlOne != null"> |
|||
video_url_one = #{record.videoUrlOne,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.videoUrlTwo != null"> |
|||
video_url_two = #{record.videoUrlTwo,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_compete_speed_video |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
company_id = #{record.companyId,jdbcType=BIGINT}, |
|||
company_name = #{record.companyName,jdbcType=VARCHAR}, |
|||
player_name = #{record.playerName,jdbcType=VARCHAR}, |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
video_url_one = #{record.videoUrlOne,jdbcType=VARCHAR}, |
|||
video_url_two = #{record.videoUrlTwo,jdbcType=VARCHAR}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.CompeteSpeedVideo"> |
|||
update t_compete_speed_video |
|||
<set> |
|||
<if test="companyId != null"> |
|||
company_id = #{companyId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="companyName != null"> |
|||
company_name = #{companyName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="playerName != null"> |
|||
player_name = #{playerName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="videoUrlOne != null"> |
|||
video_url_one = #{videoUrlOne,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="videoUrlTwo != null"> |
|||
video_url_two = #{videoUrlTwo,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteSpeedVideo"> |
|||
update t_compete_speed_video |
|||
set company_id = #{companyId,jdbcType=BIGINT}, |
|||
company_name = #{companyName,jdbcType=VARCHAR}, |
|||
player_name = #{playerName,jdbcType=VARCHAR}, |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
video_url_one = #{videoUrlOne,jdbcType=VARCHAR}, |
|||
video_url_two = #{videoUrlTwo,jdbcType=VARCHAR}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,33 @@ |
|||
HELP.md |
|||
target/ |
|||
!.mvn/wrapper/maven-wrapper.jar |
|||
!**/src/main/**/target/ |
|||
!**/src/test/**/target/ |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
|||
build/ |
|||
!**/src/main/**/build/ |
|||
!**/src/test/**/build/ |
|||
|
|||
### VS Code ### |
|||
.vscode/ |
@ -0,0 +1,322 @@ |
|||
#!/bin/sh |
|||
# ---------------------------------------------------------------------------- |
|||
# Licensed to the Apache Software Foundation (ASF) under one |
|||
# or more contributor license agreements. See the NOTICE file |
|||
# distributed with this work for additional information |
|||
# regarding copyright ownership. The ASF licenses this file |
|||
# to you under the Apache License, Version 2.0 (the |
|||
# "License"); you may not use this file except in compliance |
|||
# with the License. You may obtain a copy of the License at |
|||
# |
|||
# https://www.apache.org/licenses/LICENSE-2.0 |
|||
# |
|||
# Unless required by applicable law or agreed to in writing, |
|||
# software distributed under the License is distributed on an |
|||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
# KIND, either express or implied. See the License for the |
|||
# specific language governing permissions and limitations |
|||
# under the License. |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
# ---------------------------------------------------------------------------- |
|||
# Maven Start Up Batch script |
|||
# |
|||
# Required ENV vars: |
|||
# ------------------ |
|||
# JAVA_HOME - location of a JDK home dir |
|||
# |
|||
# Optional ENV vars |
|||
# ----------------- |
|||
# M2_HOME - location of maven2's installed home dir |
|||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|||
# e.g. to debug Maven itself, use |
|||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
if [ -z "$MAVEN_SKIP_RC" ]; then |
|||
|
|||
if [ -f /etc/mavenrc ]; then |
|||
. /etc/mavenrc |
|||
fi |
|||
|
|||
if [ -f "$HOME/.mavenrc" ]; then |
|||
. "$HOME/.mavenrc" |
|||
fi |
|||
|
|||
fi |
|||
|
|||
# OS specific support. $var _must_ be set to either true or false. |
|||
cygwin=false |
|||
darwin=false |
|||
mingw=false |
|||
case "$(uname)" in |
|||
CYGWIN*) cygwin=true ;; |
|||
MINGW*) mingw=true ;; |
|||
Darwin*) |
|||
darwin=true |
|||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home |
|||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html |
|||
if [ -z "$JAVA_HOME" ]; then |
|||
if [ -x "/usr/libexec/java_home" ]; then |
|||
export JAVA_HOME="$(/usr/libexec/java_home)" |
|||
else |
|||
export JAVA_HOME="/Library/Java/Home" |
|||
fi |
|||
fi |
|||
;; |
|||
esac |
|||
|
|||
if [ -z "$JAVA_HOME" ]; then |
|||
if [ -r /etc/gentoo-release ]; then |
|||
JAVA_HOME=$(java-config --jre-home) |
|||
fi |
|||
fi |
|||
|
|||
if [ -z "$M2_HOME" ]; then |
|||
## resolve links - $0 may be a link to maven's home |
|||
PRG="$0" |
|||
|
|||
# need this for relative symlinks |
|||
while [ -h "$PRG" ]; do |
|||
ls=$(ls -ld "$PRG") |
|||
link=$(expr "$ls" : '.*-> \(.*\)$') |
|||
if expr "$link" : '/.*' >/dev/null; then |
|||
PRG="$link" |
|||
else |
|||
PRG="$(dirname "$PRG")/$link" |
|||
fi |
|||
done |
|||
|
|||
saveddir=$(pwd) |
|||
|
|||
M2_HOME=$(dirname "$PRG")/.. |
|||
|
|||
# make it fully qualified |
|||
M2_HOME=$(cd "$M2_HOME" && pwd) |
|||
|
|||
cd "$saveddir" |
|||
# echo Using m2 at $M2_HOME |
|||
fi |
|||
|
|||
# For Cygwin, ensure paths are in UNIX format before anything is touched |
|||
if $cygwin; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME=$(cygpath --unix "$M2_HOME") |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME=$(cygpath --unix "$JAVA_HOME") |
|||
[ -n "$CLASSPATH" ] && |
|||
CLASSPATH=$(cygpath --path --unix "$CLASSPATH") |
|||
fi |
|||
|
|||
# For Mingw, ensure paths are in UNIX format before anything is touched |
|||
if $mingw; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME="$( ( |
|||
cd "$M2_HOME" |
|||
pwd |
|||
))" |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME="$( ( |
|||
cd "$JAVA_HOME" |
|||
pwd |
|||
))" |
|||
fi |
|||
|
|||
if [ -z "$JAVA_HOME" ]; then |
|||
javaExecutable="$(which javac)" |
|||
if [ -n "$javaExecutable" ] && ! [ "$(expr \"$javaExecutable\" : '\([^ ]*\)')" = "no" ]; then |
|||
# readlink(1) is not available as standard on Solaris 10. |
|||
readLink=$(which readlink) |
|||
if [ ! $(expr "$readLink" : '\([^ ]*\)') = "no" ]; then |
|||
if $darwin; then |
|||
javaHome="$(dirname \"$javaExecutable\")" |
|||
javaExecutable="$(cd \"$javaHome\" && pwd -P)/javac" |
|||
else |
|||
javaExecutable="$(readlink -f \"$javaExecutable\")" |
|||
fi |
|||
javaHome="$(dirname \"$javaExecutable\")" |
|||
javaHome=$(expr "$javaHome" : '\(.*\)/bin') |
|||
JAVA_HOME="$javaHome" |
|||
export JAVA_HOME |
|||
fi |
|||
fi |
|||
fi |
|||
|
|||
if [ -z "$JAVACMD" ]; then |
|||
if [ -n "$JAVA_HOME" ]; then |
|||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
|||
# IBM's JDK on AIX uses strange locations for the executables |
|||
JAVACMD="$JAVA_HOME/jre/sh/java" |
|||
else |
|||
JAVACMD="$JAVA_HOME/bin/java" |
|||
fi |
|||
else |
|||
JAVACMD="$(which java)" |
|||
fi |
|||
fi |
|||
|
|||
if [ ! -x "$JAVACMD" ]; then |
|||
echo "Error: JAVA_HOME is not defined correctly." >&2 |
|||
echo " We cannot execute $JAVACMD" >&2 |
|||
exit 1 |
|||
fi |
|||
|
|||
if [ -z "$JAVA_HOME" ]; then |
|||
echo "Warning: JAVA_HOME environment variable is not set." |
|||
fi |
|||
|
|||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
|||
|
|||
# traverses directory structure from process work directory to filesystem root |
|||
# first directory with .mvn subdirectory is considered project base directory |
|||
find_maven_basedir() { |
|||
|
|||
if [ -z "$1" ]; then |
|||
echo "Path not specified to find_maven_basedir" |
|||
return 1 |
|||
fi |
|||
|
|||
basedir="$1" |
|||
wdir="$1" |
|||
while [ "$wdir" != '/' ]; do |
|||
if [ -d "$wdir"/.mvn ]; then |
|||
basedir=$wdir |
|||
break |
|||
fi |
|||
# workaround for JBEAP-8937 (on Solaris 10/Sparc) |
|||
if [ -d "${wdir}" ]; then |
|||
wdir=$( |
|||
cd "$wdir/.." |
|||
pwd |
|||
) |
|||
fi |
|||
# end of workaround |
|||
done |
|||
echo "${basedir}" |
|||
} |
|||
|
|||
# concatenates all lines of a file |
|||
concat_lines() { |
|||
if [ -f "$1" ]; then |
|||
echo "$(tr -s '\n' ' ' <"$1")" |
|||
fi |
|||
} |
|||
|
|||
BASE_DIR=$(find_maven_basedir "$(pwd)") |
|||
if [ -z "$BASE_DIR" ]; then |
|||
exit 1 |
|||
fi |
|||
|
|||
########################################################################################## |
|||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
# This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
########################################################################################## |
|||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found .mvn/wrapper/maven-wrapper.jar" |
|||
fi |
|||
else |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." |
|||
fi |
|||
if [ -n "$MVNW_REPOURL" ]; then |
|||
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
else |
|||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
fi |
|||
while IFS="=" read key value; do |
|||
case "$key" in wrapperUrl) |
|||
jarUrl="$value" |
|||
break |
|||
;; |
|||
esac |
|||
done <"$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Downloading from: $jarUrl" |
|||
fi |
|||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" |
|||
if $cygwin; then |
|||
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") |
|||
fi |
|||
|
|||
if command -v wget >/dev/null; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found wget ... using wget" |
|||
fi |
|||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|||
wget "$jarUrl" -O "$wrapperJarPath" |
|||
else |
|||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" |
|||
fi |
|||
elif command -v curl >/dev/null; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found curl ... using curl" |
|||
fi |
|||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|||
curl -o "$wrapperJarPath" "$jarUrl" -f |
|||
else |
|||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f |
|||
fi |
|||
|
|||
else |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Falling back to using Java to download" |
|||
fi |
|||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" |
|||
# For Cygwin, switch paths to Windows format before running javac |
|||
if $cygwin; then |
|||
javaClass=$(cygpath --path --windows "$javaClass") |
|||
fi |
|||
if [ -e "$javaClass" ]; then |
|||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo " - Compiling MavenWrapperDownloader.java ..." |
|||
fi |
|||
# Compiling the Java class |
|||
("$JAVA_HOME/bin/javac" "$javaClass") |
|||
fi |
|||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|||
# Running the downloader |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo " - Running MavenWrapperDownloader.java ..." |
|||
fi |
|||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") |
|||
fi |
|||
fi |
|||
fi |
|||
fi |
|||
########################################################################################## |
|||
# End of extension |
|||
########################################################################################## |
|||
|
|||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo $MAVEN_PROJECTBASEDIR |
|||
fi |
|||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" |
|||
|
|||
# For Cygwin, switch paths to Windows format before running java |
|||
if $cygwin; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME=$(cygpath --path --windows "$M2_HOME") |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") |
|||
[ -n "$CLASSPATH" ] && |
|||
CLASSPATH=$(cygpath --path --windows "$CLASSPATH") |
|||
[ -n "$MAVEN_PROJECTBASEDIR" ] && |
|||
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") |
|||
fi |
|||
|
|||
# Provide a "standardized" way to retrieve the CLI args that will |
|||
# work with both Windows and non-Windows executions. |
|||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" |
|||
export MAVEN_CMD_LINE_ARGS |
|||
|
|||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|||
|
|||
exec "$JAVACMD" \ |
|||
$MAVEN_OPTS \ |
|||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ |
|||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
|||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
@ -0,0 +1,182 @@ |
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Licensed to the Apache Software Foundation (ASF) under one |
|||
@REM or more contributor license agreements. See the NOTICE file |
|||
@REM distributed with this work for additional information |
|||
@REM regarding copyright ownership. The ASF licenses this file |
|||
@REM to you under the Apache License, Version 2.0 (the |
|||
@REM "License"); you may not use this file except in compliance |
|||
@REM with the License. You may obtain a copy of the License at |
|||
@REM |
|||
@REM https://www.apache.org/licenses/LICENSE-2.0 |
|||
@REM |
|||
@REM Unless required by applicable law or agreed to in writing, |
|||
@REM software distributed under the License is distributed on an |
|||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
@REM KIND, either express or implied. See the License for the |
|||
@REM specific language governing permissions and limitations |
|||
@REM under the License. |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Maven Start Up Batch script |
|||
@REM |
|||
@REM Required ENV vars: |
|||
@REM JAVA_HOME - location of a JDK home dir |
|||
@REM |
|||
@REM Optional ENV vars |
|||
@REM M2_HOME - location of maven2's installed home dir |
|||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands |
|||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending |
|||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|||
@REM e.g. to debug Maven itself, use |
|||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' |
|||
@echo off |
|||
@REM set title of command window |
|||
title %0 |
|||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' |
|||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% |
|||
|
|||
@REM set %HOME% to equivalent of $HOME |
|||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") |
|||
|
|||
@REM Execute a user defined script before this one |
|||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre |
|||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending |
|||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" |
|||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" |
|||
:skipRcPre |
|||
|
|||
@setlocal |
|||
|
|||
set ERROR_CODE=0 |
|||
|
|||
@REM To isolate internal variables from possible post scripts, we use another setlocal |
|||
@setlocal |
|||
|
|||
@REM ==== START VALIDATION ==== |
|||
if not "%JAVA_HOME%" == "" goto OkJHome |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME not found in your environment. >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
:OkJHome |
|||
if exist "%JAVA_HOME%\bin\java.exe" goto init |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME is set to an invalid directory. >&2 |
|||
echo JAVA_HOME = "%JAVA_HOME%" >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
@REM ==== END VALIDATION ==== |
|||
|
|||
:init |
|||
|
|||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". |
|||
@REM Fallback to current working directory if not found. |
|||
|
|||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% |
|||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
|||
|
|||
set EXEC_DIR=%CD% |
|||
set WDIR=%EXEC_DIR% |
|||
:findBaseDir |
|||
IF EXIST "%WDIR%"\.mvn goto baseDirFound |
|||
cd .. |
|||
IF "%WDIR%"=="%CD%" goto baseDirNotFound |
|||
set WDIR=%CD% |
|||
goto findBaseDir |
|||
|
|||
:baseDirFound |
|||
set MAVEN_PROJECTBASEDIR=%WDIR% |
|||
cd "%EXEC_DIR%" |
|||
goto endDetectBaseDir |
|||
|
|||
:baseDirNotFound |
|||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR% |
|||
cd "%EXEC_DIR%" |
|||
|
|||
:endDetectBaseDir |
|||
|
|||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig |
|||
|
|||
@setlocal EnableExtensions EnableDelayedExpansion |
|||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
|||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
|||
|
|||
:endReadAdditionalConfig |
|||
|
|||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" |
|||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" |
|||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|||
|
|||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
|
|||
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
|||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B |
|||
) |
|||
|
|||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
if exist %WRAPPER_JAR% ( |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Found %WRAPPER_JAR% |
|||
) |
|||
) else ( |
|||
if not "%MVNW_REPOURL%" == "" ( |
|||
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
) |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Couldn't find %WRAPPER_JAR%, downloading it ... |
|||
echo Downloading from: %DOWNLOAD_URL% |
|||
) |
|||
|
|||
powershell -Command "&{"^ |
|||
"$webclient = new-object System.Net.WebClient;"^ |
|||
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ |
|||
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ |
|||
"}"^ |
|||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ |
|||
"}" |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Finished downloading %WRAPPER_JAR% |
|||
) |
|||
) |
|||
@REM End of extension |
|||
|
|||
@REM Provide a "standardized" way to retrieve the CLI args that will |
|||
@REM work with both Windows and non-Windows executions. |
|||
set MAVEN_CMD_LINE_ARGS=%* |
|||
|
|||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* |
|||
if ERRORLEVEL 1 goto error |
|||
goto end |
|||
|
|||
:error |
|||
set ERROR_CODE=1 |
|||
|
|||
:end |
|||
@endlocal & set ERROR_CODE=%ERROR_CODE% |
|||
|
|||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost |
|||
@REM check for post script, once with legacy .bat ending and once with .cmd ending |
|||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" |
|||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" |
|||
:skipRcPost |
|||
|
|||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
|||
if "%MAVEN_BATCH_PAUSE%" == "on" pause |
|||
|
|||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% |
|||
|
|||
exit /B %ERROR_CODE% |
@ -0,0 +1,69 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>ccsenscloud</artifactId> |
|||
<groupId>com.ccsens</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>signin</artifactId> |
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
</properties> |
|||
|
|||
<dependencies> |
|||
<!--cloud 工具类--> |
|||
<dependency> |
|||
<artifactId>cloudutil</artifactId> |
|||
<groupId>com.ccsens</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
<!--util 工具类--> |
|||
<dependency> |
|||
<artifactId>util</artifactId> |
|||
<groupId>com.ccsens</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
|
|||
</dependencies> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.mybatis.generator</groupId> |
|||
<artifactId>mybatis-generator-maven-plugin</artifactId> |
|||
<version>1.3.7</version> |
|||
<configuration> |
|||
<configurationFile>${basedir}/src/main/resources/mbg.xml</configurationFile> |
|||
<overwrite>true</overwrite> |
|||
</configuration> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<version>5.1.34</version> |
|||
</dependency> |
|||
</dependencies> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<configuration> |
|||
<mainClass>com.ccsens.signin.SigninApplication</mainClass> |
|||
<!--<skip>true</skip>--> |
|||
</configuration> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
|
|||
</plugins> |
|||
</build> |
|||
|
|||
</project> |
@ -0,0 +1,24 @@ |
|||
package com.ccsens.signin; |
|||
|
|||
import org.mybatis.spring.annotation.MapperScan; |
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.boot.web.servlet.ServletComponentScan; |
|||
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; |
|||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|||
import org.springframework.scheduling.annotation.EnableAsync; |
|||
|
|||
@MapperScan(basePackages = {"com.ccsens.signin.persist.*"}) |
|||
@ServletComponentScan |
|||
@EnableAsync |
|||
//开启断路器功能
|
|||
@EnableCircuitBreaker |
|||
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign") |
|||
@SpringBootApplication(scanBasePackages = "com.ccsens") |
|||
public class SigninApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(SigninApplication.class, args); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.ccsens.wisdomcar.api; |
|||
|
|||
import com.ccsens.util.JsonResponse; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
@Api(tags = "DEBUG" , description = "DebugController | ") |
|||
@RestController |
|||
@RequestMapping("/debug") |
|||
@Slf4j |
|||
public class DebugController { |
|||
|
|||
@ApiOperation(value = "/测试",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse debug(HttpServletRequest request) throws Exception { |
|||
|
|||
return JsonResponse.newInstance().ok("测试"); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,478 @@ |
|||
package com.ccsens.signin.api; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import cn.hutool.extra.servlet.ServletUtil; |
|||
import com.ccsens.signin.bean.dto.UserDto; |
|||
import com.ccsens.signin.bean.vo.UserVo; |
|||
import com.ccsens.signin.exception.UserLoginException; |
|||
import com.ccsens.signin.service.IUserService; |
|||
import com.ccsens.util.CodeEnum; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.JwtUtil; |
|||
import com.ccsens.util.WebConstant; |
|||
import io.jsonwebtoken.Claims; |
|||
import io.jsonwebtoken.ExpiredJwtException; |
|||
import io.jsonwebtoken.SignatureException; |
|||
import io.swagger.annotations.*; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.Map; |
|||
|
|||
@Slf4j |
|||
@Api(tags = "用户相关操作API", description = "UserController | 用户操作控制器类") |
|||
@RestController |
|||
@RequestMapping("/users") |
|||
public class UserController { |
|||
@Autowired |
|||
private IUserService userService; |
|||
|
|||
// @Autowired
|
|||
// private IProMemberService proMemberService;
|
|||
|
|||
|
|||
@ApiOperation(value = "/用户登录", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/signin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenBean> userSignin(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody(required = true) UserDto.UserSginin dto) throws Exception { |
|||
log.info("开始登陆:{}",dto); |
|||
Long start = System.currentTimeMillis(); |
|||
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 (clientType) { |
|||
|
|||
case Wxmp: |
|||
case H5: |
|||
case Android: |
|||
case IOS: |
|||
case WxEnterprise: |
|||
break; |
|||
default: |
|||
throw new UserLoginException(-1, String.format("Not supported client type: %1$d(%2$s)", |
|||
clientType.value, clientType)); |
|||
} |
|||
log.info("登录场景"); |
|||
switch (identify_type) { |
|||
case WxEnterprise: |
|||
case Wxmp: |
|||
case OAUTH2_Wx: |
|||
case Wx_H5: |
|||
case OAUTH2_WeiBo: { |
|||
break; |
|||
} |
|||
case Phone: |
|||
case Email: |
|||
case Account: { |
|||
if (StrUtil.isEmpty(credential)) { |
|||
String msg = "credential is required when type is %1$d(%2$s)"; |
|||
throw new UserLoginException(-2, String.format(msg, identify_type.value, identify_type.phase)); |
|||
} |
|||
break; |
|||
} |
|||
default: { |
|||
throw new UserLoginException(-2, String.format("Not supported signin type: %1$d(%2$s)", |
|||
identify_type.value, identify_type.phase)); |
|||
} |
|||
} |
|||
log.info("登录方式"); |
|||
//2.调用业务方法(注册/添加登陆记录)
|
|||
UserVo.UserSign userSignVo = userService.signin( |
|||
clientType, identify_type, identifier, credential, |
|||
ServletUtil.getClientIP(request), dto.getRedirect()); |
|||
|
|||
//3.生成token(access_token,refresh_token)
|
|||
if (ObjectUtil.isNotNull(userSignVo)) { |
|||
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
|||
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
|||
UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(clientType, identify_type,userSignVo, theMap); |
|||
|
|||
Long end = System.currentTimeMillis(); |
|||
log.info("本次登录使用了{}毫秒",end - start); |
|||
log.info("登录返回:{}",tokenBean); |
|||
return JsonResponse.newInstance().ok(tokenBean); |
|||
} else { |
|||
return JsonResponse.newInstance().fail("登陆信息不正确."); |
|||
} |
|||
} |
|||
|
|||
@ApiOperation(value = "/发送验证码", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/smscode", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.SmsCode> getSmsCode(HttpServletRequest request, |
|||
@ApiParam @RequestParam String phone, |
|||
// @ApiParam Integer client,
|
|||
@RequestParam(required = true) String verificationCodeId, String verificationCodeValue) throws Exception { |
|||
log.info("发送验证码,手机号:{},图形验证码id:{},值:{}",phone,verificationCodeId,verificationCodeValue); |
|||
UserVo.SmsCode smsCodeVo = userService.getSignInSmsCode(phone,verificationCodeId,verificationCodeValue); |
|||
|
|||
return JsonResponse.newInstance().ok(smsCodeVo); |
|||
} |
|||
|
|||
@ApiOperation(value = "/注册", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/signup", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenBean> registerUser(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody(required = true) UserDto.UserSignup userSignup) throws Exception { |
|||
|
|||
UserVo.UserSign userSignVo = userService.registerUser(userSignup); |
|||
//3.生成token(access_token,refresh_token)
|
|||
if (ObjectUtil.isNotNull(userSignVo)) { |
|||
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
|||
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
|||
|
|||
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
|||
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
|||
UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(clientType, identifyType,userSignVo, theMap); |
|||
|
|||
return JsonResponse.newInstance().ok(tokenBean); |
|||
} else { |
|||
return JsonResponse.newInstance().fail("登陆信息不正确."); |
|||
} |
|||
} |
|||
|
|||
@ApiOperation(value = "/注册(不需要手机号)", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/signup/system", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenBean> systemRegister(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody(required = true) UserDto.UserSignupSystem userSignup) throws Exception { |
|||
|
|||
UserVo.Account account = userService.systemRegister(userSignup); |
|||
return JsonResponse.newInstance().ok(account); |
|||
} |
|||
|
|||
@ApiOperation(value = "/检查账号是否被注册", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/account", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<Boolean> accounts(@ApiParam @RequestParam String account) throws Exception { |
|||
|
|||
Boolean flag = userService.findAccount(account); |
|||
return JsonResponse.newInstance().ok(flag); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "/检查手机号是否被注册", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/phone", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<Boolean> findPhone(@ApiParam @RequestParam String phone) throws Exception { |
|||
|
|||
Boolean flag = userService.findPhone(phone); |
|||
return JsonResponse.newInstance().ok(flag); |
|||
} |
|||
|
|||
// @ApiOperation(value = "/修改账号信息",notes = "")
|
|||
// @ApiImplicitParams({
|
|||
// })
|
|||
// @RequestMapping(value="/account",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
|
|||
// public JsonResponse updateAccount(HttpServletRequest request,@ApiParam @RequestBody UserDto.Account account) throws Exception {
|
|||
// userService.updateAccount(account);
|
|||
// return JsonResponse.newInstance().ok();
|
|||
// }
|
|||
|
|||
|
|||
@ApiOperation(value = "/微信合并已有账号",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value="/merge",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenBean> bindingPhone(HttpServletRequest request, |
|||
@ApiParam @RequestBody UserDto.WxMergePhone wxPhone) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
UserVo.UserSign userSignVo = userService.mergeByPhone(currentUserId,wxPhone); |
|||
|
|||
UserVo.TokenBean tokenBean = null; |
|||
if (ObjectUtil.isNotNull(userSignVo)) { |
|||
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
|||
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
|||
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
|||
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
|||
tokenBean = userService.getUserInfoAndToken(clientType, identifyType,userSignVo, theMap); |
|||
} |
|||
return JsonResponse.newInstance().ok(tokenBean); |
|||
} |
|||
|
|||
@ApiOperation(value = "/微信绑定账号",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value="/binding",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenBean> bindingPhone(HttpServletRequest request, |
|||
@ApiParam @RequestBody UserDto.WxBindingPhone wxPhone) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
UserVo.UserSign userSignVo = userService.bindingNewPhone(currentUserId,wxPhone); |
|||
|
|||
UserVo.TokenBean tokenBean = null; |
|||
if (ObjectUtil.isNotNull(userSignVo)) { |
|||
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
|||
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
|||
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
|||
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
|||
tokenBean = userService.getUserInfoAndToken(clientType,identifyType, userSignVo, theMap); |
|||
} |
|||
return JsonResponse.newInstance().ok(tokenBean); |
|||
} |
|||
|
|||
@ApiOperation(value = "/更改绑定手机", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/upPhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse updatePhone(HttpServletRequest request, |
|||
@ApiParam @RequestBody UserDto.UpdatePhone updatePhone) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
userService.updatePhone(currentUserId, updatePhone); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@ApiOperation(value = "/修改用户信息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/userInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.WxInfo> updateUserInfo(HttpServletRequest request, |
|||
@ApiParam @RequestBody UserDto.WxInfo userInfo) throws Exception { |
|||
log.info("修改用户信息,{}",userInfo); |
|||
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({ |
|||
}) |
|||
@RequestMapping(value = "/password", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse updatePassword(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody UserDto.UpdatePassword passwordDto) throws Exception { |
|||
userService.updatePassword(passwordDto); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@ApiOperation(value = "通过账号密码修改密码", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/password/account", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse updatePasswordByAccount(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody UserDto.UpdatePasswordByAccount passwordDto) throws Exception { |
|||
userService.updatePasswordByAccount(passwordDto); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@ApiOperation(value = "解绑手机号", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/relievePhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse relievePhone(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody UserDto.WxBindingPhone phoneInfo) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
userService.relievePhone(currentUserId,phoneInfo); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@ApiOperation(value = "直接更改手机号(不用输入密码)", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/changePhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse changePhone(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody UserDto.WxBindingPhone phoneInfo) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
UserVo.UserSign userSignVo = userService.changePhoneNotPassword(currentUserId,phoneInfo); |
|||
UserVo.TokenBean tokenBean = null; |
|||
if (ObjectUtil.isNotNull(userSignVo)) { |
|||
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
|||
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
|||
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
|||
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
|||
tokenBean = userService.getUserInfoAndToken(clientType, identifyType,userSignVo, theMap); |
|||
} |
|||
return JsonResponse.newInstance().ok(tokenBean); |
|||
} |
|||
|
|||
// @ApiOperation(value = "查询用户是否关注某个项目",notes = "")
|
|||
// @ApiImplicitParams({
|
|||
// @ApiImplicitParam(name="projectId",value = "projectId",required = true,paramType = "query")
|
|||
// })
|
|||
// @RequestMapping(value = "/attention",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
|||
// public JsonResponse<UserVo.TokenToUserId> getIsAttention(HttpServletRequest request,
|
|||
// @RequestParam(required = true) Long projectId) throws Exception {
|
|||
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
|
|||
//
|
|||
// Boolean isAttention = userService.getIsAttention(currentUserId,projectId);
|
|||
// return JsonResponse.newInstance().ok(isAttention);
|
|||
// }
|
|||
|
|||
// @ApiOperation(value = "用户关注项目",notes = "")
|
|||
// @ApiImplicitParams({
|
|||
// @ApiImplicitParam(name="projectId",value = "projectId",required = true,paramType = "query")
|
|||
// })
|
|||
// @RequestMapping(value = "/attention",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
|
|||
// public JsonResponse<UserVo.TokenToUserId> userAttentionProject(HttpServletRequest request,
|
|||
// @ApiParam @Validated @RequestBody ProjectDto.ProjectIdDto projectIdDto) throws Exception {
|
|||
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
|
|||
// userService.userAttentionProject(currentUserId,projectIdDto);
|
|||
// return JsonResponse.newInstance().ok();
|
|||
// }
|
|||
|
|||
@ApiOperation(value = "输入两个userid将两个账号合并(保留企业用户的id)",notes = "") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name="userId",value = "需要保留的userId",required = true,paramType = "query"), |
|||
@ApiImplicitParam(name="uselessId",value = "不需要保留的userId",required = true,paramType = "query") |
|||
}) |
|||
@RequestMapping(value = "/mergeUserId",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse mergeUserId(HttpServletRequest request, |
|||
@RequestParam(required = true) Long userId,Long uselessId) throws Exception { |
|||
userService.mergeUserId(userId,uselessId); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "通过userId获取token",notes = "") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name="userId",value = "用户id",required = true,paramType = "query") |
|||
}) |
|||
@RequestMapping(value = "/userId",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenBean> getTokenByUserId(HttpServletRequest request, |
|||
@RequestParam(required = true) Long userId) throws Exception { |
|||
|
|||
UserVo.TokenBean tokenBean = userService.getTokenByUserId(userId); |
|||
return JsonResponse.newInstance().ok(tokenBean); |
|||
} |
|||
|
|||
|
|||
/*===============================================================================================*/ |
|||
@ApiOperation(value = "根据token获取userId",notes = "") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name="token",value = "token",required = true,paramType = "query") |
|||
}) |
|||
@RequestMapping(value = "claims",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|||
public String getNodeMessage(@RequestParam(required = true) String token) throws Exception { |
|||
log.info("根据token获取userId,token:{}",token); |
|||
//验证token是否有效
|
|||
String userId = null; |
|||
Claims claims = null; |
|||
boolean flag = false; |
|||
if (token != null) { |
|||
try { |
|||
claims = JwtUtil.parseJWT(token, WebConstant.JWT_ACCESS_TOKEN_SECERT); |
|||
flag = true; |
|||
}catch(SignatureException e){ |
|||
flag = false; |
|||
}catch(ExpiredJwtException e){ |
|||
flag = false; |
|||
}catch(Exception e){ |
|||
e.printStackTrace(); |
|||
flag = false; |
|||
} |
|||
} |
|||
if(flag){ |
|||
userId = claims.getSubject(); |
|||
} |
|||
return userId; |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "根据token字符串获取userId",notes = "") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name="token",value = "token",required = true,paramType = "query") |
|||
}) |
|||
@RequestMapping(value = "token",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.TokenToUserId> getUserByToken(@RequestParam(required = true) String token) throws Exception { |
|||
long start = System.currentTimeMillis(); |
|||
UserVo.TokenToUserId tokenToUserId = new UserVo.TokenToUserId(); |
|||
|
|||
// 验证token是否存在
|
|||
String tokenStr = token; |
|||
if (tokenStr == null || !tokenStr.startsWith(WebConstant.HEADER_KEY_TOKEN_PREFIX)) { |
|||
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
|||
} |
|||
String userToken = tokenStr.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); |
|||
|
|||
//验证token是否有效
|
|||
Claims claims = null; |
|||
try { |
|||
claims = JwtUtil.parseJWT(userToken, WebConstant.JWT_ACCESS_TOKEN_SECERT); |
|||
}catch(Exception e){ |
|||
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
|||
} |
|||
//验证用户存根
|
|||
if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){ |
|||
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
|||
} |
|||
// //验证用户是否禁用
|
|||
// SysUser user = userService.getUserById(Long.valueOf(claims.getSubject()));
|
|||
// if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){
|
|||
// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
|
|||
// }
|
|||
|
|||
tokenToUserId.setId(Long.valueOf(claims.getSubject())); |
|||
long end = System.currentTimeMillis(); |
|||
log.info("根据token查找userId用时:{}",end - start); |
|||
return JsonResponse.newInstance().ok(tokenToUserId); |
|||
} |
|||
|
|||
|
|||
// /**
|
|||
// * 查询user在项目中的member信息
|
|||
// */
|
|||
// @RequestMapping(value = "member", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
|||
// public JsonResponse<MemberVo.MemberInfo> getMemberByUserIdAndProjectId( Long userId,Long projectId) throws Exception {
|
|||
//
|
|||
// MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndProjectId(userId,projectId);
|
|||
// return JsonResponse.newInstance().ok(memberInfo);
|
|||
// }
|
|||
|
|||
|
|||
// /**
|
|||
// * 查询user在项目中的member信息
|
|||
// */
|
|||
// @RequestMapping(value = "memberByTask", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
|||
// public JsonResponse<MemberVo.MemberInfo> getMemberByUserIdAndTaskId( Long userId,Long taskId) throws Exception {
|
|||
// log.info("根据任务ID和用户ID查询用户信息:{}-{}", userId, taskId);
|
|||
// MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndTaskId(userId,taskId);
|
|||
// log.info("用户信息:{}", memberInfo);
|
|||
// return JsonResponse.newInstance().ok(memberInfo);
|
|||
// }
|
|||
|
|||
// /**
|
|||
// * 查询user的信息
|
|||
// */
|
|||
// @RequestMapping(value = "getUserInfo", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
|||
// public JsonResponse<MemberVo.MemberInfo> getUserInfoByUserId(Long userId) throws Exception {
|
|||
//
|
|||
// MemberVo.MemberInfo memberInfo = proMemberService.getUserInfoByUserId(userId);
|
|||
// return JsonResponse.newInstance().ok(memberInfo);
|
|||
// }
|
|||
|
|||
// /**
|
|||
// * 获取项目下的所有成员ID
|
|||
// */
|
|||
// @RequestMapping(value = "allMemberAll", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
|||
// public List<Long> getMemberIdByProjectId(Long projectId) throws Exception {
|
|||
//
|
|||
// List<Long> memberIdInfo = proMemberService.getMemberIdByProjectId(projectId);
|
|||
// return memberIdInfo;
|
|||
// }
|
|||
|
|||
@ApiOperation(value = "图片验证码") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/code", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.VerificationCode> vertifyCode(HttpServletRequest request, HttpServletResponse response) throws Exception { |
|||
UserVo.VerificationCode vertifyCode = userService.getVertifyCode(); |
|||
// ImageCodeGeneratorUtil.generateCodeImage(response.getOutputStream(), (String) codeMap.get("imageCode"), 200, 70);
|
|||
return JsonResponse.newInstance().ok(vertifyCode); |
|||
} |
|||
} |
|||
|
|||
|
@ -0,0 +1,89 @@ |
|||
package com.ccsens.signin.api; |
|||
|
|||
import com.ccsens.signin.bean.dto.UserDto; |
|||
import com.ccsens.signin.bean.vo.UserVo; |
|||
import com.ccsens.signin.service.IUserInfoService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.WebConstant; |
|||
import io.jsonwebtoken.Claims; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.Part; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Api(tags = "用户详细信息操作API") |
|||
@RestController |
|||
@RequestMapping("/users/info") |
|||
public class UserInfoController { |
|||
@Resource |
|||
private IUserInfoService userInfoService; |
|||
|
|||
@ApiOperation(value = "修改登录账号") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/account", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse updateAccount(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody UserDto.UpdateAccount updateAccount) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
userInfoService.updateAccount(currentUserId, updateAccount); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "修改昵称") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/nickname", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse updateNickname(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody UserDto.UpdateNickname updateNickname) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
userInfoService.updateNickname(currentUserId, updateNickname); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@ApiOperation(value = "上传头像") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/avatarUrl", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse uploadAvatarUrl(HttpServletRequest request, |
|||
@RequestParam(required = true) Part file) throws Exception { |
|||
|
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
userInfoService.uploadAvatarUrl(currentUserId,file); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@ApiOperation(value = "查找用户详细信息") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.SelectUserInfo> selectUserInfo(HttpServletRequest request) throws Exception { |
|||
|
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
UserVo.SelectUserInfo selectUserInfo = userInfoService.selectUserInfo(currentUserId); |
|||
return JsonResponse.newInstance().ok(selectUserInfo); |
|||
} |
|||
|
|||
@ApiOperation(value = "修改用户详细信息") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<UserVo.SelectUserInfo> updateUserInfo(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody UserDto.UpdateUserInfo updateUserInfo) throws Exception { |
|||
|
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
UserVo.SelectUserInfo selectUserInfo = userInfoService.updateUserInfo(currentUserId,updateUserInfo); |
|||
return JsonResponse.newInstance().ok(selectUserInfo); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,214 @@ |
|||
package com.ccsens.signin.bean.dto; |
|||
|
|||
import com.ccsens.util.WebConstant; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Pattern; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class UserDto { |
|||
@Data |
|||
@ApiModel |
|||
public static class UserSginin{ |
|||
@lombok.Data |
|||
@ApiModel |
|||
public static class Data{ |
|||
@ApiModelProperty("用户标识|用户名") |
|||
@NotEmpty(message = "identifier is required.") |
|||
private String identifier; |
|||
@ApiModelProperty("用户凭据|密码") |
|||
private String credential; |
|||
} |
|||
@ApiModelProperty("登录客户端:0-wxmp,1-H5,2-Android,3-IOS,4-WxEnterprise") |
|||
@NotNull(message = "client is required.") |
|||
private Integer client; |
|||
@ApiModelProperty("登录类型:0-wxmp,1-phone,2-email,3-accounts,4-OAUTH2_Wx,5-Wx_H5,6-OAUTH2_WeiBo, 7-Wx_Enterprise") |
|||
@NotNull(message = "type is required.") |
|||
private Integer type; |
|||
@ApiModelProperty("登录信息") |
|||
private Data data; |
|||
@ApiModelProperty("通知消息") |
|||
private String redirect; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class UpdatePhone{ |
|||
@ApiModelProperty("旧手机号") |
|||
private String oldPhone; |
|||
@ApiModelProperty("密码") |
|||
private String password; |
|||
@ApiModelProperty("新手机号") |
|||
private String newPhone; |
|||
@ApiModelProperty("新手机号的验证码") |
|||
private String code; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class Account{ |
|||
@ApiModelProperty("用户id") |
|||
private Long id; |
|||
@ApiModelProperty("用户名") |
|||
private String username; |
|||
@ApiModelProperty("密码") |
|||
private String password; |
|||
} |
|||
@Data |
|||
@ApiModel |
|||
public static class UpdatePassword{ |
|||
@ApiModelProperty("手机号") |
|||
@NotEmpty(message = "手机号不能为空") |
|||
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") |
|||
private String phone; |
|||
@ApiModelProperty("验证码") |
|||
@NotEmpty(message = "验证码不能为空.") |
|||
private String code; |
|||
@ApiModelProperty("密码") |
|||
@NotEmpty(message = "密码不能为空") |
|||
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
|||
private String password; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("通过账号修改密码") |
|||
public static class UpdatePasswordByAccount{ |
|||
@ApiModelProperty("账号") |
|||
@NotEmpty(message = "账号不能为空") |
|||
private String account; |
|||
@ApiModelProperty("旧密码") |
|||
@NotEmpty(message = "旧密码不能为空.") |
|||
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
|||
private String passwordOld; |
|||
@ApiModelProperty("新密码") |
|||
@NotEmpty(message = "新密码不能为空") |
|||
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
|||
private String passwordNew; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("手机号注册") |
|||
public static class UserSignup{ |
|||
@ApiModelProperty("手机号") |
|||
@NotEmpty(message = "手机号不能为空") |
|||
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") |
|||
private String phone; |
|||
@ApiModelProperty("验证码") |
|||
@NotEmpty(message = "验证码不能为空.") |
|||
private String smsCode; |
|||
@ApiModelProperty("账号") |
|||
@NotEmpty(message = "账号不能为空.") |
|||
@Pattern(regexp="^[a-zA-Z0-9._-]{2,20}$",message="账号长度需在2~20之间,不能使用汉字,不能包含特殊字符") |
|||
private String account; |
|||
@ApiModelProperty("密码") |
|||
@NotEmpty(message = "密码不能为空") |
|||
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
|||
private String password; |
|||
@ApiModelProperty("来源 0:默认注册,1:跳绳") |
|||
private byte source = WebConstant.Regist.SOURCE; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("注册") |
|||
public static class UserSignupSystem{ |
|||
@ApiModelProperty("账号") |
|||
private String account; |
|||
@ApiModelProperty("密码") |
|||
private String password; |
|||
} |
|||
@Data |
|||
@ApiModel |
|||
public static class WxMergePhone{ |
|||
@ApiModelProperty("手机号") |
|||
private String phone; |
|||
@ApiModelProperty("合并方式 0直接合并 1不合并以前的信息") |
|||
private int isMerge; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class WxBindingPhone{ |
|||
@ApiModelProperty("手机号") |
|||
private String phone; |
|||
@ApiModelProperty("手机验证码") |
|||
private String smsCode; |
|||
} |
|||
|
|||
@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; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("修改登录账号") |
|||
public static class UpdateAccount{ |
|||
@ApiModelProperty("手机号") |
|||
@NotEmpty(message = "手机号不能为空") |
|||
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") |
|||
private String phone; |
|||
@ApiModelProperty("验证码") |
|||
@NotEmpty(message = "验证码不能为空.") |
|||
private String smsCode; |
|||
@ApiModelProperty("账号") |
|||
@NotEmpty(message = "新账号不能为空.") |
|||
private String account; |
|||
@ApiModelProperty("密码,有账号登录信息则验证密码,没有则设为新密码") |
|||
@NotEmpty(message = "密码不能为空") |
|||
private String password; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("修改昵称") |
|||
public static class UpdateNickname{ |
|||
@ApiModelProperty("昵称") |
|||
@NotEmpty(message = "新昵称不能为空.") |
|||
private String nickname; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("修改个人详细信息") |
|||
public static class UpdateUserInfo{ |
|||
@NotNull |
|||
@ApiModelProperty("userId") |
|||
private Long id; |
|||
@ApiModelProperty("昵称") |
|||
private String nickname; |
|||
@ApiModelProperty("个人签名") |
|||
private String signature; |
|||
@ApiModelProperty("个人简介") |
|||
private String introduction; |
|||
@ApiModelProperty("生日") |
|||
private String birthday; |
|||
@ApiModelProperty("所在地") |
|||
private String address; |
|||
@ApiModelProperty("网页") |
|||
private String webPath; |
|||
@ApiModelProperty("公司") |
|||
private String company; |
|||
@ApiModelProperty("职位") |
|||
private String position; |
|||
} |
|||
} |
@ -0,0 +1,128 @@ |
|||
package com.ccsens.signin.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysAuth implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long userId; |
|||
|
|||
private Byte identifyType; |
|||
|
|||
private String identifier; |
|||
|
|||
private String credential; |
|||
|
|||
private String salt; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private Byte registerType; |
|||
|
|||
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 Byte getIdentifyType() { |
|||
return identifyType; |
|||
} |
|||
|
|||
public void setIdentifyType(Byte identifyType) { |
|||
this.identifyType = identifyType; |
|||
} |
|||
|
|||
public String getIdentifier() { |
|||
return identifier; |
|||
} |
|||
|
|||
public void setIdentifier(String identifier) { |
|||
this.identifier = identifier == null ? null : identifier.trim(); |
|||
} |
|||
|
|||
public String getCredential() { |
|||
return credential; |
|||
} |
|||
|
|||
public void setCredential(String credential) { |
|||
this.credential = credential == null ? null : credential.trim(); |
|||
} |
|||
|
|||
public String getSalt() { |
|||
return salt; |
|||
} |
|||
|
|||
public void setSalt(String salt) { |
|||
this.salt = salt == null ? null : salt.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; |
|||
} |
|||
|
|||
public Byte getRegisterType() { |
|||
return registerType; |
|||
} |
|||
|
|||
public void setRegisterType(Byte registerType) { |
|||
this.registerType = registerType; |
|||
} |
|||
|
|||
@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(", identifyType=").append(identifyType); |
|||
sb.append(", identifier=").append(identifier); |
|||
sb.append(", credential=").append(credential); |
|||
sb.append(", salt=").append(salt); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append(", registerType=").append(registerType); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,831 @@ |
|||
package com.ccsens.signin.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class SysAuthExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public SysAuthExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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 andIdentifyTypeIsNull() { |
|||
addCriterion("identify_type is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeIsNotNull() { |
|||
addCriterion("identify_type is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeEqualTo(Byte value) { |
|||
addCriterion("identify_type =", value, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeNotEqualTo(Byte value) { |
|||
addCriterion("identify_type <>", value, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeGreaterThan(Byte value) { |
|||
addCriterion("identify_type >", value, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("identify_type >=", value, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeLessThan(Byte value) { |
|||
addCriterion("identify_type <", value, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeLessThanOrEqualTo(Byte value) { |
|||
addCriterion("identify_type <=", value, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeIn(List<Byte> values) { |
|||
addCriterion("identify_type in", values, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeNotIn(List<Byte> values) { |
|||
addCriterion("identify_type not in", values, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeBetween(Byte value1, Byte value2) { |
|||
addCriterion("identify_type between", value1, value2, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("identify_type not between", value1, value2, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierIsNull() { |
|||
addCriterion("identifier is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierIsNotNull() { |
|||
addCriterion("identifier is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierEqualTo(String value) { |
|||
addCriterion("identifier =", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierNotEqualTo(String value) { |
|||
addCriterion("identifier <>", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierGreaterThan(String value) { |
|||
addCriterion("identifier >", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierGreaterThanOrEqualTo(String value) { |
|||
addCriterion("identifier >=", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierLessThan(String value) { |
|||
addCriterion("identifier <", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierLessThanOrEqualTo(String value) { |
|||
addCriterion("identifier <=", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierLike(String value) { |
|||
addCriterion("identifier like", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierNotLike(String value) { |
|||
addCriterion("identifier not like", value, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierIn(List<String> values) { |
|||
addCriterion("identifier in", values, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierNotIn(List<String> values) { |
|||
addCriterion("identifier not in", values, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierBetween(String value1, String value2) { |
|||
addCriterion("identifier between", value1, value2, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierNotBetween(String value1, String value2) { |
|||
addCriterion("identifier not between", value1, value2, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialIsNull() { |
|||
addCriterion("credential is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialIsNotNull() { |
|||
addCriterion("credential is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialEqualTo(String value) { |
|||
addCriterion("credential =", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialNotEqualTo(String value) { |
|||
addCriterion("credential <>", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialGreaterThan(String value) { |
|||
addCriterion("credential >", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialGreaterThanOrEqualTo(String value) { |
|||
addCriterion("credential >=", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialLessThan(String value) { |
|||
addCriterion("credential <", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialLessThanOrEqualTo(String value) { |
|||
addCriterion("credential <=", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialLike(String value) { |
|||
addCriterion("credential like", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialNotLike(String value) { |
|||
addCriterion("credential not like", value, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialIn(List<String> values) { |
|||
addCriterion("credential in", values, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialNotIn(List<String> values) { |
|||
addCriterion("credential not in", values, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialBetween(String value1, String value2) { |
|||
addCriterion("credential between", value1, value2, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialNotBetween(String value1, String value2) { |
|||
addCriterion("credential not between", value1, value2, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltIsNull() { |
|||
addCriterion("salt is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltIsNotNull() { |
|||
addCriterion("salt is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltEqualTo(String value) { |
|||
addCriterion("salt =", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltNotEqualTo(String value) { |
|||
addCriterion("salt <>", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltGreaterThan(String value) { |
|||
addCriterion("salt >", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltGreaterThanOrEqualTo(String value) { |
|||
addCriterion("salt >=", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltLessThan(String value) { |
|||
addCriterion("salt <", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltLessThanOrEqualTo(String value) { |
|||
addCriterion("salt <=", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltLike(String value) { |
|||
addCriterion("salt like", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltNotLike(String value) { |
|||
addCriterion("salt not like", value, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltIn(List<String> values) { |
|||
addCriterion("salt in", values, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltNotIn(List<String> values) { |
|||
addCriterion("salt not in", values, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltBetween(String value1, String value2) { |
|||
addCriterion("salt between", value1, value2, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltNotBetween(String value1, String value2) { |
|||
addCriterion("salt not between", value1, value2, "salt"); |
|||
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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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 Criteria andRegisterTypeIsNull() { |
|||
addCriterion("register_type is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeIsNotNull() { |
|||
addCriterion("register_type is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeEqualTo(Byte value) { |
|||
addCriterion("register_type =", value, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeNotEqualTo(Byte value) { |
|||
addCriterion("register_type <>", value, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeGreaterThan(Byte value) { |
|||
addCriterion("register_type >", value, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("register_type >=", value, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeLessThan(Byte value) { |
|||
addCriterion("register_type <", value, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeLessThanOrEqualTo(Byte value) { |
|||
addCriterion("register_type <=", value, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeIn(List<Byte> values) { |
|||
addCriterion("register_type in", values, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeNotIn(List<Byte> values) { |
|||
addCriterion("register_type not in", values, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeBetween(Byte value1, Byte value2) { |
|||
addCriterion("register_type between", value1, value2, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRegisterTypeNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("register_type not between", value1, value2, "registerType"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
public static class Criterion { |
|||
private String condition; |
|||
|
|||
private Object value; |
|||
|
|||
private Object secondValue; |
|||
|
|||
private boolean noValue; |
|||
|
|||
private boolean singleValue; |
|||
|
|||
private boolean betweenValue; |
|||
|
|||
private boolean listValue; |
|||
|
|||
private String typeHandler; |
|||
|
|||
public String getCondition() { |
|||
return condition; |
|||
} |
|||
|
|||
public Object getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Object getSecondValue() { |
|||
return secondValue; |
|||
} |
|||
|
|||
public boolean isNoValue() { |
|||
return noValue; |
|||
} |
|||
|
|||
public boolean isSingleValue() { |
|||
return singleValue; |
|||
} |
|||
|
|||
public boolean isBetweenValue() { |
|||
return betweenValue; |
|||
} |
|||
|
|||
public boolean isListValue() { |
|||
return listValue; |
|||
} |
|||
|
|||
public String getTypeHandler() { |
|||
return typeHandler; |
|||
} |
|||
|
|||
protected Criterion(String condition) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.typeHandler = null; |
|||
this.noValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.typeHandler = typeHandler; |
|||
if (value instanceof List<?>) { |
|||
this.listValue = true; |
|||
} else { |
|||
this.singleValue = true; |
|||
} |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value) { |
|||
this(condition, value, null); |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.secondValue = secondValue; |
|||
this.typeHandler = typeHandler; |
|||
this.betweenValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue) { |
|||
this(condition, value, secondValue, null); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,205 @@ |
|||
package com.ccsens.signin.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysUser implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long gradeId; |
|||
|
|||
private String avatarUrl; |
|||
|
|||
private String nickname; |
|||
|
|||
private Byte gender; |
|||
|
|||
private String country; |
|||
|
|||
private String province; |
|||
|
|||
private String city; |
|||
|
|||
private String language; |
|||
|
|||
private String phone; |
|||
|
|||
private String wechat; |
|||
|
|||
private String email; |
|||
|
|||
private Long balance; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private Byte source; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getGradeId() { |
|||
return gradeId; |
|||
} |
|||
|
|||
public void setGradeId(Long gradeId) { |
|||
this.gradeId = gradeId; |
|||
} |
|||
|
|||
public String getAvatarUrl() { |
|||
return avatarUrl; |
|||
} |
|||
|
|||
public void setAvatarUrl(String avatarUrl) { |
|||
this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim(); |
|||
} |
|||
|
|||
public String getNickname() { |
|||
return nickname; |
|||
} |
|||
|
|||
public void setNickname(String nickname) { |
|||
this.nickname = nickname == null ? null : nickname.trim(); |
|||
} |
|||
|
|||
public Byte getGender() { |
|||
return gender; |
|||
} |
|||
|
|||
public void setGender(Byte gender) { |
|||
this.gender = gender; |
|||
} |
|||
|
|||
public String getCountry() { |
|||
return country; |
|||
} |
|||
|
|||
public void setCountry(String country) { |
|||
this.country = country == null ? null : country.trim(); |
|||
} |
|||
|
|||
public String getProvince() { |
|||
return province; |
|||
} |
|||
|
|||
public void setProvince(String province) { |
|||
this.province = province == null ? null : province.trim(); |
|||
} |
|||
|
|||
public String getCity() { |
|||
return city; |
|||
} |
|||
|
|||
public void setCity(String city) { |
|||
this.city = city == null ? null : city.trim(); |
|||
} |
|||
|
|||
public String getLanguage() { |
|||
return language; |
|||
} |
|||
|
|||
public void setLanguage(String language) { |
|||
this.language = language == null ? null : language.trim(); |
|||
} |
|||
|
|||
public String getPhone() { |
|||
return phone; |
|||
} |
|||
|
|||
public void setPhone(String phone) { |
|||
this.phone = phone == null ? null : phone.trim(); |
|||
} |
|||
|
|||
public String getWechat() { |
|||
return wechat; |
|||
} |
|||
|
|||
public void setWechat(String wechat) { |
|||
this.wechat = wechat == null ? null : wechat.trim(); |
|||
} |
|||
|
|||
public String getEmail() { |
|||
return email; |
|||
} |
|||
|
|||
public void setEmail(String email) { |
|||
this.email = email == null ? null : email.trim(); |
|||
} |
|||
|
|||
public Long getBalance() { |
|||
return balance; |
|||
} |
|||
|
|||
public void setBalance(Long balance) { |
|||
this.balance = balance; |
|||
} |
|||
|
|||
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; |
|||
} |
|||
|
|||
public Byte getSource() { |
|||
return source; |
|||
} |
|||
|
|||
public void setSource(Byte source) { |
|||
this.source = source; |
|||
} |
|||
|
|||
@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(", gradeId=").append(gradeId); |
|||
sb.append(", avatarUrl=").append(avatarUrl); |
|||
sb.append(", nickname=").append(nickname); |
|||
sb.append(", gender=").append(gender); |
|||
sb.append(", country=").append(country); |
|||
sb.append(", province=").append(province); |
|||
sb.append(", city=").append(city); |
|||
sb.append(", language=").append(language); |
|||
sb.append(", phone=").append(phone); |
|||
sb.append(", wechat=").append(wechat); |
|||
sb.append(", email=").append(email); |
|||
sb.append(", balance=").append(balance); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append(", source=").append(source); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,150 @@ |
|||
package com.ccsens.signin.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysUserInfo implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long userId; |
|||
|
|||
private String signature; |
|||
|
|||
private String introduction; |
|||
|
|||
private String birthday; |
|||
|
|||
private String address; |
|||
|
|||
private String webPath; |
|||
|
|||
private String company; |
|||
|
|||
private String position; |
|||
|
|||
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 String getSignature() { |
|||
return signature; |
|||
} |
|||
|
|||
public void setSignature(String signature) { |
|||
this.signature = signature == null ? null : signature.trim(); |
|||
} |
|||
|
|||
public String getIntroduction() { |
|||
return introduction; |
|||
} |
|||
|
|||
public void setIntroduction(String introduction) { |
|||
this.introduction = introduction == null ? null : introduction.trim(); |
|||
} |
|||
|
|||
public String getBirthday() { |
|||
return birthday; |
|||
} |
|||
|
|||
public void setBirthday(String birthday) { |
|||
this.birthday = birthday == null ? null : birthday.trim(); |
|||
} |
|||
|
|||
public String getAddress() { |
|||
return address; |
|||
} |
|||
|
|||
public void setAddress(String address) { |
|||
this.address = address == null ? null : address.trim(); |
|||
} |
|||
|
|||
public String getWebPath() { |
|||
return webPath; |
|||
} |
|||
|
|||
public void setWebPath(String webPath) { |
|||
this.webPath = webPath == null ? null : webPath.trim(); |
|||
} |
|||
|
|||
public String getCompany() { |
|||
return company; |
|||
} |
|||
|
|||
public void setCompany(String company) { |
|||
this.company = company == null ? null : company.trim(); |
|||
} |
|||
|
|||
public String getPosition() { |
|||
return position; |
|||
} |
|||
|
|||
public void setPosition(String position) { |
|||
this.position = position == null ? null : position.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(", signature=").append(signature); |
|||
sb.append(", introduction=").append(introduction); |
|||
sb.append(", birthday=").append(birthday); |
|||
sb.append(", address=").append(address); |
|||
sb.append(", webPath=").append(webPath); |
|||
sb.append(", company=").append(company); |
|||
sb.append(", position=").append(position); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,991 @@ |
|||
package com.ccsens.signin.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class SysUserInfoExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public SysUserInfoExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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 andSignatureIsNull() { |
|||
addCriterion("signature is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureIsNotNull() { |
|||
addCriterion("signature is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureEqualTo(String value) { |
|||
addCriterion("signature =", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureNotEqualTo(String value) { |
|||
addCriterion("signature <>", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureGreaterThan(String value) { |
|||
addCriterion("signature >", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureGreaterThanOrEqualTo(String value) { |
|||
addCriterion("signature >=", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureLessThan(String value) { |
|||
addCriterion("signature <", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureLessThanOrEqualTo(String value) { |
|||
addCriterion("signature <=", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureLike(String value) { |
|||
addCriterion("signature like", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureNotLike(String value) { |
|||
addCriterion("signature not like", value, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureIn(List<String> values) { |
|||
addCriterion("signature in", values, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureNotIn(List<String> values) { |
|||
addCriterion("signature not in", values, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureBetween(String value1, String value2) { |
|||
addCriterion("signature between", value1, value2, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSignatureNotBetween(String value1, String value2) { |
|||
addCriterion("signature not between", value1, value2, "signature"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionIsNull() { |
|||
addCriterion("introduction is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionIsNotNull() { |
|||
addCriterion("introduction is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionEqualTo(String value) { |
|||
addCriterion("introduction =", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionNotEqualTo(String value) { |
|||
addCriterion("introduction <>", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionGreaterThan(String value) { |
|||
addCriterion("introduction >", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionGreaterThanOrEqualTo(String value) { |
|||
addCriterion("introduction >=", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionLessThan(String value) { |
|||
addCriterion("introduction <", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionLessThanOrEqualTo(String value) { |
|||
addCriterion("introduction <=", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionLike(String value) { |
|||
addCriterion("introduction like", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionNotLike(String value) { |
|||
addCriterion("introduction not like", value, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionIn(List<String> values) { |
|||
addCriterion("introduction in", values, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionNotIn(List<String> values) { |
|||
addCriterion("introduction not in", values, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionBetween(String value1, String value2) { |
|||
addCriterion("introduction between", value1, value2, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIntroductionNotBetween(String value1, String value2) { |
|||
addCriterion("introduction not between", value1, value2, "introduction"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayIsNull() { |
|||
addCriterion("birthday is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayIsNotNull() { |
|||
addCriterion("birthday is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayEqualTo(String value) { |
|||
addCriterion("birthday =", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayNotEqualTo(String value) { |
|||
addCriterion("birthday <>", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayGreaterThan(String value) { |
|||
addCriterion("birthday >", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayGreaterThanOrEqualTo(String value) { |
|||
addCriterion("birthday >=", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayLessThan(String value) { |
|||
addCriterion("birthday <", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayLessThanOrEqualTo(String value) { |
|||
addCriterion("birthday <=", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayLike(String value) { |
|||
addCriterion("birthday like", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayNotLike(String value) { |
|||
addCriterion("birthday not like", value, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayIn(List<String> values) { |
|||
addCriterion("birthday in", values, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayNotIn(List<String> values) { |
|||
addCriterion("birthday not in", values, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayBetween(String value1, String value2) { |
|||
addCriterion("birthday between", value1, value2, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andBirthdayNotBetween(String value1, String value2) { |
|||
addCriterion("birthday not between", value1, value2, "birthday"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressIsNull() { |
|||
addCriterion("address is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressIsNotNull() { |
|||
addCriterion("address is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressEqualTo(String value) { |
|||
addCriterion("address =", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressNotEqualTo(String value) { |
|||
addCriterion("address <>", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressGreaterThan(String value) { |
|||
addCriterion("address >", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressGreaterThanOrEqualTo(String value) { |
|||
addCriterion("address >=", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressLessThan(String value) { |
|||
addCriterion("address <", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressLessThanOrEqualTo(String value) { |
|||
addCriterion("address <=", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressLike(String value) { |
|||
addCriterion("address like", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressNotLike(String value) { |
|||
addCriterion("address not like", value, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressIn(List<String> values) { |
|||
addCriterion("address in", values, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressNotIn(List<String> values) { |
|||
addCriterion("address not in", values, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressBetween(String value1, String value2) { |
|||
addCriterion("address between", value1, value2, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAddressNotBetween(String value1, String value2) { |
|||
addCriterion("address not between", value1, value2, "address"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathIsNull() { |
|||
addCriterion("web_path is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathIsNotNull() { |
|||
addCriterion("web_path is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathEqualTo(String value) { |
|||
addCriterion("web_path =", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathNotEqualTo(String value) { |
|||
addCriterion("web_path <>", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathGreaterThan(String value) { |
|||
addCriterion("web_path >", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathGreaterThanOrEqualTo(String value) { |
|||
addCriterion("web_path >=", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathLessThan(String value) { |
|||
addCriterion("web_path <", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathLessThanOrEqualTo(String value) { |
|||
addCriterion("web_path <=", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathLike(String value) { |
|||
addCriterion("web_path like", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathNotLike(String value) { |
|||
addCriterion("web_path not like", value, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathIn(List<String> values) { |
|||
addCriterion("web_path in", values, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathNotIn(List<String> values) { |
|||
addCriterion("web_path not in", values, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathBetween(String value1, String value2) { |
|||
addCriterion("web_path between", value1, value2, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andWebPathNotBetween(String value1, String value2) { |
|||
addCriterion("web_path not between", value1, value2, "webPath"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIsNull() { |
|||
addCriterion("company is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIsNotNull() { |
|||
addCriterion("company is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyEqualTo(String value) { |
|||
addCriterion("company =", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNotEqualTo(String value) { |
|||
addCriterion("company <>", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyGreaterThan(String value) { |
|||
addCriterion("company >", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyGreaterThanOrEqualTo(String value) { |
|||
addCriterion("company >=", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyLessThan(String value) { |
|||
addCriterion("company <", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyLessThanOrEqualTo(String value) { |
|||
addCriterion("company <=", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyLike(String value) { |
|||
addCriterion("company like", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNotLike(String value) { |
|||
addCriterion("company not like", value, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyIn(List<String> values) { |
|||
addCriterion("company in", values, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNotIn(List<String> values) { |
|||
addCriterion("company not in", values, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyBetween(String value1, String value2) { |
|||
addCriterion("company between", value1, value2, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNotBetween(String value1, String value2) { |
|||
addCriterion("company not between", value1, value2, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionIsNull() { |
|||
addCriterion("position is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionIsNotNull() { |
|||
addCriterion("position is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionEqualTo(String value) { |
|||
addCriterion("position =", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionNotEqualTo(String value) { |
|||
addCriterion("position <>", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionGreaterThan(String value) { |
|||
addCriterion("position >", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionGreaterThanOrEqualTo(String value) { |
|||
addCriterion("position >=", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionLessThan(String value) { |
|||
addCriterion("position <", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionLessThanOrEqualTo(String value) { |
|||
addCriterion("position <=", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionLike(String value) { |
|||
addCriterion("position like", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionNotLike(String value) { |
|||
addCriterion("position not like", value, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionIn(List<String> values) { |
|||
addCriterion("position in", values, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionNotIn(List<String> values) { |
|||
addCriterion("position not in", values, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionBetween(String value1, String value2) { |
|||
addCriterion("position between", value1, value2, "position"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPositionNotBetween(String value1, String value2) { |
|||
addCriterion("position not between", value1, value2, "position"); |
|||
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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,165 @@ |
|||
package com.ccsens.signin.bean.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class UserVo { |
|||
@Data |
|||
@ApiModel |
|||
public static class UserSign{ |
|||
@ApiModelProperty("用户Id") |
|||
private Long userId; |
|||
@ApiModelProperty("认证类型Id") |
|||
private Long authId; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class TokenBean { |
|||
@ApiModelProperty("用户id") |
|||
private Long id; |
|||
@ApiModelProperty("账号") |
|||
private String account; |
|||
@ApiModelProperty("手机号") |
|||
private String phone; |
|||
@ApiModelProperty("token") |
|||
private String token; |
|||
@ApiModelProperty("刷新token") |
|||
private String refresh_token; |
|||
@ApiModelProperty("微信信息") |
|||
private WxInfo wxInfo; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class SmsCode{ |
|||
@ApiModelProperty("手机号") |
|||
private String phone; |
|||
@ApiModelProperty("有效时间(秒)") |
|||
private Integer expiredInSeconds; |
|||
@JsonIgnore |
|||
private String smsCode; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class Account{ |
|||
@ApiModelProperty("用户id") |
|||
private Long id; |
|||
@ApiModelProperty("用户名") |
|||
private String username; |
|||
@ApiModelProperty("密码") |
|||
private String password; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class TokenToUserId{ |
|||
@ApiModelProperty("用户id") |
|||
private Long id; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel |
|||
public static class WxInfo{ |
|||
@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; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("公众号用户") |
|||
public static class Oauth2WX{ |
|||
@ApiModelProperty("openid") |
|||
private String openid; |
|||
@ApiModelProperty("用户id") |
|||
private Long userId; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("用户信息") |
|||
public static class UserInfo { |
|||
@ApiModelProperty("用户id") |
|||
private Long id; |
|||
@ApiModelProperty("昵称") |
|||
private String nickname; |
|||
@ApiModelProperty("头像") |
|||
private String avatarUrl; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("查询个人信息") |
|||
public static class SelectUserInfo{ |
|||
@ApiModelProperty("userId") |
|||
private Long id; |
|||
@ApiModelProperty("账号") |
|||
private String account; |
|||
@ApiModelProperty("手机号") |
|||
private String phone; |
|||
@ApiModelProperty("昵称") |
|||
private String nickname; |
|||
@ApiModelProperty("头像") |
|||
private String avatarUrl; |
|||
@ApiModelProperty("个人签名") |
|||
private String signature; |
|||
@ApiModelProperty("个人简介") |
|||
private String introduction; |
|||
@ApiModelProperty("生日") |
|||
private String birthday; |
|||
@ApiModelProperty("所在地") |
|||
private String address; |
|||
@ApiModelProperty("网页") |
|||
private String webPath; |
|||
@ApiModelProperty("公司") |
|||
private String company; |
|||
@ApiModelProperty("职位") |
|||
private String position; |
|||
@ApiModelProperty("已使用tall多少天") |
|||
private Integer dayOfUseTall; |
|||
@JsonIgnore // 已使用tall多少天
|
|||
private Date createdAt; |
|||
@ApiModelProperty("空间使用情况") |
|||
private Interspace interspace; |
|||
// @ApiModelProperty("标签信息")
|
|||
// private List<LabelVo.SelectLabel> labelList;
|
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("空间使用信息") |
|||
public static class Interspace{ |
|||
@ApiModelProperty("空间已有项目") |
|||
private Integer projectNum; |
|||
@ApiModelProperty("空间总项目(目前写无限制)") |
|||
private Integer projectTotal; |
|||
@ApiModelProperty("空间剩余(目前写无限制)") |
|||
private Integer interspaceResidue; |
|||
@ApiModelProperty("总空间(目前写无限制)") |
|||
private Integer interspaceTotal; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("返回图片验证码") |
|||
public static class VerificationCode{ |
|||
@ApiModelProperty("图片验证码Id") |
|||
private String verificationCodeId; |
|||
@ApiModelProperty("图片的Base64字符串") |
|||
private String imageBase64; |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.ccsens.wisdomcar.config; |
|||
|
|||
import com.ccsens.wisdomcar.intercept.MybatisInterceptor; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: wuHuiJuan |
|||
* @create: 2019/12/03 18:01 |
|||
*/ |
|||
@Configuration |
|||
public class BeanConfig { |
|||
// @Bean
|
|||
// public static PropertySourcesPlaceholderConfigurer properties(){
|
|||
// PropertySourcesPlaceholderConfigurer conf = new PropertySourcesPlaceholderConfigurer();
|
|||
// YamlPropertiesFactoryBean yml = new YamlPropertiesFactoryBean();
|
|||
// yml.setResources(new ClassPathResource("business.yml"));
|
|||
// conf.setProperties(yml.getObject());
|
|||
// return conf;
|
|||
// }
|
|||
|
|||
/** |
|||
* 注册拦截器 |
|||
*/ |
|||
@Bean |
|||
public MybatisInterceptor mybatisInterceptor() { |
|||
MybatisInterceptor interceptor = new MybatisInterceptor(); |
|||
return interceptor; |
|||
} |
|||
} |
@ -0,0 +1,169 @@ |
|||
package com.ccsens.wisdomcar.config; |
|||
|
|||
|
|||
import cn.hutool.core.lang.Snowflake; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.ccsens.util.config.DruidProps; |
|||
import com.fasterxml.jackson.databind.DeserializationFeature; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.fasterxml.jackson.databind.module.SimpleModule; |
|||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.http.converter.HttpMessageConverter; |
|||
import org.springframework.http.converter.StringHttpMessageConverter; |
|||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; |
|||
import org.springframework.web.servlet.config.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.sql.DataSource; |
|||
import java.nio.charset.Charset; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Configuration |
|||
//public class SpringConfig extends WebMvcConfigurationSupport {
|
|||
public class SpringConfig implements WebMvcConfigurer { |
|||
@Resource |
|||
private DruidProps druidPropsUtil; |
|||
@Value("${spring.snowflake.workerId}") |
|||
private String workerId; |
|||
@Value("${spring.snowflake.datacenterId}") |
|||
private String datacenterId; |
|||
|
|||
/** |
|||
* 配置Converter |
|||
* @return |
|||
*/ |
|||
@Bean |
|||
public HttpMessageConverter<String> responseStringConverter() { |
|||
StringHttpMessageConverter converter = new StringHttpMessageConverter( |
|||
Charset.forName("UTF-8")); |
|||
return converter; |
|||
} |
|||
|
|||
@Bean |
|||
public HttpMessageConverter<Object> responseJsonConverter(){ |
|||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); |
|||
List<MediaType> mediaTypeList = new ArrayList<>(); |
|||
mediaTypeList.add(MediaType.TEXT_HTML); |
|||
mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8); |
|||
converter.setSupportedMediaTypes(mediaTypeList); |
|||
|
|||
//converter.setObjectMapper();
|
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
SimpleModule simpleModule = new SimpleModule(); |
|||
simpleModule.addSerializer(Long.class, ToStringSerializer.instance); |
|||
simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); |
|||
objectMapper.registerModule(simpleModule); |
|||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
|||
converter.setObjectMapper(objectMapper); |
|||
|
|||
return converter; |
|||
} |
|||
|
|||
@Override |
|||
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { |
|||
//super.configureMessageConverters(converters);
|
|||
converters.add(responseStringConverter()); |
|||
converters.add(responseJsonConverter()); |
|||
} |
|||
|
|||
@Override |
|||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { |
|||
configurer.favorPathExtension(false); |
|||
} |
|||
|
|||
@Override |
|||
public void addCorsMappings(CorsRegistry registry) { |
|||
registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") |
|||
// .allowedMethods("*") // 允许提交请求的方法,*表示全部允许
|
|||
.allowedOrigins("*") // #允许向该服务器提交请求的URI,*表示全部允许
|
|||
.allowCredentials(true) // 允许cookies跨域
|
|||
.allowedHeaders("*") // #允许访问的头信息,*表示全部
|
|||
.maxAge(18000L); // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
|
|||
|
|||
} |
|||
|
|||
/** |
|||
* 配置视图解析器 SpringBoot建议使用Thymeleaf代替jsp,动态页面默认路径:resources/template,静态页面默认路径: resources/static |
|||
* @return |
|||
*/ |
|||
// @Bean
|
|||
// public ViewResolver getViewResolver() {
|
|||
// InternalResourceViewResolver resolver = new InternalResourceViewResolver();
|
|||
// resolver.setPrefix("/WEB-INF/views/");
|
|||
// resolver.setSuffix(".jsp");
|
|||
// return resolver;
|
|||
// }
|
|||
// @Override
|
|||
// public void configureDefaultServletHandling(
|
|||
// DefaultServletHandlerConfigurer configurer) {
|
|||
// configurer.enable();
|
|||
// }
|
|||
|
|||
|
|||
/** |
|||
* 配置静态资源 |
|||
*/ |
|||
@Override |
|||
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
|||
registry.addResourceHandler("swagger-ui.html") |
|||
.addResourceLocations("classpath:/META-INF/resources/"); |
|||
registry.addResourceHandler("/webjars/**") |
|||
.addResourceLocations("classpath:/META-INF/resources/webjars/"); |
|||
|
|||
registry.addResourceHandler("/uploads/**") |
|||
.addResourceLocations("file:///home/cloud/game/uploads/"); |
|||
//super.addResourceHandlers(registry);
|
|||
} |
|||
|
|||
/** |
|||
* 配置拦截器 |
|||
* @param registry |
|||
*/ |
|||
@Override |
|||
public void addInterceptors(InterceptorRegistry registry) { |
|||
//addPathPatterns 用于添加拦截规则
|
|||
//excludePathPatterns 用于排除拦截
|
|||
// registry.addInterceptor(tokenInterceptor())
|
|||
// .addPathPatterns("/projects/**")
|
|||
// .addPathPatterns("/messages/**")
|
|||
// .addPathPatterns("/users/**")
|
|||
// .excludePathPatterns("/users/signin")
|
|||
// .excludePathPatterns("/users/smscode")
|
|||
// .excludePathPatterns("/users/signup")
|
|||
// .excludePathPatterns("/users/password")
|
|||
// .excludePathPatterns("/users/account")
|
|||
// .excludePathPatterns("/users/token")
|
|||
// .excludePathPatterns("/users/claims")
|
|||
// .addPathPatterns("/plugins/**")
|
|||
// .addPathPatterns("/delivers/**")
|
|||
// .addPathPatterns("/tasks/**")
|
|||
// .addPathPatterns("/members/**")
|
|||
// .addPathPatterns("/templates/**")
|
|||
// .addPathPatterns("/hardware/**");
|
|||
//super.addInterceptors(registry);
|
|||
} |
|||
//
|
|||
// @Bean
|
|||
// public TokenInterceptor tokenInterceptor(){
|
|||
// return new TokenInterceptor();
|
|||
// }
|
|||
|
|||
/** |
|||
* 配置数据源(单数据源) |
|||
*/ |
|||
@Bean |
|||
public DataSource dataSource(){ |
|||
return druidPropsUtil.createDruidDataSource(); |
|||
} |
|||
|
|||
@Bean |
|||
public Snowflake snowflake(){ |
|||
// return new Snowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
|
|||
return IdUtil.createSnowflake(Long.valueOf(workerId),Long.valueOf(datacenterId)); |
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.ccsens.wisdomcar.config; |
|||
|
|||
import com.ccsens.util.WebConstant; |
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import springfox.documentation.builders.ParameterBuilder; |
|||
import springfox.documentation.builders.RequestHandlerSelectors; |
|||
import springfox.documentation.schema.ModelRef; |
|||
import springfox.documentation.service.ApiInfo; |
|||
import springfox.documentation.service.Parameter; |
|||
import springfox.documentation.spi.DocumentationType; |
|||
import springfox.documentation.spring.web.plugins.Docket; |
|||
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Configuration |
|||
@EnableSwagger2 |
|||
@ConditionalOnExpression("${swagger.enable}") |
|||
//public class SwaggerConfigure extends WebMvcConfigurationSupport {
|
|||
public class SwaggerConfigure /*implements WebMvcConfigurer*/ { |
|||
@Bean |
|||
public Docket customDocket() { |
|||
//
|
|||
return new Docket(DocumentationType.SWAGGER_2) |
|||
.apiInfo(apiInfo()) |
|||
.select() |
|||
.apis(RequestHandlerSelectors |
|||
.basePackage("com.ccsens.signin.api")) |
|||
.build() |
|||
.globalOperationParameters(setHeaderToken()); |
|||
} |
|||
|
|||
private ApiInfo apiInfo() { |
|||
return new ApiInfo("Swagger Tall-game",//大标题 title
|
|||
"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题
|
|||
"1.0.0",//版本
|
|||
"http://swagger.io/terms/",//termsOfServiceUrl
|
|||
"zhangsan",//作者
|
|||
"Apache 2.0",//链接显示文字
|
|||
"http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接
|
|||
); |
|||
} |
|||
|
|||
private List<Parameter> setHeaderToken() { |
|||
ParameterBuilder tokenPar = new ParameterBuilder(); |
|||
List<Parameter> pars = new ArrayList<>(); |
|||
tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token") |
|||
.defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX) |
|||
.modelRef(new ModelRef("string")).parameterType("header").required(false).build(); |
|||
pars.add(tokenPar.build()); |
|||
return pars; |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class GetCurrentPartiException extends BaseException { |
|||
public GetCurrentPartiException(Integer code, String message) { |
|||
super(code, message); |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
import lombok.Getter; |
|||
|
|||
@Getter |
|||
public class GetCurrentUserException extends BaseException { |
|||
public GetCurrentUserException(int code, String msg){ |
|||
super(code,msg); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class GetTaskException extends BaseException { |
|||
public GetTaskException(Integer code, String message) { |
|||
super(code, message); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class PartiLoginException extends BaseException { |
|||
public PartiLoginException(Integer code, String message) { |
|||
super(code, message); |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.WebConstant; |
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class SmsException extends BaseException { |
|||
public static final String Error_SendTooFast = WebConstant.Exist_Verify_Code_In_Seconds + "内只能发送一次,请稍后再试"; |
|||
|
|||
public SmsException(String message) { |
|||
super(message); |
|||
} |
|||
|
|||
public SmsException(Integer code,String message) { |
|||
super(code,message); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class TaskValidateException extends BaseException { |
|||
public TaskValidateException(int i, String s) { |
|||
super(i,s); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class UnAuthenticationException extends BaseException { |
|||
public UnAuthenticationException() { |
|||
super(400,"未认证的用户"); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class UnAuthorizationException extends BaseException { |
|||
public UnAuthorizationException() { |
|||
super(401,"未授权的用户"); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.ccsens.signin.exception; |
|||
|
|||
|
|||
import com.ccsens.util.exception.BaseException; |
|||
|
|||
public class UserLoginException extends BaseException { |
|||
public UserLoginException(int code,String message){ |
|||
super(code,message); |
|||
} |
|||
} |
@ -0,0 +1,159 @@ |
|||
package com.ccsens.wisdomcar.intercept; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.ccsens.util.WebConstant; |
|||
import org.apache.ibatis.executor.Executor; |
|||
import org.apache.ibatis.mapping.BoundSql; |
|||
import org.apache.ibatis.mapping.MappedStatement; |
|||
import org.apache.ibatis.mapping.ResultMap; |
|||
import org.apache.ibatis.mapping.SqlSource; |
|||
import org.apache.ibatis.plugin.*; |
|||
import org.apache.ibatis.reflection.DefaultReflectorFactory; |
|||
import org.apache.ibatis.reflection.MetaObject; |
|||
import org.apache.ibatis.reflection.factory.DefaultObjectFactory; |
|||
import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory; |
|||
import org.apache.ibatis.session.ResultHandler; |
|||
import org.apache.ibatis.session.RowBounds; |
|||
|
|||
import java.lang.reflect.InvocationTargetException; |
|||
import java.lang.reflect.Method; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Properties; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: wuHuiJuan |
|||
* @create: 2019/12/11 10:58 |
|||
*/ |
|||
@Intercepts({ |
|||
@Signature( |
|||
type = Executor.class, |
|||
method = "query", |
|||
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class} |
|||
) |
|||
}) |
|||
public class MybatisInterceptor implements Interceptor { |
|||
@Override |
|||
public Object intercept(Invocation invocation) throws Throwable { |
|||
|
|||
|
|||
String selectByExample = "selectByExample"; |
|||
String countByExample = "countByExample"; |
|||
String countByExample2 = "selectByExample_COUNT"; |
|||
String selectByPrimaryKey = "selectByPrimaryKey"; |
|||
|
|||
Object[] args = invocation.getArgs(); |
|||
MappedStatement statement = (MappedStatement) args[0]; |
|||
if (statement.getId().endsWith(selectByExample) |
|||
|| statement.getId().endsWith(countByExample) |
|||
|| statement.getId().endsWith(countByExample2)) { |
|||
//XXXExample
|
|||
Object example = args[1]; |
|||
|
|||
addCondition(statement, example); |
|||
|
|||
|
|||
|
|||
|
|||
} else if (statement.getId().endsWith(selectByPrimaryKey)) { |
|||
BoundSql boundSql = statement.getBoundSql(args[1]); |
|||
String sql = boundSql.getSql() + " and rec_status = 0"; |
|||
MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql)); |
|||
MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory()); |
|||
msObject.setValue("sqlSource.boundSql.sql", sql); |
|||
args[0] = newStatement; |
|||
} |
|||
|
|||
return invocation.proceed(); |
|||
} |
|||
|
|||
private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException { |
|||
if (example instanceof Map) { |
|||
example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT"); |
|||
} |
|||
|
|||
|
|||
Method method = example.getClass().getMethod("getOredCriteria", null); |
|||
//获取到条件数组,第一个是Criteria
|
|||
List list = (List) method.invoke(example); |
|||
if (CollectionUtil.isEmpty(list)) { |
|||
Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType(); |
|||
String exampleName = clazz.getName() + "Example"; |
|||
Object paramExample = Class.forName(exampleName).newInstance(); |
|||
Method createCriteria = paramExample.getClass().getMethod("createCriteria"); |
|||
Object criteria = createCriteria.invoke(paramExample); |
|||
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); |
|||
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); |
|||
list.add(criteria); |
|||
} else { |
|||
Object criteria = list.get(0); |
|||
Method getCriteria = criteria.getClass().getMethod("getCriteria"); |
|||
List params = (List) getCriteria.invoke(criteria); |
|||
boolean hasDel = false; |
|||
for (Object param : params) { |
|||
Method getCondition = param.getClass().getMethod("getCondition"); |
|||
Object condition = getCondition.invoke(param); |
|||
if ("rec_status =".equals(condition)) { |
|||
hasDel = true; |
|||
} |
|||
} |
|||
if (!hasDel) { |
|||
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); |
|||
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public Object plugin(Object target) { |
|||
return Plugin.wrap(target, this); |
|||
} |
|||
|
|||
@Override |
|||
public void setProperties(Properties properties) { |
|||
|
|||
} |
|||
|
|||
private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) { |
|||
MappedStatement.Builder builder = |
|||
new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType()); |
|||
builder.resource(ms.getResource()); |
|||
builder.fetchSize(ms.getFetchSize()); |
|||
builder.statementType(ms.getStatementType()); |
|||
builder.keyGenerator(ms.getKeyGenerator()); |
|||
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) { |
|||
StringBuilder keyProperties = new StringBuilder(); |
|||
for (String keyProperty : ms.getKeyProperties()) { |
|||
keyProperties.append(keyProperty).append(","); |
|||
} |
|||
keyProperties.delete(keyProperties.length() - 1, keyProperties.length()); |
|||
builder.keyProperty(keyProperties.toString()); |
|||
} |
|||
builder.timeout(ms.getTimeout()); |
|||
builder.parameterMap(ms.getParameterMap()); |
|||
builder.resultMaps(ms.getResultMaps()); |
|||
builder.resultSetType(ms.getResultSetType()); |
|||
builder.cache(ms.getCache()); |
|||
builder.flushCacheRequired(ms.isFlushCacheRequired()); |
|||
builder.useCache(ms.isUseCache()); |
|||
|
|||
return builder.build(); |
|||
} |
|||
|
|||
|
|||
// 定义一个内部辅助类,作用是包装sq
|
|||
class BoundSqlSqlSource implements SqlSource { |
|||
private BoundSql boundSql; |
|||
public BoundSqlSqlSource(BoundSql boundSql) { |
|||
this.boundSql = boundSql; |
|||
} |
|||
@Override |
|||
public BoundSql getBoundSql(Object parameterObject) { |
|||
return boundSql; |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.ccsens.signin.persist.dao; |
|||
|
|||
|
|||
import com.ccsens.signin.bean.vo.UserVo; |
|||
import com.ccsens.signin.persist.mapper.SysAuthMapper; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Repository |
|||
public interface SysAuthDao extends SysAuthMapper { |
|||
/** |
|||
* 查询关注了公众号的用户的openid |
|||
* @param userIds |
|||
* @return |
|||
*/ |
|||
List<UserVo.Oauth2WX> queryOauth2WX(List<Long> userIds); |
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.ccsens.signin.persist.dao; |
|||
|
|||
|
|||
import com.ccsens.signin.bean.vo.UserVo; |
|||
import com.ccsens.signin.persist.mapper.SysUserMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
@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); |
|||
|
|||
String getUserNameByUserId(@Param("userId") Long userId); |
|||
|
|||
void replaceComment(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
|||
|
|||
/** |
|||
* 查询用户信息 |
|||
* @param userId 用户id |
|||
* @return 用户信息 |
|||
*/ |
|||
UserVo.UserInfo getUserInfoByUserId(Long userId); |
|||
|
|||
/** |
|||
* 根据id查询用户信息 |
|||
* @param ids 用户id数组 |
|||
* @return 用户信息列表 |
|||
*/ |
|||
List<UserVo.UserInfo> queryUserInfos(Long[] ids); |
|||
/** |
|||
* 查找个人详细信息 |
|||
* @param currentUserId userId |
|||
* @return 个人信息 |
|||
*/ |
|||
UserVo.SelectUserInfo selectUserInfo(@Param("userId") Long currentUserId); |
|||
|
|||
/** |
|||
* 获取空间使用信息 |
|||
* @param currentUserId userId |
|||
* @return 目前只查询用户创建了几个项目 |
|||
*/ |
|||
UserVo.Interspace selectInterspace(@Param("userId") Long currentUserId); |
|||
|
|||
/** |
|||
* 查询登录返回的信息 |
|||
* @param userId |
|||
* @return |
|||
*/ |
|||
UserVo.TokenBean getTokenBeanByUserId(Long userId); |
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.ccsens.signin.persist.dao; |
|||
|
|||
import com.ccsens.signin.persist.mapper.SysUserInfoMapper; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
@Repository |
|||
public interface SysUserInfoDao extends SysUserInfoMapper { |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.signin.persist.mapper; |
|||
|
|||
import com.ccsens.signin.bean.po.SysAuth; |
|||
import com.ccsens.signin.bean.po.SysAuthExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysAuthMapper { |
|||
long countByExample(SysAuthExample example); |
|||
|
|||
int deleteByExample(SysAuthExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysAuth record); |
|||
|
|||
int insertSelective(SysAuth record); |
|||
|
|||
List<SysAuth> selectByExample(SysAuthExample example); |
|||
|
|||
SysAuth selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysAuth record, @Param("example") SysAuthExample example); |
|||
|
|||
int updateByExample(@Param("record") SysAuth record, @Param("example") SysAuthExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysAuth record); |
|||
|
|||
int updateByPrimaryKey(SysAuth record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.signin.persist.mapper; |
|||
|
|||
import com.ccsens.signin.bean.po.SysUserInfo; |
|||
import com.ccsens.signin.bean.po.SysUserInfoExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysUserInfoMapper { |
|||
long countByExample(SysUserInfoExample example); |
|||
|
|||
int deleteByExample(SysUserInfoExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysUserInfo record); |
|||
|
|||
int insertSelective(SysUserInfo record); |
|||
|
|||
List<SysUserInfo> selectByExample(SysUserInfoExample example); |
|||
|
|||
SysUserInfo selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysUserInfo record, @Param("example") SysUserInfoExample example); |
|||
|
|||
int updateByExample(@Param("record") SysUserInfo record, @Param("example") SysUserInfoExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysUserInfo record); |
|||
|
|||
int updateByPrimaryKey(SysUserInfo record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.signin.persist.mapper; |
|||
|
|||
import com.ccsens.signin.bean.po.SysUser; |
|||
import com.ccsens.signin.bean.po.SysUserExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysUserMapper { |
|||
long countByExample(SysUserExample example); |
|||
|
|||
int deleteByExample(SysUserExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysUser record); |
|||
|
|||
int insertSelective(SysUser record); |
|||
|
|||
List<SysUser> selectByExample(SysUserExample example); |
|||
|
|||
SysUser selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example); |
|||
|
|||
int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysUser record); |
|||
|
|||
int updateByPrimaryKey(SysUser record); |
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.ccsens.signin.service; |
|||
|
|||
import com.ccsens.signin.bean.dto.UserDto; |
|||
import com.ccsens.signin.bean.vo.UserVo; |
|||
|
|||
import javax.servlet.http.Part; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public interface IUserInfoService { |
|||
/** |
|||
* 修改登录的账号 |
|||
* @param userId 用户id |
|||
* @param changeAccount 验证码和新账号 |
|||
*/ |
|||
void updateAccount(Long userId, UserDto.UpdateAccount changeAccount); |
|||
|
|||
/** |
|||
* 修改昵称 |
|||
* @param userId 用户id |
|||
* @param updateNickname 新昵称 |
|||
*/ |
|||
void updateNickname(Long userId, UserDto.UpdateNickname updateNickname); |
|||
|
|||
/** |
|||
* 上传头像 |
|||
* @param currentUserId userId |
|||
* @param file 上传的文件 |
|||
* @throws Exception 文件异常 |
|||
*/ |
|||
void uploadAvatarUrl(Long currentUserId, Part file) throws Exception; |
|||
|
|||
/** |
|||
* 查找全部个人信息 |
|||
* @param currentUserId userId |
|||
* @return 个人信息 |
|||
*/ |
|||
UserVo.SelectUserInfo selectUserInfo(Long currentUserId); |
|||
|
|||
/** |
|||
* 修改个人详细信息 |
|||
* @param currentUserId userId |
|||
* @param updateUserInfo 需要修改的信息,为空则不需要修改 |
|||
* @return 返回当前用户的详细信息 |
|||
*/ |
|||
UserVo.SelectUserInfo updateUserInfo(Long currentUserId, UserDto.UpdateUserInfo updateUserInfo); |
|||
} |
@ -0,0 +1,110 @@ |
|||
package com.ccsens.signin.service; |
|||
|
|||
import com.ccsens.signin.bean.dto.UserDto; |
|||
import com.ccsens.signin.bean.po.SysUser; |
|||
import com.ccsens.signin.bean.vo.UserVo; |
|||
import com.ccsens.util.WebConstant; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public interface IUserService { |
|||
UserVo.UserSign signin(WebConstant.CLIENT_TYPE clientType, WebConstant.IDENTIFY_TYPE identifyType, |
|||
String identifier, String credential, String clientIp, String redirect) throws Exception; |
|||
|
|||
UserVo.TokenBean generateToken(WebConstant.CLIENT_TYPE client_type, Object subject, Map<String, Object> payLoads) throws Exception; |
|||
|
|||
UserVo.TokenBean getUserInfoAndToken(WebConstant.CLIENT_TYPE client_type, WebConstant.IDENTIFY_TYPE identify_type, UserVo.UserSign userSignVo, Map<String, Object> theMap) throws Exception; |
|||
|
|||
boolean tokenNotExistInCache(Long authId) throws Exception; |
|||
|
|||
UserVo.SmsCode getSignInSmsCode(String phone, String verificationCodeId, String verificationCodeValue) throws Exception; |
|||
|
|||
SysUser getUserById(Long aLong) throws Exception; |
|||
|
|||
UserVo.UserSign registerUser(UserDto.UserSignup userSignup)throws Exception; |
|||
|
|||
UserVo.UserSign bindingNewPhone(Long currentUserId, UserDto.WxBindingPhone wxPhone)throws Exception; |
|||
|
|||
String getPhone(Long userId); |
|||
|
|||
void updatePhone(Long currentUserId, UserDto.UpdatePhone updatePhone) throws Exception; |
|||
|
|||
Boolean findAccount(String account); |
|||
|
|||
Boolean findPhone(String phone); |
|||
|
|||
UserVo.UserSign saveAuth(UserDto.UserSignup userSignup); |
|||
|
|||
void updateAccount(UserDto.Account account); |
|||
|
|||
/** |
|||
* 通过手机号修改密码 |
|||
* @param passwordDto 手机号验证码 |
|||
*/ |
|||
void updatePassword(UserDto.UpdatePassword passwordDto) throws Exception; |
|||
|
|||
/** |
|||
* 通过账号密码修改密码 |
|||
* @param passwordDto 账号旧密码和新密码 |
|||
*/ |
|||
void updatePasswordByAccount(UserDto.UpdatePasswordByAccount passwordDto) throws Exception; |
|||
|
|||
/** |
|||
* 通过手机号查找userId |
|||
* @param phoneCell 手机号 |
|||
* @return userId |
|||
*/ |
|||
Long selectUserIdByPhone(String phoneCell)throws Exception; |
|||
|
|||
String selectAccountByPhone(String phone)throws Exception; |
|||
|
|||
// List<Long> selectUserIdByRoleId(Long roleId)throws Exception;
|
|||
//
|
|||
// Boolean getIsAttention(Long currentUserId, Long projectId);
|
|||
|
|||
// void userAttentionProject(Long currentUserId, ProjectDto.ProjectIdDto projectIdDto);
|
|||
|
|||
//默认注册
|
|||
/** |
|||
*@Description: 注冊用戶,若用戶手机号存在,则默认用户已注册,不做任何操作;若账号重复,则再名字后面添加_1(递增,直到不重复) |
|||
* @param signup |
|||
*@return: long |
|||
*@Author: wuhuijuan |
|||
*@date: 2019/10/29 14:43 |
|||
*/ |
|||
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); |
|||
|
|||
void relievePhone(Long userId, UserDto.WxBindingPhone phoneInfo); |
|||
|
|||
UserVo.UserSign changePhoneNotPassword(Long userId, UserDto.WxBindingPhone phoneInfo) throws Exception; |
|||
|
|||
UserVo.TokenBean getTokenByUserId(Long userId); |
|||
|
|||
void mergeUserId(Long userId, Long uselessId); |
|||
|
|||
UserVo.Account systemRegister(UserDto.UserSignupSystem userSignup); |
|||
|
|||
String getUserNameByUserId(Long userId); |
|||
|
|||
/** |
|||
* 根据id查询用户信息 |
|||
* @param ids |
|||
* @return |
|||
*/ |
|||
List<UserVo.UserInfo> queryUserInfos(Long[] ids); |
|||
|
|||
/** |
|||
* 获取图片验证码信息 |
|||
* @return 返回图片转成的base64字符串,和图片的id |
|||
*/ |
|||
UserVo.VerificationCode getVertifyCode(); |
|||
} |
@ -0,0 +1,258 @@ |
|||
package com.ccsens.signin.service; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.io.FileUtil; |
|||
import cn.hutool.core.lang.Snowflake; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import cn.hutool.core.util.ImageUtil; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.ccsens.signin.bean.dto.UserDto; |
|||
import com.ccsens.signin.bean.po.*; |
|||
import com.ccsens.signin.bean.vo.UserVo; |
|||
import com.ccsens.signin.persist.dao.SysAuthDao; |
|||
import com.ccsens.signin.persist.dao.SysUserDao; |
|||
import com.ccsens.signin.persist.dao.SysUserInfoDao; |
|||
import com.ccsens.signin.util.TallConstant; |
|||
import com.ccsens.util.*; |
|||
import com.ccsens.util.exception.BaseException; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.io.FileUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.servlet.http.Part; |
|||
import java.io.File; |
|||
import java.security.NoSuchAlgorithmException; |
|||
import java.security.spec.InvalidKeySpecException; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
|||
public class UserInfoService implements IUserInfoService{ |
|||
@Resource |
|||
private RedisUtil redisUtil; |
|||
@Resource |
|||
private SysAuthDao sysAuthDao; |
|||
@Resource |
|||
private SysUserDao sysUserDao; |
|||
// @Resource
|
|||
// private SysLabelDao sysLabelDao;
|
|||
@Resource |
|||
private SysUserInfoDao sysUserInfoDao; |
|||
@Resource |
|||
private Snowflake snowflake; |
|||
|
|||
@Override |
|||
public void updateAccount(Long userId, UserDto.UpdateAccount changeAccount) { |
|||
//判断验证码是否正确
|
|||
if (redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(changeAccount.getPhone()))) { |
|||
if (changeAccount.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(changeAccount.getPhone())).toString())) { |
|||
//查找redis该账号是否正在使用
|
|||
String accountKey = TallConstant.getUpdateAccount(changeAccount.getAccount()); |
|||
if(redisUtil.hasKey(accountKey)){ |
|||
throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); |
|||
} |
|||
//未查到则存进redis时效一分钟
|
|||
redisUtil.set(accountKey,changeAccount.getAccount(),60); |
|||
//检查数据库内账号是否存在
|
|||
SysAuthExample sysAuthExample = new SysAuthExample(); |
|||
sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) |
|||
.andIdentifierEqualTo(changeAccount.getAccount()); |
|||
List<SysAuth> sysAuthList = sysAuthDao.selectByExample(sysAuthExample); |
|||
if(CollectionUtil.isNotEmpty(sysAuthList)){ |
|||
throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); |
|||
} |
|||
//修改账号
|
|||
SysAuthExample authAccountExample = new SysAuthExample(); |
|||
authAccountExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); |
|||
List<SysAuth> authList = sysAuthDao.selectByExample(authAccountExample); |
|||
if(CollectionUtil.isNotEmpty(authList)){ |
|||
authList.forEach(sysAuth -> { |
|||
//验证密码
|
|||
try { |
|||
if (!ShiroKit.authenticate(changeAccount.getPassword(), sysAuth.getCredential(), sysAuth.getSalt())) { |
|||
throw new BaseException(CodeEnum.PASSWORD_ERROR); |
|||
} |
|||
sysAuth.setIdentifier(changeAccount.getAccount()); |
|||
sysAuthDao.updateByPrimaryKeySelective(sysAuth); |
|||
} catch (NoSuchAlgorithmException e) { |
|||
e.printStackTrace(); |
|||
} catch (InvalidKeySpecException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
}); |
|||
}else { |
|||
//不存在则添加账号
|
|||
SysAuth sysAuth = new SysAuth(); |
|||
sysAuth.setId(snowflake.nextId()); |
|||
sysAuth.setUserId(userId); |
|||
sysAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); |
|||
sysAuth.setIdentifier(changeAccount.getAccount()); |
|||
sysAuth.setSalt(ShiroKit.getRandomSalt(6)); |
|||
sysAuth.setCredential(ShiroKit.md5(changeAccount.getPassword(), sysAuth.getSalt())); |
|||
sysAuthDao.insertSelective(sysAuth); |
|||
} |
|||
//修改完删除redis
|
|||
redisUtil.del(accountKey); |
|||
}else { |
|||
throw new BaseException(CodeEnum.SMS_CODE_CORRECT); |
|||
} |
|||
}else { |
|||
throw new BaseException(CodeEnum.SMS_CODE_CORRECT); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void updateNickname(Long userId, UserDto.UpdateNickname updateNickname) { |
|||
//查找redis该昵称是否正在使用
|
|||
String nicknameKey = TallConstant.getUpdateNickname(updateNickname.getNickname()); |
|||
if(redisUtil.hasKey(nicknameKey)){ |
|||
throw new BaseException(CodeEnum.NICKNAME_REPEAT); |
|||
} |
|||
//未查到则存进redis时效一分钟
|
|||
redisUtil.set(nicknameKey,updateNickname.getNickname(),60); |
|||
//查找数据库此昵称是否存在
|
|||
SysUserExample sysUserExample = new SysUserExample(); |
|||
sysUserExample.createCriteria().andNicknameEqualTo(updateNickname.getNickname()); |
|||
List<SysUser> userList = sysUserDao.selectByExample(sysUserExample); |
|||
if(CollectionUtil.isNotEmpty(userList)){ |
|||
throw new BaseException(CodeEnum.NICKNAME_REPEAT); |
|||
} |
|||
SysUser user = sysUserDao.selectByPrimaryKey(userId); |
|||
if(ObjectUtil.isNotNull(user)){ |
|||
user.setNickname(updateNickname.getNickname()); |
|||
sysUserDao.updateByPrimaryKeySelective(user); |
|||
} |
|||
redisUtil.del(nicknameKey); |
|||
} |
|||
|
|||
@Override |
|||
public void uploadAvatarUrl(Long currentUserId, Part file) throws Exception { |
|||
//获取文件大小
|
|||
float fileSize = (float) file.getSize(); |
|||
System.out.println(fileSize); |
|||
//计算出倍数
|
|||
float a = (float)(80 * 1024) / fileSize; |
|||
System.out.println(a); |
|||
//限制文件格式
|
|||
String allowedExts = "png,jpg,jpeg"; |
|||
String original = UploadFileUtil_Servlet3.getFileNameByPart(file); |
|||
String ext = FileUtil.extName(original); |
|||
if (StrUtil.isEmpty(ext) || !allowedExts.contains(ext)){ |
|||
throw new NotSupportedFileTypeException("不支持的格式类型: " + ext); |
|||
} |
|||
//创建文件目录及名字
|
|||
String extraPath = DateUtil.format(new Date(), "yyyyMMdd"); |
|||
//上传的文件
|
|||
String temporaryFilePath = File.separator + IdUtil.simpleUUID() + "." + ext; |
|||
File temporaryFile = new File(WebConstant.UPLOAD_AVATAR_URL + extraPath + temporaryFilePath); |
|||
FileUtils.copyInputStreamToFile(file.getInputStream(), temporaryFile); |
|||
//压缩后的文件
|
|||
String compressFilePath = File.separator + IdUtil.simpleUUID() + "." + ext; |
|||
File compressFile = new File(WebConstant.UPLOAD_AVATAR_URL+ extraPath + compressFilePath); |
|||
//文件大于80k则进行压缩,否则不压缩
|
|||
if(a < 1) { |
|||
ImageUtil.scale(temporaryFile, compressFile, a); |
|||
} |
|||
//获取文件的压缩前的文件名
|
|||
String fullPath = WebConstant.UPLOAD_PATH_AVATAR_URL + File.separator + extraPath + temporaryFilePath; |
|||
//压缩前和压缩后的文件都存在则删除压缩前的文件
|
|||
if(temporaryFile.exists() && compressFile.exists()){ |
|||
FileUtil.del(temporaryFile); |
|||
//压缩成功后获取压缩后的文件名
|
|||
fullPath = WebConstant.UPLOAD_PATH_AVATAR_URL + File.separator + extraPath + compressFilePath; |
|||
} |
|||
|
|||
//查找到当前的用户,修改头像路径信息
|
|||
SysUser sysUser = sysUserDao.selectByPrimaryKey(currentUserId); |
|||
|
|||
sysUser.setAvatarUrl(PropUtil.gatewayUrl + WebConstant.TALL_UPLOADS + fullPath); |
|||
sysUserDao.updateByPrimaryKeySelective(sysUser); |
|||
} |
|||
|
|||
@Override |
|||
public UserVo.SelectUserInfo selectUserInfo(Long currentUserId){ |
|||
UserVo.SelectUserInfo selectUserInfo = sysUserDao.selectUserInfo(currentUserId); |
|||
if(ObjectUtil.isNotNull(selectUserInfo)){ |
|||
//计算注册时长
|
|||
if(ObjectUtil.isNotNull(selectUserInfo.getCreatedAt())){ |
|||
long now = System.currentTimeMillis(); |
|||
selectUserInfo.setDayOfUseTall((int) ((now - selectUserInfo.getCreatedAt().getTime()) / 1000 / 3600 / 24)); |
|||
} |
|||
// //获取标签信息
|
|||
// selectUserInfo.setLabelList(sysLabelDao.selectLabelByUserId(currentUserId,null,null));
|
|||
//获取空间使用信息
|
|||
UserVo.Interspace interspace = sysUserDao.selectInterspace(currentUserId); |
|||
selectUserInfo.setInterspace(interspace); |
|||
} |
|||
|
|||
return selectUserInfo; |
|||
} |
|||
|
|||
@Override |
|||
public UserVo.SelectUserInfo updateUserInfo(Long currentUserId, UserDto.UpdateUserInfo updateUserInfo) { |
|||
//查找用户
|
|||
SysUser user = sysUserDao.selectByPrimaryKey(updateUserInfo.getId()); |
|||
if(ObjectUtil.isNull(user)){ |
|||
throw new BaseException(CodeEnum.NOT_USER); |
|||
} |
|||
//查找用户详细信息的记录
|
|||
SysUserInfo sysUserInfo; |
|||
SysUserInfoExample sysUserInfoExample = new SysUserInfoExample(); |
|||
sysUserInfoExample.createCriteria().andUserIdEqualTo(updateUserInfo.getId()); |
|||
List<SysUserInfo> sysUserInfoList = sysUserInfoDao.selectByExample(sysUserInfoExample); |
|||
if(CollectionUtil.isNotEmpty(sysUserInfoList)){ |
|||
sysUserInfo = sysUserInfoList.get(0); |
|||
}else { |
|||
sysUserInfo = new SysUserInfo(); |
|||
sysUserInfo.setId(snowflake.nextId()); |
|||
sysUserInfo.setUserId(updateUserInfo.getId()); |
|||
sysUserInfoDao.insertSelective(sysUserInfo); |
|||
} |
|||
//修改昵称
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getNickname())){ |
|||
UserDto.UpdateNickname updateNickname = new UserDto.UpdateNickname(); |
|||
updateNickname.setNickname(updateUserInfo.getNickname()); |
|||
updateNickname(updateUserInfo.getId(),updateNickname); |
|||
} |
|||
//个人签名
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getSignature())){ |
|||
sysUserInfo.setSignature(updateUserInfo.getSignature()); |
|||
} |
|||
//个人简介
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getIntroduction())){ |
|||
sysUserInfo.setIntroduction(updateUserInfo.getIntroduction()); |
|||
} |
|||
//生日
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getBirthday())){ |
|||
sysUserInfo.setBirthday(updateUserInfo.getBirthday()); |
|||
} |
|||
//所在地
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getAddress())){ |
|||
sysUserInfo.setAddress(updateUserInfo.getAddress()); |
|||
} |
|||
//网页
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getWebPath())){ |
|||
sysUserInfo.setWebPath(updateUserInfo.getWebPath()); |
|||
} |
|||
//公司
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getCompany())){ |
|||
sysUserInfo.setCompany(updateUserInfo.getCompany()); |
|||
} |
|||
//职位
|
|||
if(StrUtil.isNotEmpty(updateUserInfo.getPosition())){ |
|||
sysUserInfo.setPosition(updateUserInfo.getPosition()); |
|||
} |
|||
sysUserInfoDao.updateByPrimaryKeySelective(sysUserInfo); |
|||
return selectUserInfo(updateUserInfo.getId()); |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,55 @@ |
|||
package com.ccsens.signin.util; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public class TallConstant { |
|||
|
|||
/*** redis key: 修改账号*/ |
|||
public static final String UPDATE_ACCOUNT = "update_account_"; |
|||
/*** redis key: 修改账号*/ |
|||
public static final String UPDATE_NICKNAME = "update_nickname_"; |
|||
/*** redis key: 查找登陆用户 格式 identifier_login_identifyType 有效期一天*/ |
|||
public static final String LOGIN = "_login_"; |
|||
/*** (需要特殊处理的插件)个人任务汇报插件*/ |
|||
public static final String PERSONAL_TASK_REPORT = "personal_task_report"; |
|||
|
|||
/***一天 */ |
|||
public static final long LOGIN_TIME = 60 * 60 * 24; |
|||
|
|||
/** |
|||
* 接口发送的信息模板 |
|||
* @param operateType 接口code |
|||
* @return |
|||
*/ |
|||
public static String getRobotTemplateKey(int operateType) { |
|||
return "operate_type_" + operateType; |
|||
} |
|||
|
|||
public static String getUpdateAccount(String account){ |
|||
return UPDATE_ACCOUNT + account; |
|||
} |
|||
|
|||
public static String getUpdateNickname(String nickname){ |
|||
return UPDATE_ACCOUNT + nickname; |
|||
} |
|||
|
|||
public static final class TaskRemindTiming { |
|||
/**不提醒*/ |
|||
public static final byte REMIND_NONE = 0; |
|||
/**开始前*/ |
|||
public static final byte REMIND_TASK_BEFORE_START = 1; |
|||
/**开始时*/ |
|||
public static final byte REMIND_TASK_START = 2; |
|||
/**开始后*/ |
|||
public static final byte REMIND_TASK_AFTER_START = 3; |
|||
/**结束前*/ |
|||
public static final byte REMIND_TASK_BEFORE_END = 4; |
|||
/**结束时*/ |
|||
public static final byte REMIND_TASK_END = 5; |
|||
/**结束后*/ |
|||
public static final byte REMIND_TASK_AFTER_END = 6; |
|||
/**自定义*/ |
|||
public static final byte REMIND_TASK_USER_DEFINED = 7; |
|||
} |
|||
} |
@ -0,0 +1,168 @@ |
|||
package com.ccsens.signin.util; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.ccsens.util.WechatUtil; |
|||
import com.ccsens.util.wx.WxGzhUtil; |
|||
import com.ccsens.util.wx.WxTemplateMessage; |
|||
|
|||
|
|||
/** |
|||
* @description: 微信模板 |
|||
* @author: whj |
|||
* @time: 2020/6/9 11:07 |
|||
*/ |
|||
public class WxTemplateUtil { |
|||
|
|||
/** |
|||
* 设置小程序跳转 |
|||
* @param projectId |
|||
* @return |
|||
*/ |
|||
private static WxTemplateMessage getWxTemplateMessage(Long projectId) { |
|||
String url = String.format(WechatUtil.PROJECT_URL, projectId); |
|||
WxTemplateMessage.MiniProgram miniProgram = new WxTemplateMessage.MiniProgram(WechatUtil.appid,url); |
|||
|
|||
WxTemplateMessage message = new WxTemplateMessage(); |
|||
message.setMiniprogram(miniProgram); |
|||
return message; |
|||
} |
|||
|
|||
/** |
|||
* 完成任务提醒(备注是在切面处统一加的) |
|||
* @param projectId |
|||
* @param userName |
|||
* @param operation |
|||
* @param taskName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getFinishTask(Long projectId, String userName, String operation, String taskName){ |
|||
|
|||
WxTemplateMessage message = getWxTemplateMessage(projectId); |
|||
message.setTemplate_id(WxGzhUtil.Template.TASK_FINISH.templateId); |
|||
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
|||
data.setFirst(new WxTemplateMessage.TemplateSettings(userName + operation + taskName)); |
|||
data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); |
|||
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
|||
message.setData(data); |
|||
return message; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 添加任务(备注是在切面处统一加的) |
|||
* @param projectId |
|||
* @param userName |
|||
* @param taskName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getAddTask(Long projectId, String userName, String taskName) { |
|||
WxTemplateMessage message = getWxTemplateMessage(projectId); |
|||
message.setTemplate_id(WxGzhUtil.Template.TASK_ADD.templateId); |
|||
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
|||
data.setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}添加了{}任务", userName, taskName))); |
|||
data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); |
|||
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
|||
message.setData(data); |
|||
return message; |
|||
} |
|||
|
|||
/** |
|||
* 删除任务 |
|||
* @param projectId |
|||
* @param userName |
|||
* @param taskName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getDeleteTask(Long projectId, String userName, String taskName) { |
|||
WxTemplateMessage message = getWxTemplateMessage(projectId); |
|||
message.setTemplate_id(WxGzhUtil.Template.TASK_DELETE.templateId); |
|||
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
|||
data.setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}删除了{}任务", userName, taskName))); |
|||
data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); |
|||
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
|||
data.setKeyword3(new WxTemplateMessage.TemplateSettings("")); |
|||
message.setData(data); |
|||
return message; |
|||
} |
|||
|
|||
/** |
|||
* 修改任务 |
|||
* @param projectId |
|||
* @param userName |
|||
* @param taskName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getChangeTask(Long projectId, String userName, String taskName) { |
|||
WxTemplateMessage message = getAddTask(projectId, userName, taskName); |
|||
message.getData().setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}修改了{}任务", userName, taskName))); |
|||
return message; |
|||
} |
|||
|
|||
/** |
|||
* 上传交付物 |
|||
* @param projectId |
|||
* @param userName |
|||
* @param deliverName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getAddDeliver(Long projectId, String userName, String deliverName) { |
|||
WxTemplateMessage message = getWxTemplateMessage(projectId); |
|||
message.setTemplate_id(WxGzhUtil.Template.TASK_PROGRESS.templateId); |
|||
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
|||
data.setFirst(new WxTemplateMessage.TemplateSettings("")); |
|||
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "上传了" + deliverName)); |
|||
data.setKeyword2(new WxTemplateMessage.TemplateSettings("上传交付物")); |
|||
message.setData(data); |
|||
return message; |
|||
} |
|||
|
|||
/** |
|||
* 删除交付物 |
|||
* @param projectId |
|||
* @param userName |
|||
* @param deliverName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getDeleteDeliver(Long projectId, String userName, String deliverName) { |
|||
WxTemplateMessage message = getAddDeliver(projectId, userName, deliverName); |
|||
WxTemplateMessage.TemplateData data = message.getData(); |
|||
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "删除了" + deliverName)); |
|||
data.setKeyword2(new WxTemplateMessage.TemplateSettings("删除交付物")); |
|||
message.setData(data); |
|||
return message; |
|||
} |
|||
|
|||
/** |
|||
* 检查交付物 |
|||
* @param projectId |
|||
* @param userName |
|||
* @param deliverName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getCheckDeliver(Long projectId, String userName, String deliverName) { |
|||
WxTemplateMessage message = getAddDeliver(projectId, userName, deliverName); |
|||
WxTemplateMessage.TemplateData data = message.getData(); |
|||
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "检查了" + deliverName)); |
|||
data.setKeyword2(new WxTemplateMessage.TemplateSettings("检查交付物")); |
|||
message.setData(data); |
|||
return message; |
|||
} |
|||
|
|||
/** |
|||
* 发表评论 |
|||
* @param projectId |
|||
* @param userName |
|||
* @return |
|||
*/ |
|||
public static WxTemplateMessage getAddComment(Long projectId, String userName) { |
|||
WxTemplateMessage message = getWxTemplateMessage(projectId); |
|||
message.setTemplate_id(WxGzhUtil.Template.TASK_PROGRESS.templateId); |
|||
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
|||
data.setFirst(new WxTemplateMessage.TemplateSettings(userName + "进行了点评")); |
|||
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName)); |
|||
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
|||
message.setData(data); |
|||
return message; |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
logging: |
|||
level: |
|||
com: |
|||
favorites: DEBUG |
|||
org: |
|||
hibernate: ERROR |
|||
springframework: |
|||
web: DEBUG |
|||
mybatis: |
|||
config-location: classpath:mybatis/mybatis-config.xml |
|||
mapper-locations: classpath*:mapper_*/*.xml |
|||
type-aliases-package: com.ccsens.ht.bean |
|||
server: |
|||
tomcat: |
|||
uri-encoding: UTF-8 |
|||
spring: |
|||
http: |
|||
encoding: |
|||
charset: UTF-8 |
|||
enabled: true |
|||
force: true |
|||
log-request-details: true |
|||
servlet: |
|||
multipart: |
|||
max-file-size: 10MB |
|||
max-request-size: 100MB |
|||
|
|||
|
@ -0,0 +1,41 @@ |
|||
server: |
|||
port: 7130 |
|||
servlet: |
|||
context-path: |
|||
spring: |
|||
snowflake: |
|||
datacenterId: 1 |
|||
workerId: 1 |
|||
application: |
|||
name: signin |
|||
datasource: |
|||
type: com.alibaba.druid.pool.DruidDataSource |
|||
rabbitmq: |
|||
host: 192.168.0.99 |
|||
password: 111111 |
|||
port: 5672 |
|||
username: admin |
|||
redis: |
|||
database: 0 |
|||
host: 127.0.0.1 |
|||
jedis: |
|||
pool: |
|||
max-active: 200 |
|||
max-idle: 10 |
|||
max-wait: -1ms |
|||
min-idle: 0 |
|||
password: '' |
|||
port: 6379 |
|||
timeout: 1000ms |
|||
swagger: |
|||
enable: true |
|||
|
|||
gatewayUrl: https://test.tall.wiki/gateway/ |
|||
notGatewayUrl: /home/staticrec/logo.png |
|||
smsCode: 0 |
|||
wx: |
|||
prefixUrl: https://test.tall.wiki/wxconfigurer-api/ |
|||
file: |
|||
path: /home/cloud/tall/uploads/ |
|||
domain: http://localhost:7030/v1.0/ |
|||
imgDomain: http://localhost:7030/v1.0/uploads |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue