|
@@ -1,6 +1,7 @@
|
|
|
package shop.alien.second.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
@@ -8,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.google.gson.JsonObject;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -240,6 +242,7 @@ public class SecondGoodsServiceImpl extends ServiceImpl<SecondGoodsMapper, Secon
|
|
|
auditRecord.setCreatedTime(new Date());
|
|
|
auditRecord.setUpdatedTime(new Date());
|
|
|
secondGoodsAuditMapper.insert(auditRecord);
|
|
|
+ goods.setAuditRecordId(auditRecord.getId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -294,9 +297,13 @@ public class SecondGoodsServiceImpl extends ServiceImpl<SecondGoodsMapper, Secon
|
|
|
LifeNotice lifeNotice = new LifeNotice();
|
|
|
lifeNotice.setSenderId("system");
|
|
|
lifeNotice.setReceiverId("user_"+ phone);
|
|
|
- lifeNotice.setBusinessId(goods.getId());
|
|
|
+ lifeNotice.setBusinessId(goods.getAuditRecordId());
|
|
|
lifeNotice.setTitle("商品发布通知");
|
|
|
- lifeNotice.setContext("恭喜您的商品已发成功");
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("status", "true");
|
|
|
+ jsonObject.put("text", "恭喜您的商品已发成功");
|
|
|
+ lifeNotice.setContext(jsonObject.toJSONString());
|
|
|
+// lifeNotice.setContext("恭喜您的商品已发成功");
|
|
|
lifeNotice.setNoticeType(1); // 系统通知
|
|
|
lifeNotice.setIsRead(0);
|
|
|
lifeNoticeMapper.insert(lifeNotice);
|
|
@@ -315,11 +322,16 @@ public class SecondGoodsServiceImpl extends ServiceImpl<SecondGoodsMapper, Secon
|
|
|
LifeNotice lifeNotice = new LifeNotice();
|
|
|
lifeNotice.setSenderId("system");
|
|
|
lifeNotice.setReceiverId("user_"+ phone);
|
|
|
- lifeNotice.setBusinessId(goods.getId());
|
|
|
+ lifeNotice.setBusinessId(goods.getAuditRecordId());
|
|
|
lifeNotice.setTitle("商品审核通知");
|
|
|
// TODO: 失败原因本期为固定文案,实际原因暂不保存
|
|
|
+
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("status", "false");
|
|
|
+ jsonObject.put("text", "抱歉您的商品发布失败,图片或文字存在违规行为。请您修改后从新发布");
|
|
|
+ lifeNotice.setContext(jsonObject.toJSONString());
|
|
|
// lifeNotice.setContext("商品审核失败,原因为:" + goods.getFailedReason());
|
|
|
- lifeNotice.setContext("抱歉您的商品发布失败,图片或文字存在违规行为。请您修改后从新发布");
|
|
|
+// lifeNotice.setContext("抱歉您的商品发布失败,图片或文字存在违规行为。请您修改后从新发布");
|
|
|
lifeNotice.setNoticeType(1); // 系统通知
|
|
|
lifeNotice.setIsRead(0);
|
|
|
lifeNoticeMapper.insert(lifeNotice);
|