|
@@ -242,7 +242,8 @@ public class CmsGroupRelationController {
|
|
|
public Result<String> updateRechargeRemainNum(@RequestBody RechargeRemainNumReq req) {
|
|
public Result<String> updateRechargeRemainNum(@RequestBody RechargeRemainNumReq req) {
|
|
|
long adminId = StpUtil.getLoginIdAsLong();
|
|
long adminId = StpUtil.getLoginIdAsLong();
|
|
|
Long relationId = req.getRelationId();
|
|
Long relationId = req.getRelationId();
|
|
|
- Integer num = req.getNum();
|
|
|
|
|
|
|
+ //正数是增加 负数是扣除
|
|
|
|
|
+ Integer num = -req.getNum();
|
|
|
GroupsRelation relation = groupsRelationMapper.selectById(relationId);
|
|
GroupsRelation relation = groupsRelationMapper.selectById(relationId);
|
|
|
if (relation.getRechargeNum() != null) {
|
|
if (relation.getRechargeNum() != null) {
|
|
|
Integer rechargeRemainNum = relation.getRechargeRemainNum();
|
|
Integer rechargeRemainNum = relation.getRechargeRemainNum();
|