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
2571dcae
Commit
2571dcae
authored
Oct 12, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自测账号不发送短信
parent
905ee60f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
13 deletions
+63
-13
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
...ore/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
+8
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SpecialPerformanceDao.java
...om/wwdz/ch/db/dao/distribution/SpecialPerformanceDao.java
+7
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SpecialPerformanceDaoImpl.java
...dz/ch/db/impl/distribution/SpecialPerformanceDaoImpl.java
+18
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/AuctionRecordServiceImpl.java
...wdz/ch/wx/impl/distribution/AuctionRecordServiceImpl.java
+3
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+6
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
...h/wx/impl/distribution/SpecialPerformanceServiceImpl.java
+9
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/AutoSendMsgJob.java
...-api/src/main/java/com/wwdz/ch/wx/job/AutoSendMsgJob.java
+12
-5
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
View file @
2571dcae
...
@@ -3,6 +3,8 @@ package com.wwdz.ch.core.consts;
...
@@ -3,6 +3,8 @@ package com.wwdz.ch.core.consts;
import
tk.mybatis.spring.mapper.SpringBootBindUtil
;
import
tk.mybatis.spring.mapper.SpringBootBindUtil
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.List
;
/**
/**
* 一些常用的参数定义
* 一些常用的参数定义
...
@@ -156,4 +158,10 @@ public interface CommConsts {
...
@@ -156,4 +158,10 @@ public interface CommConsts {
* 默认介绍佣金比例
* 默认介绍佣金比例
*/
*/
public
final
static
double
REBATE
=
0.03
;
public
final
static
double
REBATE
=
0.03
;
/**
* 自测账号,不发送短信
*/
public
static
final
List
<
Long
>
NOT_SEND_MSG_USERID
=
Arrays
.
asList
(
9357942L
,
42273900L
,
290775L
,
61091901L
,
299497L
,
61097938L
,
61113888L
,
60652774L
,
60684039L
,
42192256L
,
60652774L
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SpecialPerformanceDao.java
View file @
2571dcae
...
@@ -19,5 +19,12 @@ public interface SpecialPerformanceDao {
...
@@ -19,5 +19,12 @@ public interface SpecialPerformanceDao {
int
insert
(
SpecialPerformance
specialPerformance
);
int
insert
(
SpecialPerformance
specialPerformance
);
/**
* 查询当天结束的专场
* @param dto
* @return
*/
List
<
SpecialPerformance
>
findTodayEndList
();
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SpecialPerformanceDaoImpl.java
View file @
2571dcae
...
@@ -7,9 +7,13 @@ import com.wwdz.ch.db.domain.distribution.SpecialPerformanceExample;
...
@@ -7,9 +7,13 @@ import com.wwdz.ch.db.domain.distribution.SpecialPerformanceExample;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SpecialPerformanceRequestDto
;
import
com.wwdz.ch.db.mapper.distribution.SpecialPerformanceMapper
;
import
com.wwdz.ch.db.mapper.distribution.SpecialPerformanceMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
com.xxdxxs.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -78,4 +82,18 @@ public class SpecialPerformanceDaoImpl implements SpecialPerformanceDao {
...
@@ -78,4 +82,18 @@ public class SpecialPerformanceDaoImpl implements SpecialPerformanceDao {
specialPerformanceMapper
.
insert
(
specialPerformance
);
specialPerformanceMapper
.
insert
(
specialPerformance
);
return
specialPerformance
.
getId
();
return
specialPerformance
.
getId
();
}
}
@Override
public
List
<
SpecialPerformance
>
findTodayEndList
()
{
SpecialPerformanceExample
example
=
new
SpecialPerformanceExample
();
SpecialPerformanceExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andStateEqualTo
(
3
);
criteria
.
andEndTimeLessThanOrEqualTo
(
new
Date
());
LocalDate
currentLD
=
LocalDate
.
now
();
LocalDateTime
startOfDay
=
currentLD
.
atStartOfDay
();
criteria
.
andEndTimeGreaterThan
(
DateUtils
.
fromLocalDateTime
(
startOfDay
));
return
specialPerformanceMapper
.
selectByExample
(
example
);
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/AuctionRecordServiceImpl.java
View file @
2571dcae
...
@@ -56,8 +56,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
...
@@ -56,8 +56,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AuctionRecordServiceImpl
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AuctionRecordServiceImpl
.
class
);
private
static
final
List
<
Long
>
NOT_SEND_MSG_USERID
=
Arrays
.
asList
(
9357942L
,
42273900L
,
290775L
,
61091901L
,
299497L
,
61097938L
,
61113888L
,
60652774L
,
60684039L
,
42192256L
,
60652774L
);
@Value
(
"${dts.wx.auction-msg-url}"
)
@Value
(
"${dts.wx.auction-msg-url}"
)
private
String
AUCTION_MSG_URL
;
private
String
AUCTION_MSG_URL
;
...
@@ -170,7 +169,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
...
@@ -170,7 +169,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
itemId
+
"&shareRecordId="
);
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
itemId
+
"&shareRecordId="
);
String
msg
=
"您出价过的拍品"
+
supplierItem
.
getName
()
+
"的价格被其他人超越了, 当前价是"
+
PriceUtil
.
convertPriceFenToYuan
(
price
)
+
String
msg
=
"您出价过的拍品"
+
supplierItem
.
getName
()
+
"的价格被其他人超越了, 当前价是"
+
PriceUtil
.
convertPriceFenToYuan
(
price
)
+
"元,竞拍截止时间是"
+
DateUtils
.
toString
(
endTime
)
+
", 请前往"
+
url
+
"查看"
;
"元,竞拍截止时间是"
+
DateUtils
.
toString
(
endTime
)
+
", 请前往"
+
url
+
"查看"
;
if
(!
NOT_SEND_MSG_USERID
.
contains
(
auctionRecord
.
getUserId
()))
{
if
(!
CommConsts
.
NOT_SEND_MSG_USERID
.
contains
(
auctionRecord
.
getUserId
()))
{
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
}
}
}
}
...
@@ -178,7 +177,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
...
@@ -178,7 +177,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
itemId
+
"&shareRecordId="
);
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
itemId
+
"&shareRecordId="
);
String
msg
=
"您出价过的拍品"
+
supplierItem
.
getName
()
+
"的价格被其他人超越了, 当前价是"
+
PriceUtil
.
convertPriceFenToYuan
(
price
)
+
String
msg
=
"您出价过的拍品"
+
supplierItem
.
getName
()
+
"的价格被其他人超越了, 当前价是"
+
PriceUtil
.
convertPriceFenToYuan
(
price
)
+
"元,竞拍截止时间是"
+
DateUtils
.
toString
(
endTime
)
+
", 请前往"
+
url
+
"查看"
;
"元,竞拍截止时间是"
+
DateUtils
.
toString
(
endTime
)
+
", 请前往"
+
url
+
"查看"
;
if
(!
NOT_SEND_MSG_USERID
.
contains
(
auctionRecord
.
getUserId
()))
{
if
(!
CommConsts
.
NOT_SEND_MSG_USERID
.
contains
(
auctionRecord
.
getUserId
()))
{
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
}
}
}
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
2571dcae
...
@@ -353,14 +353,18 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -353,14 +353,18 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
supplierItem
.
getId
()
+
"&shareRecordId="
);
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
supplierItem
.
getId
()
+
"&shareRecordId="
);
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
if
(!
CommConsts
.
NOT_SEND_MSG_USERID
.
contains
(
auctionRecord
.
getUserId
()))
{
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
}
}
}
}
else
{
}
else
{
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
supplierItem
.
getId
()
+
"&shareRecordId="
);
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
supplierItem
.
getId
()
+
"&shareRecordId="
);
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
if
(!
CommConsts
.
NOT_SEND_MSG_USERID
.
contains
(
auctionRecord
.
getUserId
()))
{
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
aliSmsSender
.
sendSms
(
auctionRecord
.
getUserId
(),
msg
);
}
}
}
return
Result
.
success
(
map
);
return
Result
.
success
(
map
);
}
else
{
}
else
{
return
Result
.
failed
(
"稍后再试"
);
return
Result
.
failed
(
"稍后再试"
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
View file @
2571dcae
...
@@ -198,10 +198,17 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -198,10 +198,17 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
dto
.
setStateList
(
Arrays
.
asList
(
SpecialPerformanceEnum
.
StateEnum
.
PREVIEW
.
getCode
(),
SpecialPerformanceEnum
.
StateEnum
.
PROCESSING
.
getCode
()));
dto
.
setStateList
(
Arrays
.
asList
(
SpecialPerformanceEnum
.
StateEnum
.
PREVIEW
.
getCode
(),
SpecialPerformanceEnum
.
StateEnum
.
PROCESSING
.
getCode
()));
List
<
SpecialPerformance
>
specialPerformances
=
specialPerformanceDao
.
findByType
(
dto
);
List
<
SpecialPerformance
>
specialPerformances
=
specialPerformanceDao
.
findByType
(
dto
);
if
(
CollectionUtils
.
isEmpty
(
specialPerformances
))
{
//查询当天结束的专场
List
<
SpecialPerformance
>
endSpecialPerformances
=
specialPerformanceDao
.
findTodayEndList
();
if
(
CollectionUtils
.
isEmpty
(
specialPerformances
)
&&
CollectionUtils
.
isEmpty
(
endSpecialPerformances
))
{
return
Result
.
success
(
resultList
);
return
Result
.
success
(
resultList
);
}
}
for
(
SpecialPerformance
specialPerformance
:
specialPerformances
)
{
List
<
SpecialPerformance
>
allList
=
new
ArrayList
<>();
allList
.
addAll
(
specialPerformances
);
allList
.
addAll
(
endSpecialPerformances
);
for
(
SpecialPerformance
specialPerformance
:
allList
)
{
SpecialPerformanceVo
specialPerformanceVo
=
new
SpecialPerformanceVo
();
SpecialPerformanceVo
specialPerformanceVo
=
new
SpecialPerformanceVo
();
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/AutoSendMsgJob.java
View file @
2571dcae
package
com.wwdz.ch.wx.job
;
package
com.wwdz.ch.wx.job
;
import
com.wwdz.ch.core.consts.AuctionEnum
;
import
com.wwdz.ch.core.consts.AuctionEnum
;
import
com.wwdz.ch.core.consts.CommConsts
;
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.notify.AliSmsSender
;
import
com.wwdz.ch.core.notify.AliSmsSender
;
...
@@ -144,7 +145,9 @@ public class AutoSendMsgJob {
...
@@ -144,7 +145,9 @@ public class AutoSendMsgJob {
}*/
}*/
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
itemId
+
"&shareRecordId="
);
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
itemId
+
"&shareRecordId="
);
String
msg
=
"您出过价的拍品"
+
supplierItem
.
getName
()
+
",将在1小时内结束,请前往"
+
url
+
"查看"
;
String
msg
=
"您出过价的拍品"
+
supplierItem
.
getName
()
+
",将在1小时内结束,请前往"
+
url
+
"查看"
;
if
(!
CommConsts
.
NOT_SEND_MSG_USERID
.
contains
(
userId
))
{
aliSmsSender
.
sendSms
(
userId
,
msg
);
aliSmsSender
.
sendSms
(
userId
,
msg
);
}
logger
.
info
(
"================商品id:{}, 将在1小时内结束,提醒短信发送成功 =============="
,
supplierItem
.
getId
());
logger
.
info
(
"================商品id:{}, 将在1小时内结束,提醒短信发送成功 =============="
,
supplierItem
.
getId
());
redisUtils
.
set
(
abortEndKey
,
itemId
,
3600
*
2
);
redisUtils
.
set
(
abortEndKey
,
itemId
,
3600
*
2
);
}
}
...
@@ -211,13 +214,17 @@ public class AutoSendMsgJob {
...
@@ -211,13 +214,17 @@ public class AutoSendMsgJob {
//发短信
//发短信
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
if
(!
CommConsts
.
NOT_SEND_MSG_USERID
.
contains
(
userId
))
{
aliSmsSender
.
sendSms
(
userId
,
msg
);
aliSmsSender
.
sendSms
(
userId
,
msg
);
}
}
}
}
else
{
}
else
{
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
supplierItem
.
getId
()
+
"&shareRecordId="
);
String
url
=
wxAppletApi
.
getUrlLink
(
AUCTION_MSG_URL
,
"itemId="
+
supplierItem
.
getId
()
+
"&shareRecordId="
);
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
String
msg
=
"您已中拍"
+
supplierItem
.
getName
()
+
",成交价是"
+
PriceUtil
.
convertPriceFenToYuan
(
distributionOrder
.
getAmount
())
+
"元,请在"
+
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
DateUtils
.
toString
(
payEndTime
)
+
"前完成付款,请前往"
+
url
+
"查看"
;
if
(!
CommConsts
.
NOT_SEND_MSG_USERID
.
contains
(
userId
))
{
aliSmsSender
.
sendSms
(
userId
,
msg
);
aliSmsSender
.
sendSms
(
userId
,
msg
);
}
logger
.
info
(
"================订单号:{}, 催付款短信通知发送成功 =============="
,
distributionOrder
.
getDistributionOrderId
());
logger
.
info
(
"================订单号:{}, 催付款短信通知发送成功 =============="
,
distributionOrder
.
getDistributionOrderId
());
}
}
redisUtils
.
set
(
key
,
distributionOrder
.
getDistributionOrderId
(),
3600
*
24
);
redisUtils
.
set
(
key
,
distributionOrder
.
getDistributionOrderId
(),
3600
*
24
);
...
...
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