|
@@ -9,7 +9,7 @@ class OrderService extends CrudService {
|
|
|
super(ctx, 'order');
|
|
|
this.model = this.ctx.model.Order;
|
|
|
}
|
|
|
- async create({ name, phone, openid, code, hospitalId, hospitalName, subjectId, subjectName, specialistId, specialistName, money, status, remark }) {
|
|
|
+ async create({ name, phone, openid, code, hospitalId, hospitalName, subjectId, subjectName, status, remark, code1 }) {
|
|
|
assert(name, '请填写完整信息');
|
|
|
assert(phone, '请填写完整信息');
|
|
|
assert(openid, '请填写完整信息');
|
|
@@ -18,13 +18,10 @@ class OrderService extends CrudService {
|
|
|
assert(hospitalName, '请填写完整信息');
|
|
|
assert(subjectId, '请填写完整信息');
|
|
|
assert(subjectName, '请填写完整信息');
|
|
|
- assert(specialistId, '请填写完整信息');
|
|
|
- assert(specialistName, '请填写完整信息');
|
|
|
- assert(money, '请填写完整信息');
|
|
|
const time = moment().format('YYYY-MM-DD HH:mm:ss');
|
|
|
let out_trade_no = uuid.v1();
|
|
|
out_trade_no = out_trade_no.replace(/-/g, '');
|
|
|
- const res = await this.model.create({ name, phone, openid, time, code, hospitalId, hospitalName, subjectId, subjectName, specialistId, specialistName, money, status, remark, out_trade_no });
|
|
|
+ const res = await this.model.create({ name, phone, openid, time, code, hospitalId, hospitalName, subjectId, subjectName, status, remark, out_trade_no, code1 });
|
|
|
return res;
|
|
|
}
|
|
|
async updatestatus({ out_trade_no }) {
|