Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
fc42841c
提交
fc42841c
authored
3月 05, 2024
作者:
han
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化
上级
594593c2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
30 行增加
和
12 行删除
+30
-12
UserPointsController.java
...iuav/user/controller/userpoints/UserPointsController.java
+8
-1
UserPointsService.java
...m/mmc/iuav/user/service/userpoints/UserPointsService.java
+2
-0
UserPointsServiceImpl.java
...v/user/service/userpoints/impl/UserPointsServiceImpl.java
+20
-11
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/userpoints/UserPointsController.java
浏览文件 @
fc42841c
...
@@ -89,7 +89,7 @@ public class UserPointsController extends BaseController {
...
@@ -89,7 +89,7 @@ public class UserPointsController extends BaseController {
}
}
@ApiOperation
(
value
=
"用户购买积分"
)
@ApiOperation
(
value
=
"用户购买积分
(微信支付已成功)
"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/weixinBuyPoints"
)
@PostMapping
(
"/weixinBuyPoints"
)
public
ResultBody
weixinBuyPoints
(
@RequestBody
BuyPointsVO
buyPointsVO
,
HttpServletRequest
request
)
{
public
ResultBody
weixinBuyPoints
(
@RequestBody
BuyPointsVO
buyPointsVO
,
HttpServletRequest
request
)
{
...
@@ -115,4 +115,11 @@ public class UserPointsController extends BaseController {
...
@@ -115,4 +115,11 @@ public class UserPointsController extends BaseController {
return
userPointsService
.
insertBuyPointsType
(
buyPointsVO
);
return
userPointsService
.
insertBuyPointsType
(
buyPointsVO
);
}
}
@ApiOperation
(
value
=
"根据类型ID返回购买积分选购类型"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/buyPointsTypeById"
)
public
Integer
buyPointsTypeById
(
@ApiParam
(
value
=
"购买聊天时长的类型id,唯一识别id"
,
required
=
true
)
Integer
typeId
){
return
userPointsService
.
buyPointsTypeById
(
typeId
);
}
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/userpoints/UserPointsService.java
浏览文件 @
fc42841c
...
@@ -42,4 +42,6 @@ public interface UserPointsService {
...
@@ -42,4 +42,6 @@ public interface UserPointsService {
ResultBody
updateBuyPointsType
(
BuyPointsVO
buyPointsVO
);
ResultBody
updateBuyPointsType
(
BuyPointsVO
buyPointsVO
);
ResultBody
selectAllBuyPointsType
();
ResultBody
selectAllBuyPointsType
();
Integer
buyPointsTypeById
(
Integer
typeId
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/userpoints/impl/UserPointsServiceImpl.java
浏览文件 @
fc42841c
...
@@ -15,6 +15,7 @@ import com.mmc.iuav.user.model.qo.userpoints.AppPointsDetailsQO;
...
@@ -15,6 +15,7 @@ import com.mmc.iuav.user.model.qo.userpoints.AppPointsDetailsQO;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointsDetailsQO
;
import
com.mmc.iuav.user.model.qo.userpoints.UserPointsDetailsQO
;
import
com.mmc.iuav.user.model.vo.BuyPointsVO
;
import
com.mmc.iuav.user.model.vo.BuyPointsVO
;
import
com.mmc.iuav.user.model.vo.MessageTimeVO
;
import
com.mmc.iuav.user.model.vo.OrderRequestParamsVO
;
import
com.mmc.iuav.user.model.vo.OrderRequestParamsVO
;
import
com.mmc.iuav.user.model.vo.userpoints.ChangeUserPointVO
;
import
com.mmc.iuav.user.model.vo.userpoints.ChangeUserPointVO
;
import
com.mmc.iuav.user.model.vo.userpoints.PointTypeVO
;
import
com.mmc.iuav.user.model.vo.userpoints.PointTypeVO
;
...
@@ -175,17 +176,17 @@ public class UserPointsServiceImpl implements UserPointsService {
...
@@ -175,17 +176,17 @@ public class UserPointsServiceImpl implements UserPointsService {
return
ResultBody
.
error
(
"购买积分类型不能传递为空"
);
return
ResultBody
.
error
(
"购买积分类型不能传递为空"
);
}
}
BuyPointsVO
buyPointsVO1
=
userPointsDao
.
selectBuyPointsType
(
buyPointsVO
.
getId
());
BuyPointsVO
buyPointsVO1
=
userPointsDao
.
selectBuyPointsType
(
buyPointsVO
.
getId
());
OrderRequestParamsVO
orderRequestParamsVO
=
new
OrderRequestParamsVO
();
//
OrderRequestParamsVO orderRequestParamsVO = new OrderRequestParamsVO();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmssSSS"
);
//
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String
content
=
"WP"
+
sdf
.
format
(
new
Date
());
//
String content = "WP" + sdf.format(new Date());
orderRequestParamsVO
.
setOrderNo
(
content
);
//
orderRequestParamsVO.setOrderNo(content);
orderRequestParamsVO
.
setDescription
(
"购买积分"
);
//
orderRequestParamsVO.setDescription("购买积分");
BigDecimal
money
=
buyPointsVO1
.
getMoney
();
//
BigDecimal money = buyPointsVO1.getMoney();
BigDecimal
amountInFen
=
money
.
multiply
(
new
BigDecimal
(
"100"
)).
setScale
(
0
,
RoundingMode
.
DOWN
);
//
BigDecimal amountInFen = money.multiply(new BigDecimal("100")).setScale(0, RoundingMode.DOWN);
orderRequestParamsVO
.
setAmount
(
amountInFen
.
intValue
());
//
orderRequestParamsVO.setAmount(amountInFen.intValue());
orderRequestParamsVO
.
setOrderPort
(
4
);
//
orderRequestParamsVO.setOrderPort(4);
// 扣除金额
//
// 扣除金额
Map
map
=
paymentAppApi
.
orderPay
(
orderRequestParamsVO
,
token
);
//
Map map = paymentAppApi.orderPay(orderRequestParamsVO, token);
// 增加积分
// 增加积分
ChangeUserPointVO
changeUserPointVO
=
new
ChangeUserPointVO
();
ChangeUserPointVO
changeUserPointVO
=
new
ChangeUserPointVO
();
changeUserPointVO
.
setUserAccountId
(
userAccountId
);
changeUserPointVO
.
setUserAccountId
(
userAccountId
);
...
@@ -212,4 +213,12 @@ public class UserPointsServiceImpl implements UserPointsService {
...
@@ -212,4 +213,12 @@ public class UserPointsServiceImpl implements UserPointsService {
List
<
BuyPointsVO
>
buyPointsVOS
=
userPointsDao
.
selectAllBuyPointsType
();
List
<
BuyPointsVO
>
buyPointsVOS
=
userPointsDao
.
selectAllBuyPointsType
();
return
ResultBody
.
success
(
buyPointsVOS
);
return
ResultBody
.
success
(
buyPointsVOS
);
}
}
@Override
public
Integer
buyPointsTypeById
(
Integer
typeId
)
{
BuyPointsVO
buyPointsVO
=
userPointsDao
.
selectBuyPointsType
(
typeId
);
BigDecimal
money
=
buyPointsVO
.
getMoney
();
BigDecimal
amountInFen
=
money
.
multiply
(
new
BigDecimal
(
"100"
)).
setScale
(
0
,
RoundingMode
.
DOWN
);
return
amountInFen
.
intValue
();
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论