Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
point-project
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
point-project
Commits
36229ad8
Commit
36229ad8
authored
Oct 23, 2025
by
“Kongxiangkun”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加积分商城相关代码
parent
972f23e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
64 deletions
+64
-64
cloud-point-api/src/main/java/com/yizhi/point/application/feign/PointListenerClients.java
+2
-2
cloud-point/src/main/java/com/yizhi/application/controller/PointListenerController.java
+62
-62
No files found.
cloud-point-api/src/main/java/com/yizhi/point/application/feign/PointListenerClients.java
View file @
36229ad8
...
@@ -19,6 +19,6 @@ public interface PointListenerClients {
...
@@ -19,6 +19,6 @@ public interface PointListenerClients {
boolean
saveHandPoint
(
@RequestParam
(
"sitePointId"
)
String
sitePointId
);
boolean
saveHandPoint
(
@RequestParam
(
"sitePointId"
)
String
sitePointId
);
@GetMapping
(
value
=
"/manage/point/addPoint"
)
//
@GetMapping(value = "/manage/point/addPoint")
boolean
addPoint
(
@RequestParam
(
"code"
)
String
code
,
@RequestParam
(
"sourceId"
)
Long
sourceId
);
//
boolean addPoint(@RequestParam("code") String code, @RequestParam("sourceId") Long sourceId);
}
}
cloud-point/src/main/java/com/yizhi/application/controller/PointListenerController.java
View file @
36229ad8
...
@@ -355,68 +355,68 @@ public class PointListenerController {
...
@@ -355,68 +355,68 @@ public class PointListenerController {
return
true
;
return
true
;
}
}
@ApiOperation
(
value
=
"新增积分"
)
//
@ApiOperation(value = "新增积分")
@GetMapping
(
value
=
"/addPoint"
)
//
@GetMapping(value = "/addPoint")
public
boolean
addPoint
(
@RequestParam
(
"code"
)
String
code
,
@RequestParam
(
"sourceId"
)
Long
sourceId
)
{
//
public boolean addPoint(@RequestParam("code") String code, @RequestParam("sourceId") Long sourceId) {
LOGGER
.
info
(
"新增积分{},{}"
,
code
,
sourceId
);
//
LOGGER.info("新增积分{},{}",code,sourceId);
RequestContext
res
=
ContextHolder
.
get
();
//
RequestContext res = ContextHolder.get();
Long
accountId
=
res
.
getAccountId
();
//
Long accountId = res.getAccountId();
Long
siteId
=
res
.
getSiteId
();
//
Long siteId = res.getSiteId();
String
accountName
=
res
.
getAccountName
();
//
String accountName = res.getAccountName();
Long
companyId
=
res
.
getCompanyId
();
//
Long companyId = res.getCompanyId();
Long
orgId
=
res
.
getOrgId
();
//
Long orgId = res.getOrgId();
try
{
//
try {
PointActivity
pointActivity
=
new
PointActivity
();
//
PointActivity pointActivity = new PointActivity();
pointActivity
.
setCode
(
code
);
//
pointActivity.setCode(code);
pointActivity
.
setState
(
2
);
//
pointActivity.setState(2);
EntityWrapper
<
PointActivity
>
entityWrapper
=
new
EntityWrapper
<
PointActivity
>();
//
EntityWrapper<PointActivity> entityWrapper = new EntityWrapper<PointActivity>();
PointActivity
vo
=
pointActivityService
.
selectOne
(
entityWrapper
);
//
PointActivity vo = pointActivityService.selectOne(entityWrapper);
Integer
count
=
pointDetailsService
.
getCountToDay
(
accountId
,
siteId
,
code
);
//
Integer count = pointDetailsService.getCountToDay(accountId,siteId,code);
if
(
Objects
.
equals
(
code
,
PointChangeReasonConstant
.
POINT_READ
.
getKey
())&&
count
>=
5
){
//
if(Objects.equals(code, PointChangeReasonConstant.POINT_READ.getKey())&&count>=5){
return
false
;
//
return false;
}
//
}
if
(
vo
!=
null
&&
ObjectUtil
.
isNotEmpty
(
vo
.
getCode
())&&
accountId
!=
null
&&
accountId
!=
0L
){
//
if(vo!=null&& ObjectUtil.isNotEmpty(vo.getCode())&&accountId!=null&&accountId!=0L){
try
{
//
try {
PointParamVO
pointParamVO
=
new
PointParamVO
();
//
PointParamVO pointParamVO = new PointParamVO();
pointParamVO
.
setEventName
(
vo
.
getCode
());
//事件名称
//
pointParamVO.setEventName(vo.getCode()); //事件名称
pointParamVO
.
setActivityType
(
vo
.
getActivityType
());
//事件类型
//
pointParamVO.setActivityType(vo.getActivityType()); //事件类型
pointParamVO
.
setActivitySource
(
"PC"
);
//学习活动来源
//
pointParamVO.setActivitySource("PC"); //学习活动来源
pointParamVO
.
setActivityName
(
vo
.
getActivityName
());
//学习活动名称
//
pointParamVO.setActivityName(vo.getActivityName()); //学习活动名称
pointParamVO
.
setReleaseCondition
(
"指定积分发放"
);
//发放条件
//
pointParamVO.setReleaseCondition("指定积分发放"); //发放条件
pointParamVO
.
setReleaseRules
(
vo
.
getActivityType
()+
"成功"
);
//发放规则
//
pointParamVO.setReleaseRules(vo.getActivityType()+"成功"); //发放规则
pointParamVO
.
setCreatePointTime
(
new
Date
());
//积分创建时间
//
pointParamVO.setCreatePointTime(new Date()); //积分创建时间
pointParamVO
.
setSourceId
(
sourceId
);
//积分来源ID,(业务ID主键)
//
pointParamVO.setSourceId(sourceId); //积分来源ID,(业务ID主键)
pointParamVO
.
setOperatingPoint
(
vo
.
getMultiple
());
//积分数量, 正数 加积分, 负数减积分
//
pointParamVO.setOperatingPoint(vo.getMultiple()); //积分数量, 正数 加积分, 负数减积分
pointParamVO
.
setAccountId
(
accountId
);
//学员ID
//
pointParamVO.setAccountId(accountId); //学员ID
pointParamVO
.
setAccountName
(
accountName
);
//学员名称
//
pointParamVO.setAccountName(accountName); //学员名称
pointParamVO
.
setCompanyId
(
companyId
);
//企业ID
//
pointParamVO.setCompanyId(companyId); //企业ID
pointParamVO
.
setSiteId
(
siteId
);
//站点ID
//
pointParamVO.setSiteId(siteId); //站点ID
pointParamVO
.
setOrgId
(
orgId
);
//组织ID
//
pointParamVO.setOrgId(orgId); //组织ID
String
sitePointId
=
null
;
//
String sitePointId = null;
if
(
null
!=
vo
.
getMultiple
()
&&
0
!=
vo
.
getMultiple
())
{
//
if (null != vo.getMultiple() && 0 != vo.getMultiple()) {
sitePointId
=
idGenerator
.
generate
().
toString
();
//
sitePointId = idGenerator.generate().toString();
pointParamVO
.
setId
(
sitePointId
);
//
pointParamVO.setId(sitePointId);
boolean
boo
=
redisUtils
.
set
(
sitePointId
,
pointParamVO
,
10800L
);
//
boolean boo = redisUtils.set(sitePointId, pointParamVO, 10800L);
if
(
boo
){
//
if(boo){
MqPointParam
mqPointParam
=
new
MqPointParam
();
//
MqPointParam mqPointParam = new MqPointParam();
BeanUtils
.
copyProperties
(
pointParamVO
,
mqPointParam
);
//
BeanUtils.copyProperties(pointParamVO, mqPointParam);
mqPointParam
.
setState
(
1
);
//
mqPointParam.setState(1);
mqPointParamService
.
insert
(
mqPointParam
);
//
mqPointParamService.insert(mqPointParam);
}
//
}
}
//
}
if
(
null
!=
sitePointId
)
{
//
if (null != sitePointId) {
saveHandPoint
(
sitePointId
);
//发送积分获取消息
//
saveHandPoint(sitePointId); //发送积分获取消息
}
//
}
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
LOGGER
.
error
(
"签到打卡积分发放失败:"
,
e
);
//
LOGGER.error("签到打卡积分发放失败:", e);
}
//
}
}
//
}
return
true
;
//
return true;
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
LOGGER
.
error
(
accountId
+
"签到打卡业务处理失败!!!"
+
e
);
//
LOGGER.error(accountId + "签到打卡业务处理失败!!!" + e);
return
false
;
//
return false;
}
//
}
}
//
}
// 处理服务积分
// 处理服务积分
public
boolean
addHandPoint
(
String
pointId
,
MqPointParam
vo
)
{
public
boolean
addHandPoint
(
String
pointId
,
MqPointParam
vo
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
...
...
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