Commit 647a10fd authored by 任国军's avatar 任国军

actImageList add success_url

parent b1304663
......@@ -624,7 +624,7 @@ class UserService extends Service {
const { ctx } = this;
const userImageList = await ctx.classModel.CourseUserActImage.findAll({ where: { user_uuid: ctx.userUuid, status: 1, is_deleted: 0 } });
const imageList = await ctx.classModel.CourseActImage.findAll({ where: { id: { $in: R.pluck('image_id', userImageList) } }, attributes: [ 'id', 'selected_image', 'unselected_image', 'title', 'content' ] });
const imageList = await ctx.classModel.CourseActImage.findAll({ where: { id: { $in: R.pluck('image_id', userImageList) } }, attributes: [ 'id', 'selected_image', 'unselected_image', 'title', 'content', 'h5_promote_success_url' ] });
const ret = {
list: imageList,
};
......@@ -749,7 +749,7 @@ class UserService extends Service {
}
await ctx.classModel.V5.CourseUserOrder.update({ address, columns, status: 1 }, { where: { id: order.id } });
await ctx.classModel.CourseUserActImage.findOrCreate({ user_uuid: ctx.userUuid, image_id: id });
await ctx.classModel.CourseUserActImage.findOrCreate({ where: { user_uuid: ctx.userUuid, image_id: id, status: 1, is_deleted: 0 }, defaults: { user_uuid: ctx.userUuid, image_id: id } });
const ret = {
result: true,
......
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