This commit is contained in:
张成
2025-11-26 20:48:42 +08:00
parent 4db078c80a
commit e3d335f0dd
5 changed files with 96 additions and 21 deletions

View File

@@ -18,6 +18,35 @@ module.exports = {
const accountData = await plaAccountService.getAccountById(id);
return ctx.success(accountData);
},
/**
* @swagger
* /admin_api/account/getBySnCode:
* post:
* summary: 通过设备SN码获取账号信息
* description: 根据设备SN码直接获取对应的账号信息
* tags: [后台-账号管理]
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* required:
* - sn_code
* properties:
* sn_code:
* type: string
* description: 设备SN码
* responses:
* 200:
* description: 获取成功
*/
'POST /account/getBySnCode': async (ctx) => {
const { sn_code } = ctx.getBody();
const accountData = await plaAccountService.getAccountBySnCode(sn_code);
return ctx.success(accountData);
},
/**
* @swagger
* /admin_api/account/list: