初始化信用分默认添加到信用分历史记录

master
Vin 5 years ago
parent effb1eb1b4
commit adf2eeefb9
  1. 9
      src/main/java/com/community/pocket/repository/android/UserDao.java
  2. 3
      src/main/resources/application.yaml

@ -47,6 +47,9 @@ public class UserDao extends BaseDao<MyInfo> {
@Value("${register.credit-score}")
private int creditScore;
@Value("${register.credit-score-tip}")
private String creditScoreTip;
@Value("${spring.resources.static-locations}")
private String imgPath;
@ -189,6 +192,12 @@ public class UserDao extends BaseDao<MyInfo> {
myInfo.setCreditScore(creditScore);
myInfo.setPosts(0);
myInfo.setVisitors(0);
EditScore editScore=new EditScore();
editScore.setUsername(userRegister.getUsername());
editScore.setBeforeScore(0);
editScore.setScore(creditScore);
editScore.setNotes(String.format(creditScoreTip,creditScore));
updateScore(editScore);
save(myInfo);
}

@ -55,7 +55,8 @@ forum:
#注册配置
register:
#默认信用分
credit-score: 0
credit-score: 30
credit-score-tip: 注册默认奖励%d分
#访客配置默认可预约时间
visitor-list:
- '09:00'

Loading…
Cancel
Save