Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
a1dfefbb
Commit
a1dfefbb
authored
Aug 27, 2019
by
杨涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理打卡旧数据
parent
97402fdb
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
180 additions
and
38 deletions
+180
-38
BookClockInfoService.java
...a/com/pcloud/book/clock/service/BookClockInfoService.java
+4
-0
BookClockBiz.java
...src/main/java/com/pcloud/book/clock/biz/BookClockBiz.java
+4
-0
BookClockBizImpl.java
...java/com/pcloud/book/clock/biz/impl/BookClockBizImpl.java
+32
-0
BookClockInfoDao.java
...main/java/com/pcloud/book/clock/dao/BookClockInfoDao.java
+2
-0
BookGroupClockDao.java
...ain/java/com/pcloud/book/clock/dao/BookGroupClockDao.java
+4
-0
BookClockInfoDaoImpl.java
.../com/pcloud/book/clock/dao/impl/BookClockInfoDaoImpl.java
+6
-0
BookGroupClockDaoImpl.java
...com/pcloud/book/clock/dao/impl/BookGroupClockDaoImpl.java
+15
-0
BookClockInfoServiceImpl.java
...oud/book/clock/service/impl/BookClockInfoServiceImpl.java
+13
-0
WeixinClockBizImpl.java
.../pcloud/book/weixinclock/biz/impl/WeixinClockBizImpl.java
+65
-36
WeixinClockCheckImpl.java
...oud/book/weixinclock/check/impl/WeixinClockCheckImpl.java
+2
-2
BookClockInfo.Mapper.xml
.../src/main/resources/mapper/clock/BookClockInfo.Mapper.xml
+6
-0
BookGroupClock.Mapper.xml
...src/main/resources/mapper/clock/BookGroupClock.Mapper.xml
+27
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/clock/service/BookClockInfoService.java
View file @
a1dfefbb
...
...
@@ -24,5 +24,9 @@ public interface BookClockInfoService {
@PostMapping
(
"/sendBookClockGroupMessage"
)
void
sendBookClockGroupMessage
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
BizException
;
@ApiOperation
(
value
=
"处理关联应用的打卡的旧数据"
,
httpMethod
=
"GET"
)
@RequestMapping
(
value
=
"/dealOldData4WeixinClock"
,
method
=
RequestMethod
.
GET
)
void
dealOldData4WeixinClock
();
}
pcloud-service-book/src/main/java/com/pcloud/book/clock/biz/BookClockBiz.java
View file @
a1dfefbb
...
...
@@ -67,4 +67,8 @@ public interface BookClockBiz {
*/
void
deleteBookGroupClock
(
Long
bookClockInfoId
,
Long
adviserId
);
/**
* 处理关联应用的打卡的旧数据
*/
void
dealOldData4WeixinClock
();
}
pcloud-service-book/src/main/java/com/pcloud/book/clock/biz/impl/BookClockBizImpl.java
View file @
a1dfefbb
...
...
@@ -28,6 +28,8 @@ import com.pcloud.book.group.dao.WeixinQrcodeDao;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.BookWxQrcodeDTO
;
import
com.pcloud.book.group.dto.ClassifyDTO
;
import
com.pcloud.book.weixinclock.biz.WeixinClockBiz
;
import
com.pcloud.book.weixinclock.dto.WeixinClockDto
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBean
;
...
...
@@ -48,6 +50,8 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -84,6 +88,8 @@ public class BookClockBizImpl implements BookClockBiz {
private
ScheduleService
scheduleService
;
@Autowired
private
WeixinQrcodeDao
weixinQrcodeDao
;
@Autowired
private
WeixinClockBiz
weixinClockBiz
;
/**
...
...
@@ -416,4 +422,30 @@ public class BookClockBizImpl implements BookClockBiz {
throw
new
BookBizException
(
BookBizException
.
ERROR
,
"删除定时任务失败!"
);
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
dealOldData4WeixinClock
()
{
new
Thread
(()
->
{
WeixinClockDto
weixinClockDto
=
new
WeixinClockDto
();
weixinClockDto
.
setClockGuide
(
"每日打卡,养成良好习惯"
);
weixinClockDto
.
setClockIntroduction
(
"欢迎加入打卡,每天一次,养成良好习惯"
);
weixinClockDto
.
setClockKeyword
(
"每日打卡"
);
List
<
BookClockInfoDTO
>
clockInfoIds
=
bookClockInfoDao
.
getAllClockInfoIds
();
if
(!
ListUtils
.
isEmpty
(
clockInfoIds
)){
for
(
BookClockInfoDTO
bookClockInfoDTO:
clockInfoIds
){
List
<
Long
>
list1
=
bookGroupClockDao
.
getClassifyIdsByBookGroupId
(
bookClockInfoDTO
.
getBookClockInfoId
());
List
<
Long
>
list2
=
bookGroupClockDao
.
getClassifyIdsByClassfyId
(
bookClockInfoDTO
.
getBookClockInfoId
());
list1
.
addAll
(
list2
);
List
<
Long
>
resultList
=
list1
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
if
(!
ListUtils
.
isEmpty
(
resultList
))
{
weixinClockDto
.
setCreateUser
(
bookClockInfoDTO
.
getCreateUser
());
weixinClockDto
.
setLastModifiedUser
(
bookClockInfoDTO
.
getCreateUser
());
weixinClockDto
.
setGroupClassifyIds
(
resultList
);
weixinClockBiz
.
createWeixinClock
(
weixinClockDto
);
}
}
}
}).
start
();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/clock/dao/BookClockInfoDao.java
View file @
a1dfefbb
...
...
@@ -86,4 +86,6 @@ public interface BookClockInfoDao extends BaseDao<BookClockInfo> {
* @param paramMap
*/
void
deleteBookClockInfo
(
Map
<
String
,
Object
>
paramMap
);
List
<
BookClockInfoDTO
>
getAllClockInfoIds
();
}
pcloud-service-book/src/main/java/com/pcloud/book/clock/dao/BookGroupClockDao.java
View file @
a1dfefbb
...
...
@@ -70,4 +70,8 @@ public interface BookGroupClockDao extends BaseDao<BookGroupClock> {
* @param paramMap
*/
void
deleteBookGroupClock
(
Map
<
String
,
Object
>
paramMap
);
List
<
Long
>
getClassifyIdsByBookGroupId
(
Long
bookClockInfoId
);
List
<
Long
>
getClassifyIdsByClassfyId
(
Long
bookClockInfoId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/clock/dao/impl/BookClockInfoDaoImpl.java
View file @
a1dfefbb
...
...
@@ -135,5 +135,11 @@ public class BookClockInfoDaoImpl extends BaseDaoImpl<BookClockInfo> implements
super
.
sqlSessionTemplate
.
delete
(
getStatement
(
"deleteBookClockInfo"
),
paramMap
);
}
@Override
public
List
<
BookClockInfoDTO
>
getAllClockInfoIds
()
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
return
super
.
sqlSessionTemplate
.
selectList
(
getStatement
(
"getAllClockInfoIds"
),
paramMap
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/clock/dao/impl/BookGroupClockDaoImpl.java
View file @
a1dfefbb
...
...
@@ -6,6 +6,7 @@ import com.pcloud.book.clock.entity.BookGroupClock;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -100,4 +101,18 @@ public class BookGroupClockDaoImpl extends BaseDaoImpl<BookGroupClock> implement
public
void
deleteBookGroupClock
(
Map
<
String
,
Object
>
paramMap
)
{
super
.
sqlSessionTemplate
.
delete
(
getStatement
(
"deleteBookGroupClock"
),
paramMap
);
}
@Override
public
List
<
Long
>
getClassifyIdsByBookGroupId
(
Long
bookClockInfoId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"bookClockInfoId"
,
bookClockInfoId
);
return
super
.
sqlSessionTemplate
.
selectList
(
getStatement
(
"getClassifyIdsByBookGroupId"
),
paramMap
);
}
@Override
public
List
<
Long
>
getClassifyIdsByClassfyId
(
Long
bookClockInfoId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"bookClockInfoId"
,
bookClockInfoId
);
return
super
.
sqlSessionTemplate
.
selectList
(
getStatement
(
"getClassifyIdsByClassfyId"
),
paramMap
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/clock/service/impl/BookClockInfoServiceImpl.java
View file @
a1dfefbb
...
...
@@ -64,4 +64,17 @@ public class BookClockInfoServiceImpl implements BookClockInfoService {
// bookClockBiz.sendBookClockGroupMessage(map);
}
/**
* @description 处理关联应用的打卡的旧数据
* @author 杨涛
* @date 2019/5/10 10:28
*/
@Override
@RequestMapping
(
value
=
"/dealOldData4WeixinClock"
,
method
=
RequestMethod
.
GET
)
public
void
dealOldData4WeixinClock
()
{
bookClockBiz
.
dealOldData4WeixinClock
();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/weixinclock/biz/impl/WeixinClockBizImpl.java
View file @
a1dfefbb
...
...
@@ -9,6 +9,7 @@ import com.pcloud.book.clock.dto.PushBookClockKeywordDTO;
import
com.pcloud.book.consumer.app.AppConsr
;
import
com.pcloud.book.consumer.channel.QrcodeSceneConsr
;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.consumer.user.AdviserConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.group.biz.BookGroupClassifyBiz
;
import
com.pcloud.book.group.dao.BookGroupClassifyDao
;
...
...
@@ -122,6 +123,8 @@ public class WeixinClockBizImpl implements WeixinClockBiz {
private
WeixinClockCheck
weixinClockCheck
;
@Autowired
private
WeixinClockPrizeRecordDao
weixinClockPrizeRecordDao
;
@Autowired
private
AdviserConsr
adviserConsr
;
private
static
final
ThreadFactory
NAMED_THREAD_FACTORY
=
new
ThreadFactoryBuilder
()
.
setNameFormat
(
"weixinclock-pool-%d"
).
build
();
...
...
@@ -384,7 +387,7 @@ public class WeixinClockBizImpl implements WeixinClockBiz {
return
content
.
equalsIgnoreCase
(
aimKeyword
);
}
private
String
getClockRankUrl
(
Long
clockPrizeId
,
String
wxGroupId
,
String
wxUserId
){
private
String
getClockRankUrl
(
Long
adviserId
,
Long
clockPrizeId
,
String
wxGroupId
,
String
wxUserId
){
StringBuffer
sbu
=
new
StringBuffer
();
if
(
null
!=
clockPrizeId
&&
!
clockPrizeId
.
equals
(
0L
))
{
AppDto
appDto
=
appConsr
.
getBaseById
(
clockPrizeId
);
...
...
@@ -399,8 +402,24 @@ public class WeixinClockBizImpl implements WeixinClockBiz {
sbu
.
append
(
protocol
).
append
(
accountSettingDto
.
getDomain
()).
append
(
"/W"
)
.
append
(
accountSettingDto
.
getAccountSettingId
()).
append
(
"/clock"
).
append
(
"?wxGroupId="
)
.
append
(
wxGroupId
).
append
(
"&wxUserId="
).
append
(
wxUserId
);
return
UrlUtils
.
getShortUrl4Own
(
sbu
.
toString
());
}
if
(
null
!=
adviserId
&&
!
adviserId
.
equals
(
0L
)){
Long
channelId
=
adviserConsr
.
getDefaultChannel
(
adviserId
);
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
if
(
null
==
accountSettingDto
)
{
return
""
;
}
String
protocol
=
accountSettingDto
.
getProtocol
();
if
(
StringUtils
.
isEmpty
(
protocol
))
{
protocol
=
ChannelConstants
.
HTTP
;
}
sbu
.
append
(
protocol
).
append
(
accountSettingDto
.
getDomain
()).
append
(
"/W"
)
.
append
(
accountSettingDto
.
getAccountSettingId
()).
append
(
"/clock"
).
append
(
"?wxGroupId="
)
.
append
(
wxGroupId
).
append
(
"&wxUserId="
).
append
(
wxUserId
);
return
UrlUtils
.
getShortUrl4Own
(
sbu
.
toString
());
}
return
UrlUtils
.
getShortUrl4Own
(
sbu
.
toString
())
;
return
""
;
}
private
String
getClockRewardUrl
(
Long
clockPrizeId
){
...
...
@@ -452,8 +471,13 @@ public class WeixinClockBizImpl implements WeixinClockBiz {
WeixinClockDto
weixinClockDto
=
weixinClockGroupClassifyDao
.
getClockBaseInfoByClassify
(
classifyQrcodeInfo
.
getClassifyId
());
WeixinClockMember
clockMember
=
weixinClockMemberDao
.
getByWxUserId
(
wechatGroupId
,
userWxId
);
AppDto
appDto
=
appConsr
.
getBaseById
(
weixinClockDto
.
getClockPrizeId
());
appDto
=
null
==
appDto
?
new
AppDto
()
:
appDto
;
Long
wechatUserId
=
readerConsr
.
getWechatUserId
(
userWxId
,
appDto
.
getChannelId
());
Long
channelId
=
null
;
if
(
null
==
appDto
)
{
channelId
=
adviserConsr
.
getDefaultChannel
(
weixinClockDto
.
getCreateUser
());
}
else
{
channelId
=
appDto
.
getChannelId
();
}
Long
wechatUserId
=
readerConsr
.
getWechatUserId
(
userWxId
,
channelId
);
GroupUserDTO
groupUserDTO
=
wechatGroupConsr
.
getWxUserInfoByWxUserId
(
userWxId
);
groupUserDTO
=
null
==
groupUserDTO
?
new
GroupUserDTO
()
:
groupUserDTO
;
Long
weixinClockMemberId
=
clockMember
==
null
?
null
:
clockMember
.
getWeixinClockMemberId
();
...
...
@@ -493,48 +517,53 @@ public class WeixinClockBizImpl implements WeixinClockBiz {
//发topic,增加抽奖次数
//发送抽奖的TOPIC
Long
clockDays
=
weixinClockTopicDao
.
getClockCountByUser
(
wechatGroupId
,
userWxId
);
if
(
null
!=
wechatUserId
&&
!
wechatUserId
.
equals
(
0L
))
{
EXECUTOR_SERVICE
.
execute
(()
->
{
LOGGER
.
info
(
"异步校验是否满足抽奖要求,clockDays="
+
clockDays
);
PromotionOrderDto
promotionOrderDto
=
new
PromotionOrderDto
();
List
<
PromotionGiftDto
>
promotionGiftDtoList
=
new
ArrayList
<>();
PromotionGiftDto
promotionGiftDto
=
new
PromotionGiftDto
();
promotionGiftDto
.
setTargetClass
(
PromotionOrderEnum
.
TARGET_CLASS_APP
.
getCode
());
promotionGiftDto
.
setTargetType
(
AppTypeEnum
.
DRAW
.
value
);
promotionGiftDto
.
setTargetId
(
weixinClockDto
.
getClockPrizeId
());
Integer
grantNum
=
weixinClockRewardDao
.
getGrantNumFromReward
(
weixinClockDto
.
getWeixinClockId
(),
clockDays
);
promotionGiftDto
.
setGrantNum
(
grantNum
==
null
?
"0"
:
grantNum
.
toString
());
promotionGiftDtoList
.
add
(
promotionGiftDto
);
promotionOrderDto
.
setGifts
(
promotionGiftDtoList
);
promotionOrderDto
.
setUserId
(
wechatUserId
);
LOGGER
.
info
(
"发送抽奖规则,参数:promotionOrderDto="
+
promotionOrderDto
);
amqpTemplate
.
convertAndSend
(
MQTopicProducer
.
EXCHAGE
,
MQTopicProducer
.
GIVE_GIFT
,
promotionOrderDto
);
});
}
else
{
WeixinClockPrizeRecord
weixinClockPrizeRecord1
=
weixinClockPrizeRecordDao
.
selectByWxUserIdAndAppId
(
userWxId
,
weixinClockDto
.
getClockPrizeId
());
LOGGER
.
info
(
"weixinClockPrizeRecord1====="
+
weixinClockPrizeRecord1
);
if
(
null
==
weixinClockPrizeRecord1
)
{
WeixinClockPrizeRecord
weixinClockPrizeRecord2
=
new
WeixinClockPrizeRecord
();
weixinClockPrizeRecord2
.
setClockPrizeId
(
weixinClockDto
.
getClockPrizeId
());
weixinClockPrizeRecord2
.
setWxUserId
(
userWxId
);
Integer
grantNum
=
weixinClockRewardDao
.
getGrantNumFromReward
(
weixinClockDto
.
getWeixinClockId
(),
clockDays
);
weixinClockPrizeRecord2
.
setPrizeTime
(
grantNum
==
null
?
0
:
grantNum
);
LOGGER
.
info
(
"weixinClockPrizeRecord2------"
+
weixinClockPrizeRecord2
);
weixinClockPrizeRecordDao
.
insert
(
weixinClockPrizeRecord2
);
if
(
null
!=
weixinClockDto
.
getClockPrizeId
())
{
if
(
null
!=
wechatUserId
&&
!
wechatUserId
.
equals
(
0L
))
{
EXECUTOR_SERVICE
.
execute
(()
->
{
LOGGER
.
info
(
"异步校验是否满足抽奖要求,clockDays="
+
clockDays
);
PromotionOrderDto
promotionOrderDto
=
new
PromotionOrderDto
();
List
<
PromotionGiftDto
>
promotionGiftDtoList
=
new
ArrayList
<>();
PromotionGiftDto
promotionGiftDto
=
new
PromotionGiftDto
();
promotionGiftDto
.
setTargetClass
(
PromotionOrderEnum
.
TARGET_CLASS_APP
.
getCode
());
promotionGiftDto
.
setTargetType
(
AppTypeEnum
.
DRAW
.
value
);
promotionGiftDto
.
setTargetId
(
weixinClockDto
.
getClockPrizeId
());
Integer
grantNum
=
weixinClockRewardDao
.
getGrantNumFromReward
(
weixinClockDto
.
getWeixinClockId
(),
clockDays
);
promotionGiftDto
.
setGrantNum
(
grantNum
==
null
?
"0"
:
grantNum
.
toString
());
promotionGiftDtoList
.
add
(
promotionGiftDto
);
promotionOrderDto
.
setGifts
(
promotionGiftDtoList
);
promotionOrderDto
.
setUserId
(
wechatUserId
);
LOGGER
.
info
(
"发送抽奖规则,参数:promotionOrderDto="
+
promotionOrderDto
);
amqpTemplate
.
convertAndSend
(
MQTopicProducer
.
EXCHAGE
,
MQTopicProducer
.
GIVE_GIFT
,
promotionOrderDto
);
});
}
else
{
Integer
grantNum
=
weixinClockRewardDao
.
getGrantNumFromReward
(
weixinClockDto
.
getWeixinClockId
(),
clockDays
);
grantNum
=
grantNum
==
null
?
0
:
grantNum
;
weixinClockPrizeRecordDao
.
updatePrizeTime
(
userWxId
,
weixinClockDto
.
getClockPrizeId
(),
grantNum
);
WeixinClockPrizeRecord
weixinClockPrizeRecord1
=
weixinClockPrizeRecordDao
.
selectByWxUserIdAndAppId
(
userWxId
,
weixinClockDto
.
getClockPrizeId
());
LOGGER
.
info
(
"weixinClockPrizeRecord1====="
+
weixinClockPrizeRecord1
);
if
(
null
==
weixinClockPrizeRecord1
)
{
WeixinClockPrizeRecord
weixinClockPrizeRecord2
=
new
WeixinClockPrizeRecord
();
weixinClockPrizeRecord2
.
setClockPrizeId
(
weixinClockDto
.
getClockPrizeId
());
weixinClockPrizeRecord2
.
setWxUserId
(
userWxId
);
Integer
grantNum
=
weixinClockRewardDao
.
getGrantNumFromReward
(
weixinClockDto
.
getWeixinClockId
(),
clockDays
);
weixinClockPrizeRecord2
.
setPrizeTime
(
grantNum
==
null
?
0
:
grantNum
);
LOGGER
.
info
(
"weixinClockPrizeRecord2------"
+
weixinClockPrizeRecord2
);
weixinClockPrizeRecordDao
.
insert
(
weixinClockPrizeRecord2
);
}
else
{
Integer
grantNum
=
weixinClockRewardDao
.
getGrantNumFromReward
(
weixinClockDto
.
getWeixinClockId
(),
clockDays
);
grantNum
=
grantNum
==
null
?
0
:
grantNum
;
weixinClockPrizeRecordDao
.
updatePrizeTime
(
userWxId
,
weixinClockDto
.
getClockPrizeId
(),
grantNum
);
}
}
}
//获取我的新排名
Integer
newOrder
=
weixinClockMemberDao
.
getMyNewOrder
(
wechatGroupId
,
userWxId
);
String
clockRewardUrl
=
getClockRewardUrl
(
weixinClockDto
.
getClockPrizeId
());
String
clockRankUrl
=
getClockRankUrl
(
weixinClockDto
.
getClockPrizeId
(),
wechatGroupId
,
userWxId
);
String
clockRankUrl
=
getClockRankUrl
(
weixinClockDto
.
getC
reateUser
(),
weixinClockDto
.
getC
lockPrizeId
(),
wechatGroupId
,
userWxId
);
Calendar
today
=
Calendar
.
getInstance
();
int
month
=
today
.
get
(
Calendar
.
MONTH
)
+
1
;
int
dayOfMonth
=
today
.
get
(
Calendar
.
DAY_OF_MONTH
);
Integer
grantNum
=
weixinClockRewardDao
.
getGrantNumFromReward
(
weixinClockDto
.
getWeixinClockId
(),
clockDays
);
if
(
null
==
weixinClockDto
.
getClockPrizeId
()){
grantNum
=
0
;
}
if
(
null
!=
grantNum
&&
!
grantNum
.
equals
(
0
)){
sendContent
=
"@"
+
nickname
+
" "
+
weixinClockDto
.
getClockIntroduction
()
+
"\n"
+
month
+
"月"
+
dayOfMonth
+
"日打卡成功,你已累积打卡"
+
clockDays
+
"天,排名第"
+
...
...
pcloud-service-book/src/main/java/com/pcloud/book/weixinclock/check/impl/WeixinClockCheckImpl.java
View file @
a1dfefbb
...
...
@@ -34,8 +34,8 @@ public class WeixinClockCheckImpl implements WeixinClockCheck {
if
(
StringUtil
.
isEmpty
(
weixinClockDto
.
getClockIntroduction
())){
throw
new
BookBizException
(
BookBizException
.
ERROR
,
"缺少打卡简介!"
);
}
if
(
null
==
weixinClockDto
.
getClockPrizeId
()){
/*
if(null == weixinClockDto.getClockPrizeId()){
throw new BookBizException(BookBizException.ERROR,"缺少打卡的奖励应用ID!");
}
}
*/
}
}
pcloud-service-book/src/main/resources/mapper/clock/BookClockInfo.Mapper.xml
View file @
a1dfefbb
...
...
@@ -198,5 +198,10 @@
WHERE book_clock_info_id = #{bookClockInfoId}
</delete>
<select
id=
"getAllClockInfoIds"
parameterType=
"map"
resultMap=
"BaseResultMapDTO"
>
select
<include
refid=
"Base_Column_List"
/>
from book_clock_info where origin_type = 'APP'
</select>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/clock/BookGroupClock.Mapper.xml
View file @
a1dfefbb
...
...
@@ -140,5 +140,31 @@
WHERE book_clock_info_id = #{bookClockInfoId}
</delete>
<select
id=
"getClassifyIdsByBookGroupId"
parameterType=
"map"
resultType=
"Long"
>
SELECT DISTINCT
t2.id
FROM
book_group_clock t1
LEFT JOIN book_group_classify t2 ON t1.book_group_id = t2.book_group_id
LEFT JOIN weixin_clock_group_classify t3 ON t2.id = t3.book_group_classify_id
WHERE
t2.is_delete = 0
AND t3.weixin_clock_group_classify_id IS NULL
AND t1.book_clock_info_id = #{bookClockInfoId}
</select>
<select
id=
"getClassifyIdsByClassfyId"
parameterType=
"map"
resultType=
"Long"
>
SELECT DISTINCT
t2.id
FROM
book_group_clock t1
LEFT JOIN book_group_classify t2 ON t1.classify_id = t2.id
LEFT JOIN weixin_clock_group_classify t3 ON t2.id = t3.book_group_classify_id
WHERE
t2.is_delete = 0
AND t3.weixin_clock_group_classify_id IS NULL
AND t1.book_clock_info_id = #{bookClockInfoId}
</select>
</mapper>
\ No newline at end of file
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