|
@@ -165,6 +165,13 @@ public class TAdminController {
|
|
TAdmin parentAdmin = tAdminService.getById(parentId);
|
|
TAdmin parentAdmin = tAdminService.getById(parentId);
|
|
entity.setIfForeign(parentAdmin.getIfForeign());
|
|
entity.setIfForeign(parentAdmin.getIfForeign());
|
|
tAdminService.save(entity);
|
|
tAdminService.save(entity);
|
|
|
|
+ String ifForeign = parentAdmin.getIfForeign();
|
|
|
|
+ if ("1".equals(ifForeign)) { // 海外子账户,新建一个 Airwallex 钱包账户
|
|
|
|
+ TAirwallexWallet wallet = new TAirwallexWallet();
|
|
|
|
+ wallet.setAdminId(entity.getId());
|
|
|
|
+ payFeign.saveAirwallexWallet(wallet);
|
|
|
|
+ }
|
|
|
|
+
|
|
// 管理的机器 需要再建立一个关系表 type区分全部还是部分
|
|
// 管理的机器 需要再建立一个关系表 type区分全部还是部分
|
|
String equipmentIds = param.getEquipmentIds();
|
|
String equipmentIds = param.getEquipmentIds();
|
|
if (StringUtils.isNotEmpty(equipmentIds)) {
|
|
if (StringUtils.isNotEmpty(equipmentIds)) {
|
|
@@ -406,7 +413,7 @@ public class TAdminController {
|
|
return R.ok(returnList);
|
|
return R.ok(returnList);
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "注册")
|
|
|
|
|
|
+ @ApiOperation(value = "注册账号/用户注册")
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
@Transactional
|
|
@Transactional
|
|
@Audit(type = AuditEnum.INSERT, content = "#loginUser.name + '注册账号'")
|
|
@Audit(type = AuditEnum.INSERT, content = "#loginUser.name + '注册账号'")
|
|
@@ -559,7 +566,7 @@ public class TAdminController {
|
|
// wallet.setAccountCurrency("USD");
|
|
// wallet.setAccountCurrency("USD");
|
|
// wallet.setAccountAmount(new BigDecimal("0.00"));
|
|
// wallet.setAccountAmount(new BigDecimal("0.00"));
|
|
// airwallexWalletService.save(wallet);
|
|
// airwallexWalletService.save(wallet);
|
|
- System.out.println("wallet >>> " + wallet);
|
|
|
|
|
|
+// System.out.println("wallet >>> " + wallet);
|
|
payFeign.saveAirwallexWallet(wallet);
|
|
payFeign.saveAirwallexWallet(wallet);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -842,6 +849,18 @@ public class TAdminController {
|
|
return R.ok(list);
|
|
return R.ok(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "获取admin信息")
|
|
|
|
+ @GetMapping("/getAdminOne/{adminId}")
|
|
|
|
+ public ResponseModel<?> getAdminOne(@PathVariable Long adminId) {
|
|
|
|
+ LambdaQueryWrapper<TAdmin> wrapper = Wrappers.lambdaQuery();
|
|
|
|
+ wrapper.eq(TAdmin::getId, adminId);
|
|
|
|
+ TAdmin admin = tAdminService.getOne(wrapper);
|
|
|
|
+ if (Objects.isNull(admin)) {
|
|
|
|
+ return R.fail("当前用户不存在");
|
|
|
|
+ }
|
|
|
|
+ return R.ok(admin);
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation(value = "获取账号信息byname")
|
|
@ApiOperation(value = "获取账号信息byname")
|
|
@GetMapping("/getAdminByUsername")
|
|
@GetMapping("/getAdminByUsername")
|
|
public ResponseModel<TAdmin> getAdminByUsername(@RequestParam String username) {
|
|
public ResponseModel<TAdmin> getAdminByUsername(@RequestParam String username) {
|