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
a0c692fe
Commit
a0c692fe
authored
Jul 02, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专场商品列表查询新是否订阅专场
parent
529e7684
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2191 additions
and
52 deletions
+2191
-52
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
...src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
+5
-0
ch-core/src/main/java/com/wwdz/ch/core/impl/SendMsgServiceImpl.java
...c/main/java/com/wwdz/ch/core/impl/SendMsgServiceImpl.java
+6
-6
ch-core/src/main/java/com/wwdz/ch/core/service/SendMsgService.java
...rc/main/java/com/wwdz/ch/core/service/SendMsgService.java
+7
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/DisposableSubscribeRecordDao.java
...java/com/wwdz/ch/db/dao/DisposableSubscribeRecordDao.java
+8
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SpecialPerformanceItemFollow.java
.../db/domain/distribution/SpecialPerformanceItemFollow.java
+293
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SpecialPerformanceItemFollowExample.java
...ain/distribution/SpecialPerformanceItemFollowExample.java
+1359
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/SpecialPerformanceRequestDto.java
...to/request/distribution/SpecialPerformanceRequestDto.java
+2
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/DisposableSubscribeRecordDaoImpl.java
...b/impl/distribution/DisposableSubscribeRecordDaoImpl.java
+35
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/SpecialPerformanceItemFollowMapper.java
...pper/distribution/SpecialPerformanceItemFollowMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/SpecialPerformanceItemFollowMapper.xml
...apper/distribution/SpecialPerformanceItemFollowMapper.xml
+356
-0
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
...h/wx/impl/distribution/SpecialPerformanceServiceImpl.java
+10
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
.../java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
+40
-45
No files found.
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
View file @
a0c692fe
...
@@ -319,4 +319,9 @@ public class SupplierItemVo implements Entity {
...
@@ -319,4 +319,9 @@ public class SupplierItemVo implements Entity {
*/
*/
private
String
shareTip
;
private
String
shareTip
;
/**
* 商品在专场中是否被关注
*/
private
Boolean
isFollowed
;
}
}
ch-core/src/main/java/com/wwdz/ch/core/impl/SendMsgServiceImpl.java
View file @
a0c692fe
...
@@ -612,7 +612,7 @@ public class SendMsgServiceImpl implements SendMsgService {
...
@@ -612,7 +612,7 @@ public class SendMsgServiceImpl implements SendMsgService {
* @param auctionOfferNoticeMsg
* @param auctionOfferNoticeMsg
* @return
* @return
*/
*/
public
boolean
sendSpecialPerformanceStartMsg
(
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
)
{
public
Result
sendSpecialPerformanceStartMsg
(
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
)
{
String
openId
=
auctionOfferNoticeMsg
.
getOpenId
();
String
openId
=
auctionOfferNoticeMsg
.
getOpenId
();
String
token
=
officialAccountApi
.
getAccessToken
();
String
token
=
officialAccountApi
.
getAccessToken
();
String
url
=
SEND_SUBSCRIBE_MSG_URL
+
"?access_token="
+
token
;
String
url
=
SEND_SUBSCRIBE_MSG_URL
+
"?access_token="
+
token
;
...
@@ -643,10 +643,10 @@ public class SendMsgServiceImpl implements SendMsgService {
...
@@ -643,10 +643,10 @@ public class SendMsgServiceImpl implements SendMsgService {
String
errmsg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
String
errmsg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
if
(!
"0"
.
equals
(
errorCode
))
{
if
(!
"0"
.
equals
(
errorCode
))
{
logger
.
error
(
"openid : {}, 发送专场即将开始订阅消息, errorCode : {}, errmsg : {} "
,
openId
,
errorCode
,
errmsg
);
logger
.
error
(
"openid : {}, 发送专场即将开始订阅消息, errorCode : {}, errmsg : {} "
,
openId
,
errorCode
,
errmsg
);
return
false
;
return
Result
.
failed
(
responseStr
)
;
}
}
logger
.
info
(
"============= 发送专场即将开始订阅消息成功 ==========="
);
logger
.
info
(
"============= 发送专场即将开始订阅消息成功 ==========="
);
return
true
;
return
Result
.
success
()
;
}
}
...
@@ -655,7 +655,7 @@ public class SendMsgServiceImpl implements SendMsgService {
...
@@ -655,7 +655,7 @@ public class SendMsgServiceImpl implements SendMsgService {
* @param auctionOfferNoticeMsg
* @param auctionOfferNoticeMsg
* @return
* @return
*/
*/
public
boolean
sendSpecialPerformanceEndMsg
(
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
)
{
public
Result
sendSpecialPerformanceEndMsg
(
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
)
{
String
openId
=
auctionOfferNoticeMsg
.
getOpenId
();
String
openId
=
auctionOfferNoticeMsg
.
getOpenId
();
String
token
=
officialAccountApi
.
getAccessToken
();
String
token
=
officialAccountApi
.
getAccessToken
();
String
url
=
SEND_SUBSCRIBE_MSG_URL
+
"?access_token="
+
token
;
String
url
=
SEND_SUBSCRIBE_MSG_URL
+
"?access_token="
+
token
;
...
@@ -691,10 +691,10 @@ public class SendMsgServiceImpl implements SendMsgService {
...
@@ -691,10 +691,10 @@ public class SendMsgServiceImpl implements SendMsgService {
String
errmsg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
String
errmsg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
if
(!
"0"
.
equals
(
errorCode
))
{
if
(!
"0"
.
equals
(
errorCode
))
{
logger
.
error
(
"openid : {}, 发送专场即将结束订阅消息, errorCode : {}, errmsg : {} "
,
openId
,
errorCode
,
errmsg
);
logger
.
error
(
"openid : {}, 发送专场即将结束订阅消息, errorCode : {}, errmsg : {} "
,
openId
,
errorCode
,
errmsg
);
return
false
;
return
Result
.
failed
(
responseStr
)
;
}
}
logger
.
info
(
"============= 发送专场即将结束订阅消息成功 ==========="
);
logger
.
info
(
"============= 发送专场即将结束订阅消息成功 ==========="
);
return
true
;
return
Result
.
success
()
;
}
}
...
...
ch-core/src/main/java/com/wwdz/ch/core/service/SendMsgService.java
View file @
a0c692fe
...
@@ -81,4 +81,11 @@ public interface SendMsgService {
...
@@ -81,4 +81,11 @@ public interface SendMsgService {
String
getOpenIdByUserId
(
long
userId
);
String
getOpenIdByUserId
(
long
userId
);
Result
sendSpecialPerformanceStartMsg
(
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
);
Result
sendSpecialPerformanceEndMsg
(
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/DisposableSubscribeRecordDao.java
View file @
a0c692fe
...
@@ -11,6 +11,8 @@ public interface DisposableSubscribeRecordDao {
...
@@ -11,6 +11,8 @@ public interface DisposableSubscribeRecordDao {
boolean
update
(
DisposableSubscribeRecord
disposableSubscribeRecord
);
boolean
update
(
DisposableSubscribeRecord
disposableSubscribeRecord
);
boolean
updateInvalid
(
String
openid
,
long
targetId
,
String
templateId
);
/**
/**
* 是否存在
* 是否存在
* @param openid
* @param openid
...
@@ -27,5 +29,11 @@ public interface DisposableSubscribeRecordDao {
...
@@ -27,5 +29,11 @@ public interface DisposableSubscribeRecordDao {
*/
*/
boolean
isSubscribed
(
String
openid
,
long
targetId
,
String
templateId
);
boolean
isSubscribed
(
String
openid
,
long
targetId
,
String
templateId
);
boolean
isSubscribed
(
long
userId
,
long
targetId
,
int
type
);
List
<
DisposableSubscribeRecord
>
findList
(
DisposableSubscribeRecordRequestDto
dto
);
List
<
DisposableSubscribeRecord
>
findList
(
DisposableSubscribeRecordRequestDto
dto
);
List
<
DisposableSubscribeRecord
>
findValid
(
long
userId
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SpecialPerformanceItemFollow.java
0 → 100644
View file @
a0c692fe
package
com.wwdz.ch.db.domain.distribution
;
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 2024/07/02
*/
@Data
public
class
SpecialPerformanceItemFollow
implements
Entity
{
private
Long
id
;
/**
* 专场id
*/
private
Integer
specialPerformanceId
;
/**
* 商品id
*/
private
Long
itemId
;
/**
* 商品所属用户id
*/
private
Long
creatorId
;
/**
* 关注商品的用户id
*/
private
Long
userId
;
/**
* 1关注
*/
private
Integer
state
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
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
(
", specialPerformanceId="
).
append
(
specialPerformanceId
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", creatorId="
).
append
(
creatorId
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", state="
).
append
(
state
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
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
;
}
SpecialPerformanceItemFollow
other
=
(
SpecialPerformanceItemFollow
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getSpecialPerformanceId
()
==
null
?
other
.
getSpecialPerformanceId
()
==
null
:
this
.
getSpecialPerformanceId
().
equals
(
other
.
getSpecialPerformanceId
()))
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getCreatorId
()
==
null
?
other
.
getCreatorId
()
==
null
:
this
.
getCreatorId
().
equals
(
other
.
getCreatorId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getSpecialPerformanceId
()
==
null
)
?
0
:
getSpecialPerformanceId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getCreatorId
()
==
null
)
?
0
:
getCreatorId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
specialPerformanceId
(
"special_performance_id"
,
"specialPerformanceId"
,
"INTEGER"
,
false
),
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
creatorId
(
"creator_id"
,
"creatorId"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
state
(
"state"
,
"state"
,
"INTEGER"
,
true
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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/distribution/SpecialPerformanceItemFollowExample.java
0 → 100644
View file @
a0c692fe
package
com.wwdz.ch.db.domain.distribution
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
SpecialPerformanceItemFollowExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
SpecialPerformanceItemFollowExample
()
{
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SpecialPerformanceItemFollowExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SpecialPerformanceItemFollowExample
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
SpecialPerformanceItemFollowExample
example
=
new
SpecialPerformanceItemFollowExample
();
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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
andSpecialPerformanceIdIsNull
()
{
addCriterion
(
"special_performance_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdIsNotNull
()
{
addCriterion
(
"special_performance_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdEqualTo
(
Integer
value
)
{
addCriterion
(
"special_performance_id ="
,
value
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSpecialPerformanceIdEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"special_performance_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"special_performance_id <>"
,
value
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSpecialPerformanceIdNotEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"special_performance_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"special_performance_id >"
,
value
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSpecialPerformanceIdGreaterThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"special_performance_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"special_performance_id >="
,
value
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSpecialPerformanceIdGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"special_performance_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdLessThan
(
Integer
value
)
{
addCriterion
(
"special_performance_id <"
,
value
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSpecialPerformanceIdLessThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"special_performance_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"special_performance_id <="
,
value
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSpecialPerformanceIdLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"special_performance_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"special_performance_id in"
,
values
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"special_performance_id not in"
,
values
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"special_performance_id between"
,
value1
,
value2
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialPerformanceIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"special_performance_id not between"
,
value1
,
value2
,
"specialPerformanceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIsNull
()
{
addCriterion
(
"item_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIsNotNull
()
{
addCriterion
(
"item_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdEqualTo
(
Long
value
)
{
addCriterion
(
"item_id ="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <>"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdNotEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThan
(
Long
value
)
{
addCriterion
(
"item_id >"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id >="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThan
(
Long
value
)
{
addCriterion
(
"item_id <"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id not in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id not between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdIsNull
()
{
addCriterion
(
"creator_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdIsNotNull
()
{
addCriterion
(
"creator_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdEqualTo
(
Long
value
)
{
addCriterion
(
"creator_id ="
,
value
,
"creatorId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorIdEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"creator_id <>"
,
value
,
"creatorId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorIdNotEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdGreaterThan
(
Long
value
)
{
addCriterion
(
"creator_id >"
,
value
,
"creatorId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorIdGreaterThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"creator_id >="
,
value
,
"creatorId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorIdGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdLessThan
(
Long
value
)
{
addCriterion
(
"creator_id <"
,
value
,
"creatorId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorIdLessThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"creator_id <="
,
value
,
"creatorId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreatorIdLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"creator_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"creator_id in"
,
values
,
"creatorId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"creator_id not in"
,
values
,
"creatorId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"creator_id between"
,
value1
,
value2
,
"creatorId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatorIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"creator_id not between"
,
value1
,
value2
,
"creatorId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateNotEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateGreaterThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateLessThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStateLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
SpecialPerformanceItemFollow
.
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 special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
SpecialPerformanceItemFollow
.
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
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
SpecialPerformanceItemFollowExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
SpecialPerformanceItemFollowExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SpecialPerformanceItemFollowExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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 special_performance_item_follow
*
* @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/distribution/SpecialPerformanceRequestDto.java
View file @
a0c692fe
...
@@ -10,6 +10,8 @@ import java.util.List;
...
@@ -10,6 +10,8 @@ import java.util.List;
@Data
@Data
public
class
SpecialPerformanceRequestDto
extends
BaseRequestDto
implements
Entity
{
public
class
SpecialPerformanceRequestDto
extends
BaseRequestDto
implements
Entity
{
private
Long
userId
;
private
Integer
id
;
private
Integer
id
;
/**
/**
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/DisposableSubscribeRecordDaoImpl.java
View file @
a0c692fe
...
@@ -37,6 +37,20 @@ public class DisposableSubscribeRecordDaoImpl implements DisposableSubscribeReco
...
@@ -37,6 +37,20 @@ public class DisposableSubscribeRecordDaoImpl implements DisposableSubscribeReco
return
disposableSubscribeRecordMapper
.
updateByExampleSelective
(
disposableSubscribeRecord
,
example
)
>
0
;
return
disposableSubscribeRecordMapper
.
updateByExampleSelective
(
disposableSubscribeRecord
,
example
)
>
0
;
}
}
@Override
public
boolean
updateInvalid
(
String
openid
,
long
targetId
,
String
templateId
)
{
DisposableSubscribeRecordExample
example
=
new
DisposableSubscribeRecordExample
();
DisposableSubscribeRecordExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andOpenidEqualTo
(
openid
);
criteria
.
andTargetIdEqualTo
(
targetId
);
criteria
.
andTemplateIdEqualTo
(
templateId
);
DisposableSubscribeRecord
disposableSubscribeRecord
=
new
DisposableSubscribeRecord
();
disposableSubscribeRecord
.
setIsValid
(
false
);
disposableSubscribeRecord
.
setUpdateTime
(
new
Date
());
return
disposableSubscribeRecordMapper
.
updateByExampleSelective
(
disposableSubscribeRecord
,
example
)
>
0
;
}
@Override
@Override
public
boolean
isExisted
(
String
openid
,
long
targetId
,
String
templateId
)
{
public
boolean
isExisted
(
String
openid
,
long
targetId
,
String
templateId
)
{
DisposableSubscribeRecordExample
example
=
new
DisposableSubscribeRecordExample
();
DisposableSubscribeRecordExample
example
=
new
DisposableSubscribeRecordExample
();
...
@@ -58,6 +72,17 @@ public class DisposableSubscribeRecordDaoImpl implements DisposableSubscribeReco
...
@@ -58,6 +72,17 @@ public class DisposableSubscribeRecordDaoImpl implements DisposableSubscribeReco
return
disposableSubscribeRecordMapper
.
countByExample
(
example
)
>
0
;
return
disposableSubscribeRecordMapper
.
countByExample
(
example
)
>
0
;
}
}
@Override
public
boolean
isSubscribed
(
long
userId
,
long
targetId
,
int
type
)
{
DisposableSubscribeRecordExample
example
=
new
DisposableSubscribeRecordExample
();
DisposableSubscribeRecordExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
criteria
.
andTargetIdEqualTo
(
targetId
);
criteria
.
andTypeEqualTo
(
type
);
criteria
.
andIsValidEqualTo
(
true
);
return
disposableSubscribeRecordMapper
.
countByExample
(
example
)
>
0
;
}
@Override
@Override
public
List
<
DisposableSubscribeRecord
>
findList
(
DisposableSubscribeRecordRequestDto
dto
)
{
public
List
<
DisposableSubscribeRecord
>
findList
(
DisposableSubscribeRecordRequestDto
dto
)
{
DisposableSubscribeRecordExample
example
=
new
DisposableSubscribeRecordExample
();
DisposableSubscribeRecordExample
example
=
new
DisposableSubscribeRecordExample
();
...
@@ -71,4 +96,14 @@ public class DisposableSubscribeRecordDaoImpl implements DisposableSubscribeReco
...
@@ -71,4 +96,14 @@ public class DisposableSubscribeRecordDaoImpl implements DisposableSubscribeReco
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
disposableSubscribeRecordMapper
.
selectByExample
(
example
);
return
disposableSubscribeRecordMapper
.
selectByExample
(
example
);
}
}
@Override
public
List
<
DisposableSubscribeRecord
>
findValid
(
long
userId
)
{
DisposableSubscribeRecordExample
example
=
new
DisposableSubscribeRecordExample
();
DisposableSubscribeRecordExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
criteria
.
andIsValidEqualTo
(
true
);
return
disposableSubscribeRecordMapper
.
selectByExample
(
example
);
}
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/SpecialPerformanceItemFollowMapper.java
0 → 100644
View file @
a0c692fe
package
com.wwdz.ch.db.mapper.distribution
;
import
com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollow
;
import
com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollowExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
SpecialPerformanceItemFollowMapper
{
long
countByExample
(
SpecialPerformanceItemFollowExample
example
);
int
deleteByExample
(
SpecialPerformanceItemFollowExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
SpecialPerformanceItemFollow
record
);
int
insertSelective
(
SpecialPerformanceItemFollow
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SpecialPerformanceItemFollow
selectOneByExample
(
SpecialPerformanceItemFollowExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SpecialPerformanceItemFollow
selectOneByExampleSelective
(
@Param
(
"example"
)
SpecialPerformanceItemFollowExample
example
,
@Param
(
"selective"
)
SpecialPerformanceItemFollow
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
SpecialPerformanceItemFollow
>
selectByExampleSelective
(
@Param
(
"example"
)
SpecialPerformanceItemFollowExample
example
,
@Param
(
"selective"
)
SpecialPerformanceItemFollow
.
Column
...
selective
);
List
<
SpecialPerformanceItemFollow
>
selectByExample
(
SpecialPerformanceItemFollowExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table special_performance_item_follow
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SpecialPerformanceItemFollow
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
SpecialPerformanceItemFollow
.
Column
...
selective
);
SpecialPerformanceItemFollow
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
SpecialPerformanceItemFollow
record
,
@Param
(
"example"
)
SpecialPerformanceItemFollowExample
example
);
int
updateByExample
(
@Param
(
"record"
)
SpecialPerformanceItemFollow
record
,
@Param
(
"example"
)
SpecialPerformanceItemFollowExample
example
);
int
updateByPrimaryKeySelective
(
SpecialPerformanceItemFollow
record
);
int
updateByPrimaryKey
(
SpecialPerformanceItemFollow
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/SpecialPerformanceItemFollowMapper.xml
0 → 100644
View file @
a0c692fe
<?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.distribution.SpecialPerformanceItemFollowMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollow"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"special_performance_id"
jdbcType=
"INTEGER"
property=
"specialPerformanceId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"creator_id"
jdbcType=
"BIGINT"
property=
"creatorId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</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, special_performance_id, item_id, creator_id, user_id, `state`, create_time, update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollowExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from special_performance_item_follow
<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, special_performance_id, item_id, creator_id, user_id, `state`, create_time, update_time
</otherwise>
</choose>
from special_performance_item_follow
<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 special_performance_item_follow
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, special_performance_id, item_id, creator_id, user_id, `state`, create_time, update_time
</otherwise>
</choose>
from special_performance_item_follow
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from special_performance_item_follow
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollowExample"
>
delete from special_performance_item_follow
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollow"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into special_performance_item_follow (special_performance_id, item_id, creator_id,
user_id, `state`, create_time,
update_time)
values (#{specialPerformanceId,jdbcType=INTEGER}, #{itemId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
#{userId,jdbcType=BIGINT}, #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollow"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into special_performance_item_follow
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"specialPerformanceId != null"
>
special_performance_id,
</if>
<if
test=
"itemId != null"
>
item_id,
</if>
<if
test=
"creatorId != null"
>
creator_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"state != null"
>
`state`,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"specialPerformanceId != null"
>
#{specialPerformanceId,jdbcType=INTEGER},
</if>
<if
test=
"itemId != null"
>
#{itemId,jdbcType=BIGINT},
</if>
<if
test=
"creatorId != null"
>
#{creatorId,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"state != null"
>
#{state,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollowExample"
resultType=
"java.lang.Long"
>
select count(*) from special_performance_item_follow
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update special_performance_item_follow
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.specialPerformanceId != null"
>
special_performance_id = #{record.specialPerformanceId,jdbcType=INTEGER},
</if>
<if
test=
"record.itemId != null"
>
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if
test=
"record.creatorId != null"
>
creator_id = #{record.creatorId,jdbcType=BIGINT},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.state != null"
>
`state` = #{record.state,jdbcType=INTEGER},
</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>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update special_performance_item_follow
set id = #{record.id,jdbcType=BIGINT},
special_performance_id = #{record.specialPerformanceId,jdbcType=INTEGER},
item_id = #{record.itemId,jdbcType=BIGINT},
creator_id = #{record.creatorId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
`state` = #{record.state,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollow"
>
update special_performance_item_follow
<set>
<if
test=
"specialPerformanceId != null"
>
special_performance_id = #{specialPerformanceId,jdbcType=INTEGER},
</if>
<if
test=
"itemId != null"
>
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if
test=
"creatorId != null"
>
creator_id = #{creatorId,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"state != null"
>
`state` = #{state,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollow"
>
update special_performance_item_follow
set special_performance_id = #{specialPerformanceId,jdbcType=INTEGER},
item_id = #{itemId,jdbcType=BIGINT},
creator_id = #{creatorId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
`state` = #{state,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.SpecialPerformanceItemFollowExample"
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 special_performance_item_follow
<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, special_performance_id, item_id, creator_id, user_id, `state`, create_time, update_time
</otherwise>
</choose>
from special_performance_item_follow
<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/generatorConfig_new.xml
View file @
a0c692fe
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
targetProject=
"ch-dao/src/main/java"
/>
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
disposable_subscribe_record
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
special_performance_item_follow
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
View file @
a0c692fe
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.wx.impl.distribution;
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.wx.impl.distribution;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.core.api.WxAppletApi
;
import
com.wwdz.ch.core.api.WxAppletApi
;
import
com.wwdz.ch.core.consts.AuctionEnum
;
import
com.wwdz.ch.core.consts.AuctionEnum
;
import
com.wwdz.ch.core.consts.DisposableSubscribeRecordEnum
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.SpecialPerformanceEnum
;
import
com.wwdz.ch.core.consts.SpecialPerformanceEnum
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
...
@@ -12,6 +13,7 @@ import com.wwdz.ch.core.type.Result;
...
@@ -12,6 +13,7 @@ import com.wwdz.ch.core.type.Result;
import
com.wwdz.ch.core.util.MediaUtil
;
import
com.wwdz.ch.core.util.MediaUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.db.dao.DisposableSubscribeRecordDao
;
import
com.wwdz.ch.db.dao.UserDao
;
import
com.wwdz.ch.db.dao.UserDao
;
import
com.wwdz.ch.db.dao.distribution.*
;
import
com.wwdz.ch.db.dao.distribution.*
;
import
com.wwdz.ch.db.domain.User
;
import
com.wwdz.ch.db.domain.User
;
...
@@ -70,6 +72,9 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -70,6 +72,9 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
DisposableSubscribeRecordDao
disposableSubscribeRecordDao
;
private
final
static
String
SPECIAL_PERFORMANCE_URL
=
"/pages/saleSpecialList/index"
;
private
final
static
String
SPECIAL_PERFORMANCE_URL
=
"/pages/saleSpecialList/index"
;
private
final
static
String
SPECIAL_PERFORMANCE_PROGRESS_SEND_MSG_KEY
=
"SPECIAL_PERFORMANCE_PROGRESS_SEND_MSG_KEY:"
;
private
final
static
String
SPECIAL_PERFORMANCE_PROGRESS_SEND_MSG_KEY
=
"SPECIAL_PERFORMANCE_PROGRESS_SEND_MSG_KEY:"
;
...
@@ -389,6 +394,11 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -389,6 +394,11 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
resultMap
.
put
(
"endTime"
,
specialPerformance
.
getEndTime
());
resultMap
.
put
(
"endTime"
,
specialPerformance
.
getEndTime
());
resultMap
.
put
(
"title"
,
specialPerformance
.
getTitle
());
resultMap
.
put
(
"title"
,
specialPerformance
.
getTitle
());
resultMap
.
put
(
"specialPerformanceId"
,
specialPerformance
.
getId
());
resultMap
.
put
(
"specialPerformanceId"
,
specialPerformance
.
getId
());
//判断用户是否订阅过消息
resultMap
.
put
(
"subscribeStart"
,
disposableSubscribeRecordDao
.
isSubscribed
(
dto
.
getUserId
(),
specialPerformance
.
getId
(),
DisposableSubscribeRecordEnum
.
TypeEnum
.
PRE_START
.
getType
()));
resultMap
.
put
(
"subscribeEnd"
,
disposableSubscribeRecordDao
.
isSubscribed
(
dto
.
getUserId
(),
specialPerformance
.
getId
(),
DisposableSubscribeRecordEnum
.
TypeEnum
.
PRE_END
.
getType
()));
//当前时间大于专场结束时间则修改专场的状态
//当前时间大于专场结束时间则修改专场的状态
if
(
now
.
after
(
specialPerformance
.
getEndTime
()))
{
if
(
now
.
after
(
specialPerformance
.
getEndTime
()))
{
SpecialPerformance
updateDto
=
new
SpecialPerformance
();
SpecialPerformance
updateDto
=
new
SpecialPerformance
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
View file @
a0c692fe
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.wx.job;
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.wx.job;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.core.api.WxAppletApi
;
import
com.wwdz.ch.core.api.WxAppletApi
;
import
com.wwdz.ch.core.consts.AuctionEnum
;
import
com.wwdz.ch.core.consts.AuctionEnum
;
import
com.wwdz.ch.core.consts.DisposableSubscribeRecordEnum
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.SpecialPerformanceEnum
;
import
com.wwdz.ch.core.consts.SpecialPerformanceEnum
;
import
com.wwdz.ch.core.entity.AuctionOfferNoticeMsg
;
import
com.wwdz.ch.core.entity.AuctionOfferNoticeMsg
;
...
@@ -12,6 +13,7 @@ import com.wwdz.ch.core.type.Result;
...
@@ -12,6 +13,7 @@ import com.wwdz.ch.core.type.Result;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.core.util.StringUtil
;
import
com.wwdz.ch.core.util.StringUtil
;
import
com.wwdz.ch.db.dao.DisposableSubscribeRecordDao
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.dao.UserDao
;
import
com.wwdz.ch.db.dao.UserDao
;
import
com.wwdz.ch.db.dao.distribution.*
;
import
com.wwdz.ch.db.dao.distribution.*
;
...
@@ -20,10 +22,12 @@ import com.wwdz.ch.db.domain.User;
...
@@ -20,10 +22,12 @@ import com.wwdz.ch.db.domain.User;
import
com.wwdz.ch.db.domain.distribution.*
;
import
com.wwdz.ch.db.domain.distribution.*
;
import
com.wwdz.ch.db.dto.request.FollowFansRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.FollowFansRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.UserRequestDto
;
import
com.wwdz.ch.db.dto.request.UserRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.DisposableSubscribeRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceConfigRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceConfigRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceRequestDto
;
import
com.wwdz.ch.wx.service.distribution.DistributionOrderService
;
import
com.wwdz.ch.wx.service.distribution.DistributionOrderService
;
import
com.xxdxxs.utils.DateUtils
;
import
com.xxdxxs.utils.DateUtils
;
import
com.xxdxxs.utils.JsonUtils
;
import
com.xxdxxs.utils.StringUtils
;
import
com.xxdxxs.utils.StringUtils
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.redisson.api.RedissonClient
;
...
@@ -85,6 +89,10 @@ public class SpecialPerformanceNoticeJob {
...
@@ -85,6 +89,10 @@ public class SpecialPerformanceNoticeJob {
@Autowired
@Autowired
FollowFansRecordDao
followFansRecordDao
;
FollowFansRecordDao
followFansRecordDao
;
@Autowired
DisposableSubscribeRecordDao
disposableSubscribeRecordDao
;
@Value
(
"${spring.profiles.active}"
)
@Value
(
"${spring.profiles.active}"
)
private
String
env
;
private
String
env
;
...
@@ -124,64 +132,51 @@ public class SpecialPerformanceNoticeJob {
...
@@ -124,64 +132,51 @@ public class SpecialPerformanceNoticeJob {
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>> dev环境, 不执行专场即将开始通知任务<<<<<<<<<<<<<<<<<<<<<"
);
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>> dev环境, 不执行专场即将开始通知任务<<<<<<<<<<<<<<<<<<<<<"
);
return
;
return
;
}
}
//正式环境测试, 不发送消息
/* if (true) {
logger.info(">>>>>>>>>>>>>>>>>>>>>>> 正式环境测试, 不执行专场即将开始通知任务<<<<<<<<<<<<<<<<<<<<<");
return;
}*/
logger
.
info
(
"当前即将开始的专场id:{}, 名称为 {} "
,
specialPerformance
.
getId
(),
specialPerformance
.
getTitle
());
logger
.
info
(
"当前即将开始的专场id:{}, 名称为 {} "
,
specialPerformance
.
getId
(),
specialPerformance
.
getTitle
());
//查询专场的商品所属藏家
//发送专场开始订阅通知
Long
creatorId
=
null
;
DisposableSubscribeRecordRequestDto
disposableSubscribeRecordRequestDto
=
new
DisposableSubscribeRecordRequestDto
();
SpecialPerformanceConfigRequestDto
specialPerformanceConfigRequestDto
=
new
SpecialPerformanceConfigRequestDto
();
disposableSubscribeRecordRequestDto
.
setTargetId
(
Long
.
valueOf
(
specialPerformance
.
getId
()));
specialPerformanceConfigRequestDto
.
setSpecialPerformanceId
(
specialPerformance
.
getId
());
disposableSubscribeRecordRequestDto
.
setType
(
DisposableSubscribeRecordEnum
.
TypeEnum
.
PRE_START
.
getType
());
List
<
SpecialPerformanceConfig
>
specialPerformanceConfigList
=
specialPerformanceConfigDao
.
findList
(
specialPerformanceConfigRequestDto
);
if
(!
CollectionUtils
.
isEmpty
(
specialPerformanceConfigList
))
{
SpecialPerformanceConfig
specialPerformanceConfig
=
specialPerformanceConfigList
.
get
(
0
);
long
itemId
=
specialPerformanceConfig
.
getItemId
();
AuctionConfig
auctionConfig
=
auctionConfigDao
.
findByItemId
(
itemId
);
if
(
auctionConfig
==
null
)
{
return
;
}
creatorId
=
auctionConfig
.
getCreatorId
();
//查询该用户的粉丝列表
}
if
(
creatorId
==
null
)
{
logger
.
error
(
"================ 专场商品所属藏家id为空,不发送通知 ================ "
);
return
;
}
//发送短信通知
String
url
=
wxAppletApi
.
getUrlLink
(
SPECIAL_PERFORMANCE_URL
,
"specialId="
+
specialPerformance
.
getId
());
String
msg
=
specialPerformance
.
getTitle
()
+
"将在"
+
DateUtils
.
toString
(
specialPerformance
.
getStartTime
())
+
"开始,请前往"
+
url
+
"查看"
;
boolean
hasNextPage
=
true
;
boolean
hasNextPage
=
true
;
int
page
=
1
;
int
page
=
1
;
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
(
);
String
url
=
wxAppletApi
.
getUrlLink
(
SPECIAL_PERFORMANCE_URL
,
"specialId="
+
specialPerformance
.
getId
()
);
followFansRecordRequestDto
.
setFollowerId
(
creatorId
)
;
String
msg
=
specialPerformance
.
getTitle
()
+
"将在"
+
DateUtils
.
toString
(
specialPerformance
.
getStartTime
())
+
"开始,请前往"
+
url
+
"查看"
;
while
(
hasNextPage
)
{
while
(
hasNextPage
)
{
List
<
FollowFansRecord
>
followFansRecordList
=
followFansRecordDao
.
findList
(
followFansRecordRequestDto
);
List
<
DisposableSubscribeRecord
>
disposableSubscribeRecordList
=
disposableSubscribeRecordDao
.
findList
(
disposableSubscribeRecordRequestDto
);
PageInfo
pageInfo
=
new
PageInfo
(
followFansRecordList
);
PageInfo
pageInfo
=
new
PageInfo
(
disposableSubscribeRecordList
);
for
(
FollowFansRecord
followFansRecord
:
followFansRecordList
)
{
for
(
DisposableSubscribeRecord
disposableSubscribeRecord
:
disposableSubscribeRecordList
)
{
long
userId
=
followFansRecord
.
getFansId
();
AuctionOfferNoticeMsg
auctionOfferNoticeMsg
=
new
AuctionOfferNoticeMsg
();
auctionOfferNoticeMsg
.
setSpecialPerformanceTitle
(
specialPerformance
.
getTitle
());
auctionOfferNoticeMsg
.
setSpecialPerformanceStartTime
(
DateUtils
.
toString
(
specialPerformance
.
getStartTime
()));
auctionOfferNoticeMsg
.
setOpenId
(
disposableSubscribeRecord
.
getOpenid
());
Result
result
=
sendMsgService
.
sendSpecialPerformanceStartMsg
(
auctionOfferNoticeMsg
);
if
(!
result
.
getSuccess
())
{
String
errorCode
=
JsonUtils
.
getValueByPath
(
result
.
getData
().
toString
(),
"errcode"
);
//用户为订阅消息,43101用户未订阅消息;43108并发下发消息给同一个粉丝,这两种情况表示用户不需要被通知
if
(!
"43101"
.
equals
(
errorCode
)
&&
!
"43108"
.
equals
(
errorCode
))
{
//发订阅消息送失败发短信
long
userId
=
disposableSubscribeRecord
.
getUserId
();
aliSmsSender
.
sendSms
(
userId
,
msg
);
aliSmsSender
.
sendSms
(
userId
,
msg
);
}
}
}
else
{
//发送成功后订阅状态改为无效
disposableSubscribeRecordDao
.
updateInvalid
(
disposableSubscribeRecord
.
getOpenid
(),
disposableSubscribeRecord
.
getTargetId
(),
disposableSubscribeRecord
.
getTemplateId
());
}
}
if
(
pageInfo
.
isHasNextPage
())
{
if
(
pageInfo
.
isHasNextPage
())
{
page
=
page
+
1
;
page
=
page
+
1
;
followFans
RecordRequestDto
.
setPage
(
page
);
disposableSubscribe
RecordRequestDto
.
setPage
(
page
);
logger
.
info
(
"要发送
短信通知
的用户数据总页数为 : {}, 当前为 : {}"
,
pageInfo
.
getPages
(),
page
);
logger
.
info
(
"要发送
专场开始订阅消息
的用户数据总页数为 : {}, 当前为 : {}"
,
pageInfo
.
getPages
(),
page
);
}
else
{
}
else
{
hasNextPage
=
false
;
logger
.
info
(
"============= 发送专场开始订阅消息循环结束 ============="
);
logger
.
info
(
"============= 发送专场开始短信循环结束 ============="
);
break
;
}
if
(
page
>
500
)
{
hasNextPage
=
false
;
logger
.
info
(
"============= 发送专场开始短信超出上限,停止发送 ============="
);
}
}
}
}
logger
.
info
(
"================专场id: {}, 即将开始通知
任务,提醒短信
发送成功 =============="
,
specialPerformance
.
getId
());
logger
.
info
(
"================专场id: {}, 即将开始通知
消息全部
发送成功 =============="
,
specialPerformance
.
getId
());
redisUtils
.
set
(
abortStartKey
,
specialPerformance
.
getId
(),
3600
*
24
);
redisUtils
.
set
(
abortStartKey
,
specialPerformance
.
getId
(),
3600
*
24
);
}
else
{
}
else
{
logger
.
info
(
"================专场id: {}, 通知任务已经完成,无需重复发送 =============="
,
specialPerformance
.
getId
());
logger
.
info
(
"================专场id: {},
即将开始
通知任务已经完成,无需重复发送 =============="
,
specialPerformance
.
getId
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"专场即将开始通知任务 error {}"
,
e
);
logger
.
error
(
"专场即将开始通知任务 error {}"
,
e
);
...
...
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