|
@@ -156,8 +156,10 @@ public class PtUserAccountController extends BaseController {
|
|
|
@GetMapping("/accountBag/{userId}")
|
|
@GetMapping("/accountBag/{userId}")
|
|
|
public R<PtUserAccountInfoVo> accountBag(@PathVariable Long userId) {
|
|
public R<PtUserAccountInfoVo> accountBag(@PathVariable Long userId) {
|
|
|
PtUserAccountVo account = ptUserAccountService.queryById(userId);
|
|
PtUserAccountVo account = ptUserAccountService.queryById(userId);
|
|
|
|
|
+
|
|
|
PtBagBo cardBo = new PtBagBo();
|
|
PtBagBo cardBo = new PtBagBo();
|
|
|
cardBo.setUserId(userId);
|
|
cardBo.setUserId(userId);
|
|
|
|
|
+
|
|
|
List<PtBagVo> bags = ptBagService.queryList(cardBo);
|
|
List<PtBagVo> bags = ptBagService.queryList(cardBo);
|
|
|
PtUserAccountInfoVo accountInfoVo = new PtUserAccountInfoVo();
|
|
PtUserAccountInfoVo accountInfoVo = new PtUserAccountInfoVo();
|
|
|
accountInfoVo.setAccount(account);
|
|
accountInfoVo.setAccount(account);
|
|
@@ -189,10 +191,10 @@ public class PtUserAccountController extends BaseController {
|
|
|
return toAjax(ptUserAccountService.updateFreezeStatus(userIds,freezeStatus));
|
|
return toAjax(ptUserAccountService.updateFreezeStatus(userIds,freezeStatus));
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
- * 批量冻结结/解冻账户
|
|
|
|
|
|
|
+ * 重置有效期
|
|
|
*
|
|
*
|
|
|
* @param userIds 账户ID串
|
|
* @param userIds 账户ID串
|
|
|
- * freezeStatus 冻结状态
|
|
|
|
|
|
|
+ * lifespan 有效期
|
|
|
*/
|
|
*/
|
|
|
@SaCheckPermission("payment:ptUserAccount:edit")
|
|
@SaCheckPermission("payment:ptUserAccount:edit")
|
|
|
@Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
@@ -201,10 +203,10 @@ public class PtUserAccountController extends BaseController {
|
|
|
return toAjax(ptUserAccountService.resetLifespan(userIds,lifespan));
|
|
return toAjax(ptUserAccountService.resetLifespan(userIds,lifespan));
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
- * 批量冻结结/解冻账户
|
|
|
|
|
|
|
+ * 重置卡类
|
|
|
*
|
|
*
|
|
|
* @param userIds 账户ID串
|
|
* @param userIds 账户ID串
|
|
|
- * freezeStatus 冻结状态
|
|
|
|
|
|
|
+ * cardType 卡片类型
|
|
|
*/
|
|
*/
|
|
|
@SaCheckPermission("payment:ptUserAccount:edit")
|
|
@SaCheckPermission("payment:ptUserAccount:edit")
|
|
|
@Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
@@ -213,10 +215,10 @@ public class PtUserAccountController extends BaseController {
|
|
|
return toAjax(ptUserAccountService.resetCardType(userIds,cardType));
|
|
return toAjax(ptUserAccountService.resetCardType(userIds,cardType));
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
- * 批量冻结结/解冻账户
|
|
|
|
|
|
|
+ * 重置消费密码
|
|
|
*
|
|
*
|
|
|
* @param userIds 账户ID串
|
|
* @param userIds 账户ID串
|
|
|
- * freezeStatus 冻结状态
|
|
|
|
|
|
|
+ * consumePwd 消费密码
|
|
|
*/
|
|
*/
|
|
|
@SaCheckPermission("payment:ptUserAccount:edit")
|
|
@SaCheckPermission("payment:ptUserAccount:edit")
|
|
|
@Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
@@ -224,4 +226,32 @@ public class PtUserAccountController extends BaseController {
|
|
|
public R<Void> batchResetConsumePwd(@PathVariable String consumePwd,@PathVariable Long[] userIds) {
|
|
public R<Void> batchResetConsumePwd(@PathVariable String consumePwd,@PathVariable Long[] userIds) {
|
|
|
return toAjax(ptUserAccountService.resetConsumePwd(userIds,consumePwd));
|
|
return toAjax(ptUserAccountService.resetConsumePwd(userIds,consumePwd));
|
|
|
}
|
|
}
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 开户
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param userIds 账户ID串
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
|
|
+ @SaCheckPermission("payment:ptUserAccount:edit")
|
|
|
|
|
+ @Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PutMapping("/open/{userIds}")
|
|
|
|
|
+ public R<Void> batchOpenAccount(@PathVariable Long[] userIds) {
|
|
|
|
|
+ return toAjax(ptUserAccountService.openAccount(userIds));
|
|
|
|
|
+ }
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 销户
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param userIds 账户ID串
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
|
|
+ @SaCheckPermission("payment:ptUserAccount:edit")
|
|
|
|
|
+ @Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PutMapping("/close/{userIds}")
|
|
|
|
|
+ public R<Void> batchCloseAccount(@PathVariable Long[] userIds) {
|
|
|
|
|
+ if(ptUserAccountService.closeAccount(userIds)){
|
|
|
|
|
+ return R.ok();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return R.fail("账户余额不为0,销户失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|