|
|
@@ -44,8 +44,10 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
@@ -82,9 +84,30 @@ public class InfoUserController extends BaseController {
|
|
|
push.userPushBatch(cids,"测试","内容","{\"ddId\":991754272700492,\"state\":3,\"type\":-1}");
|
|
|
return success();
|
|
|
}
|
|
|
- /**
|
|
|
- * 查询用户信息列表
|
|
|
- */
|
|
|
+ @Anonymous
|
|
|
+// @Auth
|
|
|
+ @GetMapping("/createUserWallets")
|
|
|
+ public AjaxResult createUserWallets() {
|
|
|
+ List<InfoUser> users = infoUserService.list();
|
|
|
+ List<UserWallet> wallets = userWalletService.list();
|
|
|
+ List<UserWallet> inserts = new ArrayList<>();
|
|
|
+ for (InfoUser user : users) {
|
|
|
+ boolean exist = wallets.stream().anyMatch(x -> x.getUserId().equals(user.getUserId()));
|
|
|
+ if (!exist) {
|
|
|
+ UserWallet insert = new UserWallet();
|
|
|
+ insert.setUserId(user.getUserId());
|
|
|
+ insert.setVersion(0);
|
|
|
+ insert.setPointsWallet(0L);
|
|
|
+ insert.setBalanceWallet(BigDecimal.ZERO);
|
|
|
+ insert.setBlockedFunds(BigDecimal.ZERO);
|
|
|
+ inserts.add(insert);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!inserts.isEmpty()) {
|
|
|
+ userWalletService.saveBatch(inserts);
|
|
|
+ }
|
|
|
+ return success();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 获取rtc用户签名
|