222
schangxiang@126.com
2025-06-13 6a8393408d8cefcea02b7a598967de8dc1e565c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { default as BaseController } from "../baseController";
import { Post } from "egg-shell-decorators";
import { FinanceBankAccount } from "../../entity/finance/base/financeBankAccount";
 
export default class AccountCheckController extends BaseController {
  //#region 获取当前金额
  /**
   * 获取当前金额
   */
  @Post()
  public async onChange() {
    let { ctx } = this;
    let body = this.body; // 接收前端发来的数据
    let userInfo = await ctx.helper.userInfo(); // 权限
    try {
      let dataList = await this.dbRead.findOne(FinanceBankAccount, {
        where: {
          userProduct_Id: userInfo.userProduct_Id,
          bankAccount_Id: body.bankAccount_Id
        }
      });
      this.info.result = true;
      this.info.data = dataList;
      this.info.msg;
    } catch (error) {
      this.info.result = false;
      this.info.msg = "错误信息:" + error.message;
    }
    ctx.body = this.info;
  }
  //#endregion
}