|
|
@@ -89,13 +89,13 @@ public class PointsService implements PointsServiceInterface {
|
|
|
familyMemberMapper.updateById(child);
|
|
|
|
|
|
// 记录流水
|
|
|
- PointsLog log = new PointsLog();
|
|
|
- log.setChildId(memberId);
|
|
|
- log.setAmount(amount);
|
|
|
- log.setType("adjust");
|
|
|
- log.setDescription(reason);
|
|
|
- log.setCreatedAt(new Date());
|
|
|
- pointsLogMapper.insert(log);
|
|
|
+ PointsLog plog = new PointsLog();
|
|
|
+ plog.setChildId(memberId);
|
|
|
+ plog.setAmount(amount);
|
|
|
+ plog.setType("adjust");
|
|
|
+ plog.setDescription(reason);
|
|
|
+ plog.setCreatedAt(new Date());
|
|
|
+ pointsLogMapper.insert(plog);
|
|
|
try { sendPointsNotification(memberId, "adjust", amount, reason); } catch (Exception e) { log.warn("points notification failed", e); }
|
|
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
@@ -121,14 +121,14 @@ public class PointsService implements PointsServiceInterface {
|
|
|
child.setUpdatedAt(new Date());
|
|
|
familyMemberMapper.updateById(child);
|
|
|
|
|
|
- PointsLog log = new PointsLog();
|
|
|
- log.setChildId(memberId);
|
|
|
- log.setAmount(amount);
|
|
|
- log.setType("earn");
|
|
|
- log.setCategory("cf");
|
|
|
- log.setDescription(reason);
|
|
|
- log.setCreatedAt(new Date());
|
|
|
- pointsLogMapper.insert(log);
|
|
|
+ PointsLog plog = new PointsLog();
|
|
|
+ plog.setChildId(memberId);
|
|
|
+ plog.setAmount(amount);
|
|
|
+ plog.setType("earn");
|
|
|
+ plog.setCategory("cf");
|
|
|
+ plog.setDescription(reason);
|
|
|
+ plog.setCreatedAt(new Date());
|
|
|
+ pointsLogMapper.insert(plog);
|
|
|
try { sendPointsNotification(memberId, "cf_earn", amount, reason); } catch (Exception e) { log.warn("cf notification failed", e); }
|
|
|
|
|
|
return newCfPoints;
|
|
|
@@ -179,14 +179,14 @@ public class PointsService implements PointsServiceInterface {
|
|
|
child.setUpdatedAt(new Date());
|
|
|
familyMemberMapper.updateById(child);
|
|
|
|
|
|
- PointsLog log = new PointsLog();
|
|
|
- log.setChildId(memberId);
|
|
|
- log.setAmount(-amount);
|
|
|
- log.setType("spend");
|
|
|
- log.setCategory("cf");
|
|
|
- log.setDescription(reason);
|
|
|
- log.setCreatedAt(new Date());
|
|
|
- pointsLogMapper.insert(log);
|
|
|
+ PointsLog plog = new PointsLog();
|
|
|
+ plog.setChildId(memberId);
|
|
|
+ plog.setAmount(-amount);
|
|
|
+ plog.setType("spend");
|
|
|
+ plog.setCategory("cf");
|
|
|
+ plog.setDescription(reason);
|
|
|
+ plog.setCreatedAt(new Date());
|
|
|
+ pointsLogMapper.insert(plog);
|
|
|
try { sendPointsNotification(memberId, "cf_spend", -amount, reason); } catch (Exception e) { log.warn("cf deduction notification failed", e); }
|
|
|
|
|
|
return newCfPoints;
|