|
@@ -22,10 +22,10 @@ class PersonalService extends CrudService {
|
|
|
*/
|
|
|
async create({ password, ...data }) {
|
|
|
data.password = { secret: password };
|
|
|
- const { phone } = data;
|
|
|
+ const { name, phone } = data;
|
|
|
// 检查手机号
|
|
|
const num = await this.model.count({ phone, isdel: '0' });
|
|
|
- if (num > 0) throw new BusinessError(ErrorCode.DATA_EXISTED, '已有个人用户使用该手机号');
|
|
|
+ if (num > 0) throw new BusinessError(ErrorCode.DATA_EXISTED, `姓名:${name} ; 手机号: ${phone} ;已有个人用户使用该手机号`);
|
|
|
return await this.model.create(data);
|
|
|
}
|
|
|
/**
|