|
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.txz.mall.dao.NoticeMapper;
|
|
import com.txz.mall.dao.NoticeMapper;
|
|
|
|
+import com.txz.mall.enums.NoticeEnum;
|
|
import com.txz.mall.model.Notice;
|
|
import com.txz.mall.model.Notice;
|
|
import com.txz.mall.service.NoticeService;
|
|
import com.txz.mall.service.NoticeService;
|
|
import dto.NoticeDTO;
|
|
import dto.NoticeDTO;
|
|
@@ -37,4 +38,44 @@ public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> impleme
|
|
});
|
|
});
|
|
this.saveBatch(saveBatch);
|
|
this.saveBatch(saveBatch);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void addOtherNotice(Long otherId, String noticeMessage, String pages, Long... uids) {
|
|
|
|
+ this.addNotice(NoticeDTO.builder()
|
|
|
|
+ .noticeType(NoticeEnum.OTHER)
|
|
|
|
+ .otherId(otherId)
|
|
|
|
+ .noticeMessage(noticeMessage)
|
|
|
|
+ .pages(pages)
|
|
|
|
+ .build()
|
|
|
|
+ , uids
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void addOrderNotice(NoticeEnum noticeType, String noticeMessage, Long... uids) {
|
|
|
|
+ this.addNotice(NoticeDTO.builder()
|
|
|
|
+ .noticeType(noticeType)
|
|
|
|
+ .noticeMessage(noticeMessage)
|
|
|
|
+ .build()
|
|
|
|
+ , uids
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void addRewardNotice(NoticeEnum noticeType, Long... uids) {
|
|
|
|
+ this.addNotice(NoticeDTO.builder()
|
|
|
|
+ .noticeType(noticeType)
|
|
|
|
+ .build()
|
|
|
|
+ , uids
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void addMoneyNotice(NoticeEnum noticeType, Long... uids) {
|
|
|
|
+ this.addNotice(NoticeDTO.builder()
|
|
|
|
+ .noticeType(noticeType)
|
|
|
|
+ .build()
|
|
|
|
+ , uids
|
|
|
|
+ );
|
|
|
|
+ }
|
|
}
|
|
}
|