|
|
@@ -44,6 +44,8 @@ import shop.alien.util.common.constant.CommentSourceTypeEnum;
|
|
|
import shop.alien.util.common.constant.RatingBusinessTypeEnum;
|
|
|
import shop.alien.util.common.safe.TextModerationUtil;
|
|
|
import shop.alien.util.common.safe.TextReviewServiceEnum;
|
|
|
+import shop.alien.util.type.PhoneTypeIdResult;
|
|
|
+import shop.alien.util.type.TypeUtil;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
@@ -93,6 +95,8 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
private final StoreClockInMapper storeClockInMapper;
|
|
|
private final OrderReviewService orderReviewService;
|
|
|
|
|
|
+ private TypeUtil typeUtil;
|
|
|
+
|
|
|
public static final List<String> SERVICES_LIST = ImmutableList.of(
|
|
|
TextReviewServiceEnum.COMMENT_DETECTION_PRO.getService(),
|
|
|
TextReviewServiceEnum.LLM_QUERY_MODERATION.getService()
|
|
|
@@ -291,6 +295,14 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
LifeNotice lifeNotice = new LifeNotice();
|
|
|
lifeNotice.setSenderId("system");
|
|
|
lifeNotice.setReceiverId(receiverId);
|
|
|
+
|
|
|
+ if (receiverId.contains("_")){
|
|
|
+ PhoneTypeIdResult phoneTypeIdResult =typeUtil.resolveTypeAndId(receiverId);
|
|
|
+ lifeNotice.setReceiverUserType(phoneTypeIdResult.getType());
|
|
|
+ lifeNotice.setReceiverRefId(phoneTypeIdResult.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
lifeNotice.setBusinessId(commonRating.getBusinessId());
|
|
|
lifeNotice.setTitle(noticeTitle);
|
|
|
lifeNotice.setContext(contextJson.toJSONString());
|
|
|
@@ -498,6 +510,14 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
|
|
|
String commonDate = simpleDateFormat.format(new Date());
|
|
|
LifeNotice lifeMessage = new LifeNotice();
|
|
|
lifeMessage.setReceiverId("store_" + storeUser.getPhone());
|
|
|
+
|
|
|
+ if (lifeMessage.getReceiverId().contains("_")){
|
|
|
+ PhoneTypeIdResult phoneTypeIdResult =typeUtil.resolveTypeAndId(lifeMessage.getReceiverId());
|
|
|
+ lifeMessage.setReceiverUserType(phoneTypeIdResult.getType());
|
|
|
+ lifeMessage.setReceiverRefId(phoneTypeIdResult.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
String text = "在"+commonDate+",您的店铺有一条差评记录,您可查看评价内容是否属实,如不属实,可向平台进行申诉。";
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("message", text);
|