Commit 94a8d122 authored by zhaofei's avatar zhaofei

s

parent 9fef62dd
......@@ -78,15 +78,18 @@ export default class ActivitSaveController {
const { bothIds, deleteIds } = await activityconfigService.diffPrizeList(activityId, allPrizeList)
// 将删除的奖品逻辑删除
if (deleteIds?.length) {
result = await activityconfigService.deletePrizeByIds(deleteIds)
}
if (allPrizeList?.length) {
// 添加和更新奖品
const prizeResult = await activityconfigService.insertAndUpdatePrize(activityId, allPrizeList, bothIds)
if (prizeResult.failed.length) {
console.log(prizeResult.failed, '更新奖品失败')
return resultsModel.error(CODE_TYPES.SYSTEM_ERROR, '保存活动失败')
}
}
if (result || result === 0) {
return resultsModel.success(true)
......
......@@ -149,7 +149,7 @@ export default class ActivityConfigService {
},
{
$set: {
data,
...data,
updateTime: Date.now(),
deleteStatus: DELETE_STATUS.EXIST
}
......
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