记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
c67ec502
Commit
c67ec502
authored
Jan 04, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into jxl_1214_refund
parents
0b9ef1bf
f207d622
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
138 additions
and
13 deletions
+138
-13
AdamMemberOrderMapper.xml
...m/liquidnet/service/adam/mapper/AdamMemberOrderMapper.xml
+4
-2
FeignPlatformCandyTaskClient.java
...ice/feign/platform/task/FeignPlatformCandyTaskClient.java
+4
-0
PlatformTaskHandler.java
...et/service/executor/main/handler/PlatformTaskHandler.java
+18
-0
TaskController.java
...net/service/platform/controller/sweet/TaskController.java
+88
-0
DataUtils.java
.../java/com/liquidnet/service/platform/utils/DataUtils.java
+13
-0
StoneScoreLogsServiceImpl.java
...service/stone/service/impl/StoneScoreLogsServiceImpl.java
+9
-9
SweetWechatMaoDengController.java
...ervice/sweet/controller/SweetWechatMaoDengController.java
+2
-2
No files found.
liquidnet-bus-do/liquidnet-service-adam-do/src/main/resources/com/liquidnet/service/adam/mapper/AdamMemberOrderMapper.xml
View file @
c67ec502
...
@@ -50,10 +50,12 @@
...
@@ -50,10 +50,12 @@
and amo.source = #{source}
and amo.source = #{source}
</if>
</if>
<if
test=
"paymentAtStart != null and paymentAtStart != ''"
>
<if
test=
"paymentAtStart != null and paymentAtStart != ''"
>
and amo.payment_at
>
#{paymentAtStart}
# and amo.payment_at
>
#{paymentAtStart}
and amo.payment_at
<![CDATA[>=]]>
#{paymentAtStart}
</if>
</if>
<if
test=
"paymentAtEnd != null and paymentAtEnd != ''"
>
<if
test=
"paymentAtEnd != null and paymentAtEnd != ''"
>
and amo.payment_at
<
#{paymentAtEnd}
# and amo.payment_at
<
#{paymentAtEnd}
and amo.payment_at
<![CDATA[<=]]>
#{paymentAtEnd}
</if>
</if>
</where>
</where>
order by amo.created_at desc
order by amo.created_at desc
...
...
liquidnet-bus-feign/liquidnet-api-feign-platform/src/main/java/com/liquidnet/service/feign/platform/task/FeignPlatformCandyTaskClient.java
View file @
c67ec502
...
@@ -4,6 +4,7 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -4,6 +4,7 @@ import com.liquidnet.service.base.ResponseDto;
import
feign.hystrix.FallbackFactory
;
import
feign.hystrix.FallbackFactory
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
@Component
@Component
...
@@ -27,4 +28,7 @@ public interface FeignPlatformCandyTaskClient {
...
@@ -27,4 +28,7 @@ public interface FeignPlatformCandyTaskClient {
@PutMapping
(
"ccoupon/task/due/user"
)
@PutMapping
(
"ccoupon/task/due/user"
)
ResponseDto
<
String
>
dueProcessForUser
();
ResponseDto
<
String
>
dueProcessForUser
();
@GetMapping
(
"followDoTask/doTask"
)
ResponseDto
doTask
();
}
}
liquidnet-bus-service/liquidnet-service-executor-all/liquidnet-service-executor-main/src/main/java/com/liquidnet/service/executor/main/handler/PlatformTaskHandler.java
View file @
c67ec502
...
@@ -129,4 +129,22 @@ public class PlatformTaskHandler {
...
@@ -129,4 +129,22 @@ public class PlatformTaskHandler {
return
fail
;
return
fail
;
}
}
}
}
// 关注任务加积分脚本
@XxlJob
(
value
=
"sev-platform:followDoTask"
)
public
ReturnT
<
String
>
followDoTask
()
{
try
{
ResponseDto
<
String
>
dto
=
feignPlatformCandyTaskClient
.
doTask
();
String
dtoStr
=
JsonUtils
.
toJson
(
dto
);
log
.
info
(
"result of handler:{}"
,
dtoStr
);
ReturnT
<
String
>
success
=
ReturnT
.
SUCCESS
;
success
.
setMsg
(
dtoStr
);
return
success
;
}
catch
(
Exception
e
)
{
log
.
error
(
"exception of handler:{}"
,
e
.
getMessage
(),
e
);
ReturnT
<
String
>
fail
=
ReturnT
.
FAIL
;
fail
.
setMsg
(
e
.
getLocalizedMessage
());
return
fail
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/sweet/TaskController.java
0 → 100644
View file @
c67ec502
package
com
.
liquidnet
.
service
.
platform
.
controller
.
sweet
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.feign.stone.api.FeignStoneIntegralClient
;
import
com.liquidnet.service.platform.utils.DataUtils
;
import
com.liquidnet.service.sweet.entity.SweetWechatUsers
;
import
com.liquidnet.service.sweet.mapper.SweetWechatUsersMapper
;
import
com.liquidnet.service.sweet.vo.SweetAppletUsersVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
/**
* <p>
* 关注任务加积分脚本
* </p>
*
* @author jiangxiulong
* @since 2021-12-28
*/
@Api
(
tags
=
"关注任务加积分脚本"
)
@Slf4j
@RestController
@RequestMapping
(
"followDoTask"
)
public
class
TaskController
{
@Autowired
private
SweetWechatUsersMapper
usersMapper
;
@Autowired
private
FeignStoneIntegralClient
feignStoneIntegralClient
;
@Autowired
private
DataUtils
dataUtils
;
@GetMapping
(
"doTask"
)
@ApiOperation
(
"退款回调"
)
public
ResponseDto
doTask
()
{
int
size
=
1000
;
LocalDateTime
localDateTime
=
LocalDateTime
.
now
();
LocalDateTime
newTime
=
localDateTime
.
minusMinutes
(
10
);
// String timeStr = "2021-12-28 00:00:00";
// DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// LocalDateTime dateTime = LocalDateTime.parse(timeStr, df);
// 获取总记录数
Integer
count
=
usersMapper
.
selectCount
(
Wrappers
.
lambdaQuery
(
SweetWechatUsers
.
class
)
.
gt
(
SweetWechatUsers:
:
getCreatedAt
,
newTime
)
.
eq
(
SweetWechatUsers:
:
getType
,
2
)
);
// 总page
int
countPage
=
(
int
)
Math
.
ceil
(
count
/
size
);
countPage
=
countPage
+
1
;
for
(
int
page
=
0
;
page
<
countPage
;
page
++)
{
List
<
SweetWechatUsers
>
sweetWechatUsers
=
usersMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
SweetWechatUsers
.
class
)
.
gt
(
SweetWechatUsers:
:
getCreatedAt
,
newTime
)
.
last
(
"limit "
+
(
page
*
size
)
+
","
+
((
page
+
1
)
*
size
))
);
for
(
SweetWechatUsers
info
:
sweetWechatUsers
)
{
try
{
SweetAppletUsersVo
sweetAppletUsers
=
dataUtils
.
getSweetAppletUsersOfUnionId
(
info
.
getUnionId
());
if
(
sweetAppletUsers
!=
null
)
{
if
(
sweetAppletUsers
.
getUserId
()
!=
null
&&
!
sweetAppletUsers
.
getUserId
().
isEmpty
())
{
log
.
info
(
"followDoTask userId:{}"
,
sweetAppletUsers
.
getUserId
());
ResponseDto
<
HashMap
<
String
,
Object
>>
hashMapResponseDto
=
feignStoneIntegralClient
.
doTask
(
4
,
sweetAppletUsers
.
getUserId
());
//log.info("followDoTask res:{}", hashMapResponseDto);
}
}
}
catch
(
Exception
e
)
{
}
}
}
return
ResponseDto
.
success
();
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/DataUtils.java
View file @
c67ec502
...
@@ -13,6 +13,8 @@ import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo;
...
@@ -13,6 +13,8 @@ import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo;
import
com.liquidnet.service.kylin.entity.KylinBuyNotice
;
import
com.liquidnet.service.kylin.entity.KylinBuyNotice
;
import
com.liquidnet.service.kylin.entity.KylinOrderCoupons
;
import
com.liquidnet.service.kylin.entity.KylinOrderCoupons
;
import
com.liquidnet.service.kylin.mapper.KylinBuyNoticeMapper
;
import
com.liquidnet.service.kylin.mapper.KylinBuyNoticeMapper
;
import
com.liquidnet.service.sweet.constant.SweetConstant
;
import
com.liquidnet.service.sweet.vo.SweetAppletUsersVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
...
@@ -400,4 +402,15 @@ public class DataUtils {
...
@@ -400,4 +402,15 @@ public class DataUtils {
return
(
ArrayList
<
KylinOrderCoupons
>)
obj
;
return
(
ArrayList
<
KylinOrderCoupons
>)
obj
;
}
}
}
}
public
SweetAppletUsersVo
getSweetAppletUsersOfUnionId
(
String
unionId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_APPLET_USERS_UNIONID
.
concat
(
unionId
);
Object
obj
=
redisDataSourceUtil
.
getRedisSweetUtil
().
get
(
redisKey
);
if
(
null
==
obj
)
{
return
null
;
}
else
{
SweetAppletUsersVo
sweetAppletUsersVo
=
(
SweetAppletUsersVo
)
obj
;
return
sweetAppletUsersVo
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-stone/liquidnet-service-stone-impl/src/main/java/com/liquidnet/service/stone/service/impl/StoneScoreLogsServiceImpl.java
View file @
c67ec502
...
@@ -88,15 +88,15 @@ public class StoneScoreLogsServiceImpl implements IStoneScoreLogsService {
...
@@ -88,15 +88,15 @@ public class StoneScoreLogsServiceImpl implements IStoneScoreLogsService {
}
}
Date
userMonth
=
DateUtil
.
parse
(
vo
.
getCurrentMonth
()
==
null
?
DateUtil
.
getNowTime
()
:
vo
.
getCurrentMonth
(),
"yyyy-MM"
);
Date
userMonth
=
DateUtil
.
parse
(
vo
.
getCurrentMonth
()
==
null
?
DateUtil
.
getNowTime
()
:
vo
.
getCurrentMonth
(),
"yyyy-MM"
);
int
monthScore
=
vo
.
getMonthScore
()
==
null
?
0
:
vo
.
getMonthScore
();
int
monthScore
=
vo
.
getMonthScore
()
==
null
?
0
:
vo
.
getMonthScore
();
if
(
DateUtil
.
compareMonth
(
userMonth
,
DateUtil
.
parse
(
DateUtil
.
getNowTime
(),
"yyyy-MM"
))
==
0
)
{
//当月
//
if (DateUtil.compareMonth(userMonth, DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM")) == 0) {//当月
if
((
monthScore
+
score
)
>=
monthMax
)
{
//
if ((monthScore + score) >= monthMax) {
score
=
monthMax
-
monthScore
;
//
score = monthMax - monthScore;
}
//
}
}
else
{
//
} else {
if
(
score
>=
monthMax
)
{
//
if (score >= monthMax) {
score
=
monthMax
;
//
score = monthMax;
}
//
}
}
//
}
// Date userDay = DateUtil.parse(vo.getCurrentDay() == null ? DateUtil.getNowTime() : vo.getCurrentDay(), "yyyy-MM-dd");
// Date userDay = DateUtil.parse(vo.getCurrentDay() == null ? DateUtil.getNowTime() : vo.getCurrentDay(), "yyyy-MM-dd");
// int dayScore = vo.getDayScore() == null ? 0 : vo.getDayScore();
// int dayScore = vo.getDayScore() == null ? 0 : vo.getDayScore();
// if (DateUtil.compareDay(userDay, DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM-dd")) == 0) {//当日
// if (DateUtil.compareDay(userDay, DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM-dd")) == 0) {//当日
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetWechatMaoDengController.java
View file @
c67ec502
...
@@ -33,7 +33,7 @@ public class SweetWechatMaoDengController {
...
@@ -33,7 +33,7 @@ public class SweetWechatMaoDengController {
@GetMapping
(
"/backData"
)
@GetMapping
(
"/backData"
)
@ApiOperation
(
"返回文字图片"
)
@ApiOperation
(
"返回文字图片"
)
public
ResponseDto
<
SweetMaoDengVo
>
backDatas
(
String
userId
,
String
maoId
)
{
public
ResponseDto
<
SweetMaoDengVo
>
backDatas
(
String
userId
)
{
SweetWechatUsersVo
wechatUsers
=
redisUtils
.
getSweetWechatUsersOfUnionId
(
userId
,
2
);
SweetWechatUsersVo
wechatUsers
=
redisUtils
.
getSweetWechatUsersOfUnionId
(
userId
,
2
);
if
(
null
==
wechatUsers
)
{
if
(
null
==
wechatUsers
)
{
return
ResponseDto
.
failure
(
"获取信息失败"
);
return
ResponseDto
.
failure
(
"获取信息失败"
);
...
@@ -51,7 +51,7 @@ public class SweetWechatMaoDengController {
...
@@ -51,7 +51,7 @@ public class SweetWechatMaoDengController {
return
ResponseDto
.
failure
(
"获取信息失败"
);
return
ResponseDto
.
failure
(
"获取信息失败"
);
}
}
@PostMapping
(
"/
backData
"
)
@PostMapping
(
"/
addBuilderImg
"
)
@ApiOperation
(
"存生成的图"
)
@ApiOperation
(
"存生成的图"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"userId"
,
value
=
"userId"
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"userId"
,
value
=
"userId"
),
...
...
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