shuhao hai 6 meses
pai
achega
dcc65f9b88

+ 1 - 1
admin/src/main/java/com/flyer/foster/controller/app/AppScoreController.java

@@ -24,7 +24,7 @@ public class AppScoreController {
      * @return
      */
     @PostMapping("/{appUserId}")
-    public R addOrUpdate(@PathVariable Integer appUserId, AppScoreAddDTO addDTO) {
+    public R addOrUpdate(@PathVariable Integer appUserId,@RequestBody AppScoreAddDTO addDTO) {
         addDTO.setAppUserId(appUserId);
         return R.ok().result(iScoreService.addScore(addDTO));
     }

+ 5 - 0
admin/src/main/java/com/flyer/foster/dto/app/AppUserRespDTO.java

@@ -34,6 +34,11 @@ public class AppUserRespDTO {
     private String openId;
 
     /**
+     * 用户总积分
+     */
+    private Integer totalScore;
+
+    /**
      * 机构id
      */
     private String icon;

+ 2 - 1
admin/src/main/java/com/flyer/foster/service/impl/ScoreServiceImpl.java

@@ -56,7 +56,8 @@ public class ScoreServiceImpl extends ServiceImpl<IScoreMapper, Score> implement
             totalScore += addDTO.getScore();
             appUser.setTotalScore(totalScore);
             iAppUserService.saveOrUpdate(appUser);
+            return true;
         }
-        return true;
+        return false;
     }
 }