Commit 6ee74af5 by “Kongxiangkun”

增加积分商城相关代码

parent 0641b7ed
......@@ -91,7 +91,7 @@ public class PointServiceImpl extends ServiceImpl<PointMapper, Point> implements
PointUser pu = new PointUser();
pu.setUserId(accountId);
EntityWrapper<PointUser> wrapper = new EntityWrapper<PointUser>(pu);
PointUser pointUser = pointUserService.selectOne(wrapper);
pu = pointUserService.selectOne(wrapper);
Long id = idGenerator.generate();
if (pu == null) {
pu = new PointUser();
......@@ -116,9 +116,9 @@ public class PointServiceImpl extends ServiceImpl<PointMapper, Point> implements
PointDetails pd = new PointDetails();
pd.setId(idGenerator.generate());
pd.setTime(new Date());
pd.setChangeBefore(pointUser.getTotalPoint());
pd.setChangeBefore(pu.getTotalPoint());
pd.setPoint(strategy.getPointTypeEnum().getPoint());
pd.setChangeAfter(pointUser.getTotalPoint() + strategy.getPointTypeEnum().getPoint());
pd.setChangeAfter(pu.getTotalPoint() + strategy.getPointTypeEnum().getPoint());
pd.setMultiple(1);
pd.setAccountId(accountId);
pd.setLearnName(strategy.getPointTypeEnum().getDesc());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment