Commit 84ce7e32 authored by 成旭东's avatar 成旭东

同种业态楼盘 推荐排序唯一

parent e8cad0b2
Pipeline #27876 passed with stage
in 4 minutes 1 second
......@@ -228,6 +228,20 @@ export default class EstateListService extends Service {
id,
},
});
if (params.order) {
const orderRecord = await ctx[modelGroupName][modelName].findOne({
where: {
type: record.type,
order: params.order,
},
});
if (orderRecord) {
this.ctx.throw(400, `存在当前推荐排序同种业态楼盘,楼盘ID为${orderRecord.id}`);
}
}
if (!record) {
this.ctx.throw(400, '记录不存在');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment