Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
8fe103fd
Commit
8fe103fd
authored
Aug 31, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邀请码
parent
5adb8c9c
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
5035 additions
and
0 deletions
+5035
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/InvitationCodeController.java
...om/wwdz/ch/admin/controller/InvitationCodeController.java
+69
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/InvitationCodeServiceImpl.java
...ava/com/wwdz/ch/admin/impl/InvitationCodeServiceImpl.java
+93
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/InviteRecordServiceImpl.java
.../java/com/wwdz/ch/admin/impl/InviteRecordServiceImpl.java
+70
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/InvitationCodeService.java
...java/com/wwdz/ch/admin/service/InvitationCodeService.java
+20
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/InviteRecordService.java
...n/java/com/wwdz/ch/admin/service/InviteRecordService.java
+21
-0
ch-core/src/main/java/com/wwdz/ch/core/consts/InvitationCodeStateEnum.java
...java/com/wwdz/ch/core/consts/InvitationCodeStateEnum.java
+36
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/InvitationCodeDao.java
...o/src/main/java/com/wwdz/ch/db/dao/InvitationCodeDao.java
+23
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/InviteRecordDao.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/InviteRecordDao.java
+17
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/InvitationCode.java
...o/src/main/java/com/wwdz/ch/db/domain/InvitationCode.java
+323
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/InvitationCodeExample.java
...ain/java/com/wwdz/ch/db/domain/InvitationCodeExample.java
+1775
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/InviteRecord.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/InviteRecord.java
+275
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/InviteRecordExample.java
.../main/java/com/wwdz/ch/db/domain/InviteRecordExample.java
+1115
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/InvitationCodeRequestDto.java
.../com/wwdz/ch/db/dto/request/InvitationCodeRequestDto.java
+66
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/InviteRecordRequestDto.java
...va/com/wwdz/ch/db/dto/request/InviteRecordRequestDto.java
+38
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/InvitationCodeDaoImpl.java
.../main/java/com/wwdz/ch/db/impl/InvitationCodeDaoImpl.java
+73
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/InviteRecordDaoImpl.java
...rc/main/java/com/wwdz/ch/db/impl/InviteRecordDaoImpl.java
+51
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/InvitationCodeMapper.java
...main/java/com/wwdz/ch/db/mapper/InvitationCodeMapper.java
+69
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/InviteRecordMapper.java
...c/main/java/com/wwdz/ch/db/mapper/InviteRecordMapper.java
+70
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/InvitationCodeMapper.xml
.../resources/com/wwdz/ch/db/mapper/InvitationCodeMapper.xml
+404
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/InviteRecordMapper.xml
...in/resources/com/wwdz/ch/db/mapper/InviteRecordMapper.xml
+321
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/InviteRecordServiceImpl.java
...ain/java/com/wwdz/ch/wx/impl/InviteRecordServiceImpl.java
+85
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/InviteRecordService.java
...main/java/com/wwdz/ch/wx/service/InviteRecordService.java
+21
-0
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/InvitationCodeController.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.admin.controller
;
import
com.wwdz.ch.admin.annotation.RequiresPermissionsDesc
;
import
com.wwdz.ch.admin.service.InvitationCodeService
;
import
com.wwdz.ch.admin.util.AuthSupport
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.dto.request.InvitationCodeRequestDto
;
import
com.xxdxxs.utils.JsonUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 邀请码管理
*/
@RestController
@RequestMapping
(
"/admin/invitationCode"
)
public
class
InvitationCodeController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ItemController
.
class
);
@Autowired
InvitationCodeService
invitationCodeService
;
@RequiresPermissionsDesc
(
menu
=
{
"邀请码管理"
,
"生成邀请码"
},
button
=
"新增"
)
@PostMapping
(
"/create"
)
public
Result
create
(
@RequestBody
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 邀请码管理->生成邀请码->新增,请求参数:parma:{}"
,
invitationCodeRequestDto
);
Result
result
=
invitationCodeService
.
create
(
invitationCodeRequestDto
);
logger
.
info
(
"【请求结束】邀请码管理->生成邀请码->新增:result:{}"
,
JsonUtils
.
from
(
result
));
return
result
;
}
@RequiresPermissionsDesc
(
menu
=
{
"邀请码管理"
,
"邀请码列表"
},
button
=
"查询"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 邀请码管理->邀请码列表->查询,请求参数:parma:{}"
,
invitationCodeRequestDto
);
Result
result
=
invitationCodeService
.
findList
(
invitationCodeRequestDto
);
logger
.
info
(
"【请求结束】邀请码管理->邀请码列表->查询:result:{}"
,
JsonUtils
.
from
(
result
));
return
result
;
}
@RequiresPermissionsDesc
(
menu
=
{
"邀请码管理"
,
"邀请码详情"
},
button
=
"查询"
)
@PostMapping
(
"/findDetails"
)
public
Result
findDetails
(
@RequestBody
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 邀请码管理->邀请码详情->查询,请求参数:parma:{}"
,
invitationCodeRequestDto
);
Result
result
=
invitationCodeService
.
findList
(
invitationCodeRequestDto
);
logger
.
info
(
"【请求结束】邀请码管理->邀请码详情->查询:result:{}"
,
JsonUtils
.
from
(
result
));
return
result
;
}
@RequiresPermissionsDesc
(
menu
=
{
"邀请码管理"
,
"邀请码详情"
},
button
=
"更新"
)
@PostMapping
(
"/setInvalid"
)
public
Result
setInvalid
(
@RequestBody
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 邀请码管理->设置无效->更新,请求参数:parma:{}"
,
invitationCodeRequestDto
);
Result
result
=
invitationCodeService
.
updateState
(
invitationCodeRequestDto
);
logger
.
info
(
"【请求结束】邀请码管理->设置无效->更新:result:{}"
,
JsonUtils
.
from
(
result
));
return
result
;
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/InvitationCodeServiceImpl.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.admin.impl
;
import
com.wwdz.ch.admin.service.InvitationCodeService
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.CharUtil
;
import
com.wwdz.ch.db.dao.InvitationCodeDao
;
import
com.wwdz.ch.db.domain.InvitationCode
;
import
com.wwdz.ch.db.dto.request.InvitationCodeRequestDto
;
import
com.xxdxxs.utils.EntityMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
InvitationCodeServiceImpl
implements
InvitationCodeService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
InvitationCodeServiceImpl
.
class
);
@Autowired
InvitationCodeDao
invitationCodeDao
;
@Override
public
Result
create
(
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
try
{
Date
now
=
new
Date
();
InvitationCode
invitationCode
=
new
InvitationCode
();
EntityMapper
.
copyAttribute
(
invitationCodeRequestDto
,
invitationCode
);
invitationCode
.
setCreateTime
(
now
);
invitationCode
.
setUpdateTime
(
now
);
String
code
=
CharUtil
.
getInvitationCode
(
6
);
if
(
invitationCodeDao
.
isExisted
(
code
))
{
logger
.
info
(
"邀请码 : {} 已经存在,"
,
code
);
code
=
CharUtil
.
getInvitationCode
(
6
);
logger
.
info
(
"再一次生成新的邀请码 : {}"
,
code
);
}
invitationCode
.
setCode
(
code
);
invitationCodeDao
.
create
(
invitationCode
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"生成邀请码错误 : {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
update
(
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
try
{
return
null
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
@Override
public
Result
updateState
(
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
try
{
invitationCodeDao
.
updateState
(
invitationCodeRequestDto
.
getCode
(),
invitationCodeRequestDto
.
getState
());
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"更新邀请码状态错误 : {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
findList
(
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
return
null
;
}
@Override
public
Result
findByPage
(
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
return
null
;
}
@Override
public
Result
findDetails
(
InvitationCodeRequestDto
invitationCodeRequestDto
)
{
try
{
List
<
InvitationCode
>
list
=
invitationCodeDao
.
findList
(
invitationCodeRequestDto
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
Result
.
failed
(
"邀请码不存在"
);
}
InvitationCode
invitationCode
=
list
.
get
(
0
);
return
null
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/InviteRecordServiceImpl.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.admin.impl
;
import
com.wwdz.ch.admin.service.InviteRecordService
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.InvitationCodeDao
;
import
com.wwdz.ch.db.dao.InviteRecordDao
;
import
com.wwdz.ch.db.domain.InvitationCode
;
import
com.wwdz.ch.db.domain.InviteRecord
;
import
com.wwdz.ch.db.dto.request.InvitationCodeRequestDto
;
import
com.wwdz.ch.db.dto.request.InviteRecordRequestDto
;
import
com.xxdxxs.utils.EntityMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
InviteRecordServiceImpl
implements
InviteRecordService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
InviteRecordServiceImpl
.
class
);
@Autowired
InviteRecordDao
inviteRecordDao
;
@Autowired
InvitationCodeDao
invitationCodeDao
;
@Override
public
Result
create
(
InviteRecordRequestDto
dto
)
{
try
{
//查询邀请码信息
InvitationCodeRequestDto
invitationCodeRequestDto
=
new
InvitationCodeRequestDto
();
invitationCodeRequestDto
.
setCode
(
dto
.
getInvitationCode
());
List
<
InvitationCode
>
invitationCodeList
=
invitationCodeDao
.
findList
(
invitationCodeRequestDto
);
if
(
CollectionUtils
.
isEmpty
(
invitationCodeList
))
{
return
Result
.
failed
(
"邀请码错误"
);
}
InvitationCode
invitationCode
=
invitationCodeList
.
get
(
0
);
InviteRecord
inviteRecord
=
new
InviteRecord
();
EntityMapper
.
copyAttribute
(
dto
,
inviteRecord
);
inviteRecord
.
setCreateTime
(
new
Date
());
//邀请人
inviteRecord
.
setInviter
(
invitationCode
.
getApplicant
());
inviteRecordDao
.
create
(
inviteRecord
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"邀请码使用失败:{}"
,
e
);
}
return
Result
.
failed
(
"使用邀请码失败"
);
}
@Override
public
Result
isExisted
(
String
phone
)
{
return
null
;
}
@Override
public
Result
findList
(
InviteRecordRequestDto
dto
)
{
return
null
;
}
@Override
public
Result
checkCode
(
InviteRecordRequestDto
dto
)
{
return
null
;
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/InvitationCodeService.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.admin.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.InvitationCodeRequestDto
;
public
interface
InvitationCodeService
{
Result
create
(
InvitationCodeRequestDto
invitationCodeRequestDto
);
Result
update
(
InvitationCodeRequestDto
invitationCodeRequestDto
);
Result
updateState
(
InvitationCodeRequestDto
invitationCodeRequestDto
);
Result
findList
(
InvitationCodeRequestDto
invitationCodeRequestDto
);
Result
findDetails
(
InvitationCodeRequestDto
invitationCodeRequestDto
);
Result
findByPage
(
InvitationCodeRequestDto
invitationCodeRequestDto
);
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/InviteRecordService.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.admin.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.InviteRecordRequestDto
;
public
interface
InviteRecordService
{
Result
create
(
InviteRecordRequestDto
dto
);
Result
isExisted
(
String
phone
);
Result
findList
(
InviteRecordRequestDto
dto
);
/**
* 校验邀请码
* @param dto
* @return
*/
Result
checkCode
(
InviteRecordRequestDto
dto
);
}
ch-core/src/main/java/com/wwdz/ch/core/consts/InvitationCodeStateEnum.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.core.consts
;
public
enum
InvitationCodeStateEnum
{
Not_used
(
0
,
"未使用"
),
part_used
(
1
,
"部分使用"
),
all_used
(
2
,
"全部使用"
),
expired
(
3
,
"已过期"
),
invalid
(
6
,
"已失效"
),
;
private
int
code
;
private
String
des
;
InvitationCodeStateEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
InvitationCodeStateEnum
invitationCodeStateEnum
:
InvitationCodeStateEnum
.
values
())
{
if
(
code
==
invitationCodeStateEnum
.
getCode
())
{
return
invitationCodeStateEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/InvitationCodeDao.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.dao
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.domain.InvitationCode
;
import
com.wwdz.ch.db.dto.request.InvitationCodeRequestDto
;
import
java.util.List
;
public
interface
InvitationCodeDao
{
boolean
create
(
InvitationCode
invitationCode
);
boolean
update
(
InvitationCode
invitationCode
);
boolean
isExisted
(
String
code
);
boolean
updateState
(
String
code
,
Integer
state
);
List
<
InvitationCode
>
findList
(
InvitationCodeRequestDto
dto
);
PageInfo
<
InvitationCode
>
findByPage
(
InvitationCodeRequestDto
dto
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/InviteRecordDao.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.InviteRecord
;
import
com.wwdz.ch.db.dto.request.InviteRecordRequestDto
;
import
java.util.List
;
public
interface
InviteRecordDao
{
boolean
create
(
InviteRecord
inviteRecord
);
boolean
isExisted
(
String
phone
);
List
<
InviteRecord
>
findList
(
InviteRecordRequestDto
dto
);
long
countByCode
(
String
invitationCode
);
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/InvitationCode.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2023/08/31
*/
@Data
public
class
InvitationCode
implements
Entity
{
/**
* id
*/
private
Long
id
;
/**
* 邀请码
*/
private
String
code
;
/**
* 有效期起始时间
*/
private
Date
effectiveStartTime
;
/**
* 有效期结束时间
*/
private
Date
effectiveEndTime
;
/**
* 可使用的人数
*/
private
Integer
enabledNum
;
/**
* 申请人
*/
private
Long
applicant
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建人
*/
private
Integer
creator
;
/**
* 状态
*/
private
Integer
state
;
/**
* 备注
*/
private
String
remark
;
private
static
final
long
serialVersionUID
=
1L
;
@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
(
", code="
).
append
(
code
);
sb
.
append
(
", effectiveStartTime="
).
append
(
effectiveStartTime
);
sb
.
append
(
", effectiveEndTime="
).
append
(
effectiveEndTime
);
sb
.
append
(
", enabledNum="
).
append
(
enabledNum
);
sb
.
append
(
", applicant="
).
append
(
applicant
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", creator="
).
append
(
creator
);
sb
.
append
(
", state="
).
append
(
state
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
InvitationCode
other
=
(
InvitationCode
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getCode
()
==
null
?
other
.
getCode
()
==
null
:
this
.
getCode
().
equals
(
other
.
getCode
()))
&&
(
this
.
getEffectiveStartTime
()
==
null
?
other
.
getEffectiveStartTime
()
==
null
:
this
.
getEffectiveStartTime
().
equals
(
other
.
getEffectiveStartTime
()))
&&
(
this
.
getEffectiveEndTime
()
==
null
?
other
.
getEffectiveEndTime
()
==
null
:
this
.
getEffectiveEndTime
().
equals
(
other
.
getEffectiveEndTime
()))
&&
(
this
.
getEnabledNum
()
==
null
?
other
.
getEnabledNum
()
==
null
:
this
.
getEnabledNum
().
equals
(
other
.
getEnabledNum
()))
&&
(
this
.
getApplicant
()
==
null
?
other
.
getApplicant
()
==
null
:
this
.
getApplicant
().
equals
(
other
.
getApplicant
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getCreator
()
==
null
?
other
.
getCreator
()
==
null
:
this
.
getCreator
().
equals
(
other
.
getCreator
()))
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getRemark
()
==
null
?
other
.
getRemark
()
==
null
:
this
.
getRemark
().
equals
(
other
.
getRemark
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getCode
()
==
null
)
?
0
:
getCode
().
hashCode
());
result
=
prime
*
result
+
((
getEffectiveStartTime
()
==
null
)
?
0
:
getEffectiveStartTime
().
hashCode
());
result
=
prime
*
result
+
((
getEffectiveEndTime
()
==
null
)
?
0
:
getEffectiveEndTime
().
hashCode
());
result
=
prime
*
result
+
((
getEnabledNum
()
==
null
)
?
0
:
getEnabledNum
().
hashCode
());
result
=
prime
*
result
+
((
getApplicant
()
==
null
)
?
0
:
getApplicant
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getCreator
()
==
null
)
?
0
:
getCreator
().
hashCode
());
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getRemark
()
==
null
)
?
0
:
getRemark
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
code
(
"code"
,
"code"
,
"VARCHAR"
,
false
),
effectiveStartTime
(
"effective_start_time"
,
"effectiveStartTime"
,
"TIMESTAMP"
,
false
),
effectiveEndTime
(
"effective_end_time"
,
"effectiveEndTime"
,
"TIMESTAMP"
,
false
),
enabledNum
(
"enabled_num"
,
"enabledNum"
,
"INTEGER"
,
false
),
applicant
(
"applicant"
,
"applicant"
,
"BIGINT"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
creator
(
"creator"
,
"creator"
,
"INTEGER"
,
false
),
state
(
"state"
,
"state"
,
"INTEGER"
,
true
),
remark
(
"remark"
,
"remark"
,
"VARCHAR"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/InvitationCodeExample.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
InvitationCodeExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
InvitationCodeExample
()
{
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
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
InvitationCodeExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
InvitationCodeExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
if
(
i
<
orderByClauses
.
length
-
1
)
{
sb
.
append
(
" , "
);
}
}
this
.
setOrderByClause
(
sb
.
toString
());
return
this
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
);
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
InvitationCodeExample
example
=
new
InvitationCodeExample
();
return
example
.
createCriteria
();
}
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
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
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
andCodeIsNull
()
{
addCriterion
(
"code is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeIsNotNull
()
{
addCriterion
(
"code is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeEqualTo
(
String
value
)
{
addCriterion
(
"code ="
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCodeEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"code = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"code <>"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCodeNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"code <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCodeGreaterThan
(
String
value
)
{
addCriterion
(
"code >"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCodeGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"code > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"code >="
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCodeGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"code >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCodeLessThan
(
String
value
)
{
addCriterion
(
"code <"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCodeLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"code < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"code <="
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCodeLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"code <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCodeLike
(
String
value
)
{
addCriterion
(
"code like"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotLike
(
String
value
)
{
addCriterion
(
"code not like"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"code in"
,
values
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"code not in"
,
values
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"code between"
,
value1
,
value2
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"code not between"
,
value1
,
value2
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeIsNull
()
{
addCriterion
(
"effective_start_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeIsNotNull
()
{
addCriterion
(
"effective_start_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeEqualTo
(
Date
value
)
{
addCriterion
(
"effective_start_time ="
,
value
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveStartTimeEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_start_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"effective_start_time <>"
,
value
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveStartTimeNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_start_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"effective_start_time >"
,
value
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveStartTimeGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_start_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"effective_start_time >="
,
value
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveStartTimeGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_start_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeLessThan
(
Date
value
)
{
addCriterion
(
"effective_start_time <"
,
value
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveStartTimeLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_start_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"effective_start_time <="
,
value
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveStartTimeLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_start_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"effective_start_time in"
,
values
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"effective_start_time not in"
,
values
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"effective_start_time between"
,
value1
,
value2
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveStartTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"effective_start_time not between"
,
value1
,
value2
,
"effectiveStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeIsNull
()
{
addCriterion
(
"effective_end_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeIsNotNull
()
{
addCriterion
(
"effective_end_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeEqualTo
(
Date
value
)
{
addCriterion
(
"effective_end_time ="
,
value
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveEndTimeEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_end_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"effective_end_time <>"
,
value
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveEndTimeNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_end_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"effective_end_time >"
,
value
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveEndTimeGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_end_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"effective_end_time >="
,
value
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveEndTimeGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_end_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeLessThan
(
Date
value
)
{
addCriterion
(
"effective_end_time <"
,
value
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveEndTimeLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_end_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"effective_end_time <="
,
value
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEffectiveEndTimeLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"effective_end_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"effective_end_time in"
,
values
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"effective_end_time not in"
,
values
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"effective_end_time between"
,
value1
,
value2
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveEndTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"effective_end_time not between"
,
value1
,
value2
,
"effectiveEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumIsNull
()
{
addCriterion
(
"enabled_num is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumIsNotNull
()
{
addCriterion
(
"enabled_num is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumEqualTo
(
Integer
value
)
{
addCriterion
(
"enabled_num ="
,
value
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEnabledNumEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"enabled_num = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumNotEqualTo
(
Integer
value
)
{
addCriterion
(
"enabled_num <>"
,
value
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEnabledNumNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"enabled_num <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumGreaterThan
(
Integer
value
)
{
addCriterion
(
"enabled_num >"
,
value
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEnabledNumGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"enabled_num > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"enabled_num >="
,
value
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEnabledNumGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"enabled_num >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumLessThan
(
Integer
value
)
{
addCriterion
(
"enabled_num <"
,
value
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEnabledNumLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"enabled_num < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"enabled_num <="
,
value
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEnabledNumLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"enabled_num <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"enabled_num in"
,
values
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"enabled_num not in"
,
values
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"enabled_num between"
,
value1
,
value2
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnabledNumNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"enabled_num not between"
,
value1
,
value2
,
"enabledNum"
);
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantIsNull
()
{
addCriterion
(
"applicant is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantIsNotNull
()
{
addCriterion
(
"applicant is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantEqualTo
(
Long
value
)
{
addCriterion
(
"applicant ="
,
value
,
"applicant"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andApplicantEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"applicant = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantNotEqualTo
(
Long
value
)
{
addCriterion
(
"applicant <>"
,
value
,
"applicant"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andApplicantNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"applicant <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantGreaterThan
(
Long
value
)
{
addCriterion
(
"applicant >"
,
value
,
"applicant"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andApplicantGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"applicant > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"applicant >="
,
value
,
"applicant"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andApplicantGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"applicant >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantLessThan
(
Long
value
)
{
addCriterion
(
"applicant <"
,
value
,
"applicant"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andApplicantLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"applicant < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"applicant <="
,
value
,
"applicant"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andApplicantLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"applicant <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantIn
(
List
<
Long
>
values
)
{
addCriterion
(
"applicant in"
,
values
,
"applicant"
);
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"applicant not in"
,
values
,
"applicant"
);
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"applicant between"
,
value1
,
value2
,
"applicant"
);
return
(
Criteria
)
this
;
}
public
Criteria
andApplicantNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"applicant not between"
,
value1
,
value2
,
"applicant"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Date
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIsNull
()
{
addCriterion
(
"creator is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIsNotNull
()
{
addCriterion
(
"creator is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorEqualTo
(
Integer
value
)
{
addCriterion
(
"creator ="
,
value
,
"creator"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorNotEqualTo
(
Integer
value
)
{
addCriterion
(
"creator <>"
,
value
,
"creator"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorGreaterThan
(
Integer
value
)
{
addCriterion
(
"creator >"
,
value
,
"creator"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"creator >="
,
value
,
"creator"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorLessThan
(
Integer
value
)
{
addCriterion
(
"creator <"
,
value
,
"creator"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"creator <="
,
value
,
"creator"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"creator in"
,
values
,
"creator"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"creator not in"
,
values
,
"creator"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"creator between"
,
value1
,
value2
,
"creator"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"creator not between"
,
value1
,
value2
,
"creator"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateIsNull
()
{
addCriterion
(
"`state` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateIsNotNull
()
{
addCriterion
(
"`state` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` ="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` <>"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateGreaterThan
(
Integer
value
)
{
addCriterion
(
"`state` >"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` >="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateLessThan
(
Integer
value
)
{
addCriterion
(
"`state` <"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`state` <="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`state` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStateIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`state` in"
,
values
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`state` not in"
,
values
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`state` between"
,
value1
,
value2
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`state` not between"
,
value1
,
value2
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkIsNull
()
{
addCriterion
(
"remark is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkIsNotNull
()
{
addCriterion
(
"remark is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkEqualTo
(
String
value
)
{
addCriterion
(
"remark ="
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotEqualTo
(
String
value
)
{
addCriterion
(
"remark <>"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkNotEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkGreaterThan
(
String
value
)
{
addCriterion
(
"remark >"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkGreaterThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"remark >="
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkGreaterThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkLessThan
(
String
value
)
{
addCriterion
(
"remark <"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkLessThanColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"remark <="
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkLessThanOrEqualToColumn
(
InvitationCode
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkLike
(
String
value
)
{
addCriterion
(
"remark like"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotLike
(
String
value
)
{
addCriterion
(
"remark not like"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkIn
(
List
<
String
>
values
)
{
addCriterion
(
"remark in"
,
values
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"remark not in"
,
values
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"remark between"
,
value1
,
value2
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"remark not between"
,
value1
,
value2
,
"remark"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
InvitationCodeExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
InvitationCodeExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
InvitationCodeExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaAdd
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria
add
(
Criteria
add
);
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/InviteRecord.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2023/08/31
*/
@Data
public
class
InviteRecord
implements
Entity
{
private
Integer
id
;
/**
* 受邀人
*/
private
Long
invitee
;
/**
* 邀请人
*/
private
Long
inviter
;
/**
* 受邀人手机号
*/
private
String
inviteePhone
;
/**
* 创建时间(使用邀请码的时间)
*/
private
Date
createTime
;
/**
* 邀请码
*/
private
String
invitationCode
;
private
static
final
long
serialVersionUID
=
1L
;
@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
(
", invitee="
).
append
(
invitee
);
sb
.
append
(
", inviter="
).
append
(
inviter
);
sb
.
append
(
", inviteePhone="
).
append
(
inviteePhone
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", invitationCode="
).
append
(
invitationCode
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
InviteRecord
other
=
(
InviteRecord
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getInvitee
()
==
null
?
other
.
getInvitee
()
==
null
:
this
.
getInvitee
().
equals
(
other
.
getInvitee
()))
&&
(
this
.
getInviter
()
==
null
?
other
.
getInviter
()
==
null
:
this
.
getInviter
().
equals
(
other
.
getInviter
()))
&&
(
this
.
getInviteePhone
()
==
null
?
other
.
getInviteePhone
()
==
null
:
this
.
getInviteePhone
().
equals
(
other
.
getInviteePhone
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getInvitationCode
()
==
null
?
other
.
getInvitationCode
()
==
null
:
this
.
getInvitationCode
().
equals
(
other
.
getInvitationCode
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getInvitee
()
==
null
)
?
0
:
getInvitee
().
hashCode
());
result
=
prime
*
result
+
((
getInviter
()
==
null
)
?
0
:
getInviter
().
hashCode
());
result
=
prime
*
result
+
((
getInviteePhone
()
==
null
)
?
0
:
getInviteePhone
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getInvitationCode
()
==
null
)
?
0
:
getInvitationCode
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
invitee
(
"invitee"
,
"invitee"
,
"BIGINT"
,
false
),
inviter
(
"inviter"
,
"inviter"
,
"BIGINT"
,
false
),
inviteePhone
(
"invitee_phone"
,
"inviteePhone"
,
"VARCHAR"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
invitationCode
(
"invitation_code"
,
"invitationCode"
,
"VARCHAR"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/InviteRecordExample.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
InviteRecordExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
InviteRecordExample
()
{
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
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
InviteRecordExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
InviteRecordExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
if
(
i
<
orderByClauses
.
length
-
1
)
{
sb
.
append
(
" , "
);
}
}
this
.
setOrderByClause
(
sb
.
toString
());
return
this
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
);
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
InviteRecordExample
example
=
new
InviteRecordExample
();
return
example
.
createCriteria
();
}
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
(
Integer
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeIsNull
()
{
addCriterion
(
"invitee is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeIsNotNull
()
{
addCriterion
(
"invitee is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeEqualTo
(
Long
value
)
{
addCriterion
(
"invitee ="
,
value
,
"invitee"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteeEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeNotEqualTo
(
Long
value
)
{
addCriterion
(
"invitee <>"
,
value
,
"invitee"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteeNotEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeGreaterThan
(
Long
value
)
{
addCriterion
(
"invitee >"
,
value
,
"invitee"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteeGreaterThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"invitee >="
,
value
,
"invitee"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteeGreaterThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeLessThan
(
Long
value
)
{
addCriterion
(
"invitee <"
,
value
,
"invitee"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteeLessThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"invitee <="
,
value
,
"invitee"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteeLessThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeIn
(
List
<
Long
>
values
)
{
addCriterion
(
"invitee in"
,
values
,
"invitee"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"invitee not in"
,
values
,
"invitee"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"invitee between"
,
value1
,
value2
,
"invitee"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteeNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"invitee not between"
,
value1
,
value2
,
"invitee"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviterIsNull
()
{
addCriterion
(
"inviter is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviterIsNotNull
()
{
addCriterion
(
"inviter is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviterEqualTo
(
Long
value
)
{
addCriterion
(
"inviter ="
,
value
,
"inviter"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviterEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"inviter = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviterNotEqualTo
(
Long
value
)
{
addCriterion
(
"inviter <>"
,
value
,
"inviter"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviterNotEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"inviter <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviterGreaterThan
(
Long
value
)
{
addCriterion
(
"inviter >"
,
value
,
"inviter"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviterGreaterThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"inviter > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviterGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"inviter >="
,
value
,
"inviter"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviterGreaterThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"inviter >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviterLessThan
(
Long
value
)
{
addCriterion
(
"inviter <"
,
value
,
"inviter"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviterLessThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"inviter < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviterLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"inviter <="
,
value
,
"inviter"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviterLessThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"inviter <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviterIn
(
List
<
Long
>
values
)
{
addCriterion
(
"inviter in"
,
values
,
"inviter"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviterNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"inviter not in"
,
values
,
"inviter"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviterBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"inviter between"
,
value1
,
value2
,
"inviter"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviterNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"inviter not between"
,
value1
,
value2
,
"inviter"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneIsNull
()
{
addCriterion
(
"invitee_phone is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneIsNotNull
()
{
addCriterion
(
"invitee_phone is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneEqualTo
(
String
value
)
{
addCriterion
(
"invitee_phone ="
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteePhoneEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee_phone = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneNotEqualTo
(
String
value
)
{
addCriterion
(
"invitee_phone <>"
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteePhoneNotEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee_phone <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneGreaterThan
(
String
value
)
{
addCriterion
(
"invitee_phone >"
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteePhoneGreaterThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee_phone > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"invitee_phone >="
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteePhoneGreaterThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee_phone >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneLessThan
(
String
value
)
{
addCriterion
(
"invitee_phone <"
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteePhoneLessThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee_phone < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"invitee_phone <="
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInviteePhoneLessThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitee_phone <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneLike
(
String
value
)
{
addCriterion
(
"invitee_phone like"
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneNotLike
(
String
value
)
{
addCriterion
(
"invitee_phone not like"
,
value
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneIn
(
List
<
String
>
values
)
{
addCriterion
(
"invitee_phone in"
,
values
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"invitee_phone not in"
,
values
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"invitee_phone between"
,
value1
,
value2
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInviteePhoneNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"invitee_phone not between"
,
value1
,
value2
,
"inviteePhone"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeIsNull
()
{
addCriterion
(
"invitation_code is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeIsNotNull
()
{
addCriterion
(
"invitation_code is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeEqualTo
(
String
value
)
{
addCriterion
(
"invitation_code ="
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInvitationCodeEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitation_code = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"invitation_code <>"
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInvitationCodeNotEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitation_code <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeGreaterThan
(
String
value
)
{
addCriterion
(
"invitation_code >"
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInvitationCodeGreaterThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitation_code > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"invitation_code >="
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInvitationCodeGreaterThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitation_code >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeLessThan
(
String
value
)
{
addCriterion
(
"invitation_code <"
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInvitationCodeLessThanColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitation_code < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"invitation_code <="
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andInvitationCodeLessThanOrEqualToColumn
(
InviteRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"invitation_code <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeLike
(
String
value
)
{
addCriterion
(
"invitation_code like"
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeNotLike
(
String
value
)
{
addCriterion
(
"invitation_code not like"
,
value
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"invitation_code in"
,
values
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"invitation_code not in"
,
values
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"invitation_code between"
,
value1
,
value2
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andInvitationCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"invitation_code not between"
,
value1
,
value2
,
"invitationCode"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
InviteRecordExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
InviteRecordExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
InviteRecordExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaAdd
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria
add
(
Criteria
add
);
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/InvitationCodeRequestDto.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.dto.request
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
InvitationCodeRequestDto
extends
BaseRequestDto
implements
Entity
{
/**
* id
*/
private
Long
id
;
/**
* 邀请码
*/
private
String
code
;
/**
* 有效期起始时间
*/
private
Date
effectiveStartTime
;
/**
* 有效期结束时间
*/
private
Date
effectiveEndTime
;
/**
* 可使用的人数
*/
private
Integer
enabledNum
;
/**
* 申请人
*/
private
Long
applicant
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建人
*/
private
Integer
creator
;
/**
* 状态
*/
private
Integer
state
;
/**
* 备注
*/
private
String
remark
;
}
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/InviteRecordRequestDto.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.dto.request
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
InviteRecordRequestDto
implements
Entity
{
private
Integer
id
;
/**
* 受邀人
*/
private
Long
invitee
;
/**
* 邀请人
*/
private
Long
inviter
;
/**
* 受邀人手机号
*/
private
String
inviteePhone
;
/**
* 创建时间(使用邀请码的时间)
*/
private
Date
createTime
;
/**
* 邀请码
*/
private
String
invitationCode
;
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/InvitationCodeDaoImpl.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.dao.InvitationCodeDao
;
import
com.wwdz.ch.db.domain.InvitationCode
;
import
com.wwdz.ch.db.domain.InvitationCodeExample
;
import
com.wwdz.ch.db.dto.request.InvitationCodeRequestDto
;
import
com.wwdz.ch.db.mapper.InvitationCodeMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
InvitationCodeDaoImpl
implements
InvitationCodeDao
{
@Autowired
InvitationCodeMapper
invitationCodeMapper
;
@Override
public
boolean
create
(
InvitationCode
invitationCode
)
{
int
num
=
invitationCodeMapper
.
insertSelective
(
invitationCode
);
return
num
>
0
;
}
@Override
public
boolean
update
(
InvitationCode
invitationCode
)
{
InvitationCodeExample
invitationCodeExample
=
new
InvitationCodeExample
();
InvitationCodeExample
.
Criteria
criteria
=
invitationCodeExample
.
createCriteria
();
criteria
.
andCodeEqualTo
(
invitationCode
.
getCode
());
int
num
=
invitationCodeMapper
.
updateByExampleSelective
(
invitationCode
,
invitationCodeExample
);
return
num
>
0
;
}
@Override
public
boolean
isExisted
(
String
code
)
{
InvitationCodeExample
invitationCodeExample
=
new
InvitationCodeExample
();
InvitationCodeExample
.
Criteria
criteria
=
invitationCodeExample
.
createCriteria
();
criteria
.
andCodeEqualTo
(
code
);
long
num
=
invitationCodeMapper
.
countByExample
(
invitationCodeExample
);
return
num
>
0
;
}
@Override
public
boolean
updateState
(
String
code
,
Integer
state
)
{
InvitationCodeExample
invitationCodeExample
=
new
InvitationCodeExample
();
InvitationCodeExample
.
Criteria
criteria
=
invitationCodeExample
.
createCriteria
();
criteria
.
andCodeEqualTo
(
code
);
InvitationCode
invitationCode
=
new
InvitationCode
();
invitationCode
.
setState
(
state
);
int
num
=
invitationCodeMapper
.
updateByExampleSelective
(
invitationCode
,
invitationCodeExample
);
return
num
>
0
;
}
@Override
public
List
<
InvitationCode
>
findList
(
InvitationCodeRequestDto
dto
)
{
InvitationCodeExample
invitationCodeExample
=
new
InvitationCodeExample
();
InvitationCodeExample
.
Criteria
criteria
=
invitationCodeExample
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getCode
(),
criteria:
:
andCodeEqualTo
);
return
invitationCodeMapper
.
selectByExample
(
invitationCodeExample
);
}
@Override
public
PageInfo
<
InvitationCode
>
findByPage
(
InvitationCodeRequestDto
dto
)
{
InvitationCodeExample
invitationCodeExample
=
new
InvitationCodeExample
();
InvitationCodeExample
.
Criteria
criteria
=
invitationCodeExample
.
createCriteria
();
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
List
<
InvitationCode
>
list
=
invitationCodeMapper
.
selectByExample
(
invitationCodeExample
);
return
new
PageInfo
<>(
list
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/InviteRecordDaoImpl.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.impl
;
import
com.wwdz.ch.db.dao.InviteRecordDao
;
import
com.wwdz.ch.db.domain.InviteRecord
;
import
com.wwdz.ch.db.domain.InviteRecordExample
;
import
com.wwdz.ch.db.dto.request.InviteRecordRequestDto
;
import
com.wwdz.ch.db.mapper.InviteRecordMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
import
java.util.List
;
@Repository
public
class
InviteRecordDaoImpl
implements
InviteRecordDao
{
@Autowired
InviteRecordMapper
inviteRecordMapper
;
@Override
public
boolean
create
(
InviteRecord
inviteRecord
)
{
int
num
=
inviteRecordMapper
.
insertSelective
(
inviteRecord
);
return
num
>
0
;
}
@Override
public
boolean
isExisted
(
String
phone
)
{
InviteRecordExample
inviteRecordExample
=
new
InviteRecordExample
();
InviteRecordExample
.
Criteria
criteria
=
inviteRecordExample
.
createCriteria
();
criteria
.
andInviteePhoneEqualTo
(
phone
);
long
num
=
inviteRecordMapper
.
countByExample
(
inviteRecordExample
);
return
num
>
0
;
}
@Override
public
List
<
InviteRecord
>
findList
(
InviteRecordRequestDto
dto
)
{
InviteRecordExample
inviteRecordExample
=
new
InviteRecordExample
();
InviteRecordExample
.
Criteria
criteria
=
inviteRecordExample
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getInvitationCode
(),
criteria:
:
andInvitationCodeEqualTo
);
return
inviteRecordMapper
.
selectByExample
(
inviteRecordExample
);
}
@Override
public
long
countByCode
(
String
invitationCode
)
{
InviteRecordExample
inviteRecordExample
=
new
InviteRecordExample
();
InviteRecordExample
.
Criteria
criteria
=
inviteRecordExample
.
createCriteria
();
criteria
.
andInvitationCodeEqualTo
(
invitationCode
);
return
inviteRecordMapper
.
countByExample
(
inviteRecordExample
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/InvitationCodeMapper.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.InvitationCode
;
import
com.wwdz.ch.db.domain.InvitationCodeExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
InvitationCodeMapper
{
long
countByExample
(
InvitationCodeExample
example
);
int
deleteByExample
(
InvitationCodeExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
InvitationCode
record
);
int
insertSelective
(
InvitationCode
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
InvitationCode
selectOneByExample
(
InvitationCodeExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
InvitationCode
selectOneByExampleSelective
(
@Param
(
"example"
)
InvitationCodeExample
example
,
@Param
(
"selective"
)
InvitationCode
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
InvitationCode
>
selectByExampleSelective
(
@Param
(
"example"
)
InvitationCodeExample
example
,
@Param
(
"selective"
)
InvitationCode
.
Column
...
selective
);
List
<
InvitationCode
>
selectByExample
(
InvitationCodeExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invitation_code
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
InvitationCode
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
InvitationCode
.
Column
...
selective
);
InvitationCode
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
InvitationCode
record
,
@Param
(
"example"
)
InvitationCodeExample
example
);
int
updateByExample
(
@Param
(
"record"
)
InvitationCode
record
,
@Param
(
"example"
)
InvitationCodeExample
example
);
int
updateByPrimaryKeySelective
(
InvitationCode
record
);
int
updateByPrimaryKey
(
InvitationCode
record
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/mapper/InviteRecordMapper.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.InviteRecord
;
import
com.wwdz.ch.db.domain.InviteRecordExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
InviteRecordMapper
{
long
countByExample
(
InviteRecordExample
example
);
int
deleteByExample
(
InviteRecordExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
InviteRecord
record
);
int
insertSelective
(
InviteRecord
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
InviteRecord
selectOneByExample
(
InviteRecordExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
InviteRecord
selectOneByExampleSelective
(
@Param
(
"example"
)
InviteRecordExample
example
,
@Param
(
"selective"
)
InviteRecord
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
InviteRecord
>
selectByExampleSelective
(
@Param
(
"example"
)
InviteRecordExample
example
,
@Param
(
"selective"
)
InviteRecord
.
Column
...
selective
);
List
<
InviteRecord
>
selectByExample
(
InviteRecordExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invite_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
InviteRecord
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
InviteRecord
.
Column
...
selective
);
InviteRecord
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
InviteRecord
record
,
@Param
(
"example"
)
InviteRecordExample
example
);
int
updateByExample
(
@Param
(
"record"
)
InviteRecord
record
,
@Param
(
"example"
)
InviteRecordExample
example
);
int
updateByPrimaryKeySelective
(
InviteRecord
record
);
int
updateByPrimaryKey
(
InviteRecord
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/InvitationCodeMapper.xml
0 → 100644
View file @
8fe103fd
<?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.wwdz.ch.db.mapper.InvitationCodeMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.InvitationCode"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"code"
jdbcType=
"VARCHAR"
property=
"code"
/>
<result
column=
"effective_start_time"
jdbcType=
"TIMESTAMP"
property=
"effectiveStartTime"
/>
<result
column=
"effective_end_time"
jdbcType=
"TIMESTAMP"
property=
"effectiveEndTime"
/>
<result
column=
"enabled_num"
jdbcType=
"INTEGER"
property=
"enabledNum"
/>
<result
column=
"applicant"
jdbcType=
"BIGINT"
property=
"applicant"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"creator"
jdbcType=
"INTEGER"
property=
"creator"
/>
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
</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, code, effective_start_time, effective_end_time, enabled_num, applicant, create_time,
update_time, creator, `state`, remark
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.InvitationCodeExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from invitation_code
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, code, effective_start_time, effective_end_time, enabled_num, applicant, create_time,
update_time, creator, `state`, remark
</otherwise>
</choose>
from invitation_code
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from invitation_code
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, code, effective_start_time, effective_end_time, enabled_num, applicant, create_time,
update_time, creator, `state`, remark
</otherwise>
</choose>
from invitation_code
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from invitation_code
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.InvitationCodeExample"
>
delete from invitation_code
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.InvitationCode"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into invitation_code (code, effective_start_time, effective_end_time,
enabled_num, applicant, create_time,
update_time, creator, `state`,
remark)
values (#{code,jdbcType=VARCHAR}, #{effectiveStartTime,jdbcType=TIMESTAMP}, #{effectiveEndTime,jdbcType=TIMESTAMP},
#{enabledNum,jdbcType=INTEGER}, #{applicant,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.InvitationCode"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into invitation_code
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"code != null"
>
code,
</if>
<if
test=
"effectiveStartTime != null"
>
effective_start_time,
</if>
<if
test=
"effectiveEndTime != null"
>
effective_end_time,
</if>
<if
test=
"enabledNum != null"
>
enabled_num,
</if>
<if
test=
"applicant != null"
>
applicant,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"creator != null"
>
creator,
</if>
<if
test=
"state != null"
>
`state`,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"code != null"
>
#{code,jdbcType=VARCHAR},
</if>
<if
test=
"effectiveStartTime != null"
>
#{effectiveStartTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"effectiveEndTime != null"
>
#{effectiveEndTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"enabledNum != null"
>
#{enabledNum,jdbcType=INTEGER},
</if>
<if
test=
"applicant != null"
>
#{applicant,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"creator != null"
>
#{creator,jdbcType=INTEGER},
</if>
<if
test=
"state != null"
>
#{state,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.InvitationCodeExample"
resultType=
"java.lang.Long"
>
select count(*) from invitation_code
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update invitation_code
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.code != null"
>
code = #{record.code,jdbcType=VARCHAR},
</if>
<if
test=
"record.effectiveStartTime != null"
>
effective_start_time = #{record.effectiveStartTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.effectiveEndTime != null"
>
effective_end_time = #{record.effectiveEndTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.enabledNum != null"
>
enabled_num = #{record.enabledNum,jdbcType=INTEGER},
</if>
<if
test=
"record.applicant != null"
>
applicant = #{record.applicant,jdbcType=BIGINT},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.creator != null"
>
creator = #{record.creator,jdbcType=INTEGER},
</if>
<if
test=
"record.state != null"
>
`state` = #{record.state,jdbcType=INTEGER},
</if>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update invitation_code
set id = #{record.id,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR},
effective_start_time = #{record.effectiveStartTime,jdbcType=TIMESTAMP},
effective_end_time = #{record.effectiveEndTime,jdbcType=TIMESTAMP},
enabled_num = #{record.enabledNum,jdbcType=INTEGER},
applicant = #{record.applicant,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=INTEGER},
`state` = #{record.state,jdbcType=INTEGER},
remark = #{record.remark,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.InvitationCode"
>
update invitation_code
<set>
<if
test=
"code != null"
>
code = #{code,jdbcType=VARCHAR},
</if>
<if
test=
"effectiveStartTime != null"
>
effective_start_time = #{effectiveStartTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"effectiveEndTime != null"
>
effective_end_time = #{effectiveEndTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"enabledNum != null"
>
enabled_num = #{enabledNum,jdbcType=INTEGER},
</if>
<if
test=
"applicant != null"
>
applicant = #{applicant,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"creator != null"
>
creator = #{creator,jdbcType=INTEGER},
</if>
<if
test=
"state != null"
>
`state` = #{state,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.InvitationCode"
>
update invitation_code
set code = #{code,jdbcType=VARCHAR},
effective_start_time = #{effectiveStartTime,jdbcType=TIMESTAMP},
effective_end_time = #{effectiveEndTime,jdbcType=TIMESTAMP},
enabled_num = #{enabledNum,jdbcType=INTEGER},
applicant = #{applicant,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=INTEGER},
`state` = #{state,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.InvitationCodeExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from invitation_code
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, code, effective_start_time, effective_end_time, enabled_num, applicant, create_time,
update_time, creator, `state`, remark
</otherwise>
</choose>
from invitation_code
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/InviteRecordMapper.xml
0 → 100644
View file @
8fe103fd
<?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.wwdz.ch.db.mapper.InviteRecordMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.InviteRecord"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"invitee"
jdbcType=
"BIGINT"
property=
"invitee"
/>
<result
column=
"inviter"
jdbcType=
"BIGINT"
property=
"inviter"
/>
<result
column=
"invitee_phone"
jdbcType=
"VARCHAR"
property=
"inviteePhone"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"invitation_code"
jdbcType=
"VARCHAR"
property=
"invitationCode"
/>
</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, invitee, inviter, invitee_phone, create_time, invitation_code
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.InviteRecordExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from invite_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, invitee, inviter, invitee_phone, create_time, invitation_code
</otherwise>
</choose>
from invite_record
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from invite_record
where id = #{id,jdbcType=INTEGER}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, invitee, inviter, invitee_phone, create_time, invitation_code
</otherwise>
</choose>
from invite_record
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from invite_record
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.InviteRecordExample"
>
delete from invite_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.InviteRecord"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into invite_record (invitee, inviter, invitee_phone,
create_time, invitation_code)
values (#{invitee,jdbcType=BIGINT}, #{inviter,jdbcType=BIGINT}, #{inviteePhone,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{invitationCode,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.InviteRecord"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into invite_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"invitee != null"
>
invitee,
</if>
<if
test=
"inviter != null"
>
inviter,
</if>
<if
test=
"inviteePhone != null"
>
invitee_phone,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"invitationCode != null"
>
invitation_code,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"invitee != null"
>
#{invitee,jdbcType=BIGINT},
</if>
<if
test=
"inviter != null"
>
#{inviter,jdbcType=BIGINT},
</if>
<if
test=
"inviteePhone != null"
>
#{inviteePhone,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"invitationCode != null"
>
#{invitationCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.InviteRecordExample"
resultType=
"java.lang.Long"
>
select count(*) from invite_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update invite_record
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
</if>
<if
test=
"record.invitee != null"
>
invitee = #{record.invitee,jdbcType=BIGINT},
</if>
<if
test=
"record.inviter != null"
>
inviter = #{record.inviter,jdbcType=BIGINT},
</if>
<if
test=
"record.inviteePhone != null"
>
invitee_phone = #{record.inviteePhone,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.invitationCode != null"
>
invitation_code = #{record.invitationCode,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update invite_record
set id = #{record.id,jdbcType=INTEGER},
invitee = #{record.invitee,jdbcType=BIGINT},
inviter = #{record.inviter,jdbcType=BIGINT},
invitee_phone = #{record.inviteePhone,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
invitation_code = #{record.invitationCode,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.InviteRecord"
>
update invite_record
<set>
<if
test=
"invitee != null"
>
invitee = #{invitee,jdbcType=BIGINT},
</if>
<if
test=
"inviter != null"
>
inviter = #{inviter,jdbcType=BIGINT},
</if>
<if
test=
"inviteePhone != null"
>
invitee_phone = #{inviteePhone,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"invitationCode != null"
>
invitation_code = #{invitationCode,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.InviteRecord"
>
update invite_record
set invitee = #{invitee,jdbcType=BIGINT},
inviter = #{inviter,jdbcType=BIGINT},
invitee_phone = #{inviteePhone,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
invitation_code = #{invitationCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.InviteRecordExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from invite_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, invitee, inviter, invitee_phone, create_time, invitation_code
</otherwise>
</choose>
from invite_record
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/InviteRecordServiceImpl.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.wx.impl
;
import
com.wwdz.ch.core.consts.InvitationCodeStateEnum
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.InvitationCodeDao
;
import
com.wwdz.ch.db.dao.InviteRecordDao
;
import
com.wwdz.ch.db.domain.InvitationCode
;
import
com.wwdz.ch.db.domain.InviteRecord
;
import
com.wwdz.ch.db.dto.request.InvitationCodeRequestDto
;
import
com.wwdz.ch.db.dto.request.InviteRecordRequestDto
;
import
com.wwdz.ch.wx.service.InviteRecordService
;
import
com.xxdxxs.utils.EntityMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
InviteRecordServiceImpl
implements
InviteRecordService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
InviteRecordServiceImpl
.
class
);
@Autowired
InviteRecordDao
inviteRecordDao
;
@Autowired
InvitationCodeDao
invitationCodeDao
;
@Override
public
Result
create
(
InviteRecordRequestDto
dto
)
{
try
{
//查询邀请码信息
InvitationCodeRequestDto
invitationCodeRequestDto
=
new
InvitationCodeRequestDto
();
invitationCodeRequestDto
.
setCode
(
dto
.
getInvitationCode
());
List
<
InvitationCode
>
invitationCodeList
=
invitationCodeDao
.
findList
(
invitationCodeRequestDto
);
if
(
CollectionUtils
.
isEmpty
(
invitationCodeList
))
{
return
Result
.
failed
(
"邀请码错误"
);
}
InvitationCode
invitationCode
=
invitationCodeList
.
get
(
0
);
if
(
InvitationCodeStateEnum
.
invalid
.
getCode
()
==
invitationCode
.
getState
())
{
return
Result
.
failed
(
"邀请码已失效"
);
}
if
(
InvitationCodeStateEnum
.
expired
.
getCode
()
==
invitationCode
.
getState
())
{
return
Result
.
failed
(
"邀请码已过期"
);
}
Date
effectEndTime
=
invitationCode
.
getEffectiveEndTime
();
Date
now
=
new
Date
();
int
comparison
=
effectEndTime
.
compareTo
(
now
);
if
(
comparison
<=
0
)
{
return
Result
.
failed
(
"邀请码已过期"
);
}
InviteRecord
inviteRecord
=
new
InviteRecord
();
EntityMapper
.
copyAttribute
(
dto
,
inviteRecord
);
inviteRecord
.
setCreateTime
(
now
);
//邀请人
inviteRecord
.
setInviter
(
invitationCode
.
getApplicant
());
inviteRecordDao
.
create
(
inviteRecord
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"邀请码使用失败:{}"
,
e
);
}
return
Result
.
failed
(
"使用邀请码失败"
);
}
@Override
public
Result
isExisted
(
String
phone
)
{
return
Result
.
success
(
inviteRecordDao
.
isExisted
(
phone
));
}
@Override
public
Result
findList
(
InviteRecordRequestDto
dto
)
{
return
null
;
}
@Override
public
Result
checkCode
(
InviteRecordRequestDto
dto
)
{
return
null
;
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/InviteRecordService.java
0 → 100644
View file @
8fe103fd
package
com.wwdz.ch.wx.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.InviteRecordRequestDto
;
public
interface
InviteRecordService
{
Result
create
(
InviteRecordRequestDto
dto
);
Result
isExisted
(
String
phone
);
Result
findList
(
InviteRecordRequestDto
dto
);
/**
* 校验邀请码
* @param dto
* @return
*/
Result
checkCode
(
InviteRecordRequestDto
dto
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment