Explorar o código

Merge branch 'yh_sku_func' into pre

# Conflicts:
#	netflix-service/src/main/java/com/cyksj/service/mange/RefreshCacheService.java
#	netflix-service/src/main/java/com/cyksj/service/mange/impl/RefreshCacheServiceImpl.java
#	netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java
zoujiajian %!s(int64=2) %!d(string=hai) anos
pai
achega
a05dd0b4ec
Modificáronse 31 ficheiros con 508 adicións e 48 borrados
  1. 1 1
      netflix-common/src/main/java/com/cyksj/common/constant/Constant.java
  2. 16 0
      netflix-common/src/main/java/com/cyksj/common/util/StringUtil.java
  3. 13 0
      netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopGoodsSkuMapper.java
  4. 2 0
      netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopMapper.java
  5. 19 0
      netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopSkuSysTakeDownRecordMapper.java
  6. 44 0
      netflix-dao/src/main/java/com/cyksj/model/dto/CuiQiuEmailDetailDto.java
  7. 38 0
      netflix-dao/src/main/java/com/cyksj/model/dto/CuiQiuEmailDto.java
  8. 31 0
      netflix-dao/src/main/java/com/cyksj/model/dto/CuiQiuEmailResultDto.java
  9. 36 0
      netflix-dao/src/main/java/com/cyksj/model/entity/YhShopSkuSysTakeDownRecord.java
  10. 7 1
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopGoodsFrontCategoryView.java
  11. 9 0
      netflix-dao/src/main/resources/mapper/YhShopMapper.xml
  12. 14 0
      netflix-dao/src/main/resources/mapper/YhShopSkuSysTakeDownRecordMapper.xml
  13. 2 2
      netflix-service/src/main/java/com/cyksj/service/chatgpt/impl/ChatGptAccountServiceImpl.java
  14. 15 15
      netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpEventActionServiceImpl.java
  15. 2 3
      netflix-service/src/main/java/com/cyksj/service/corp/impl/WxCorpOpsImpl.java
  16. 15 0
      netflix-service/src/main/java/com/cyksj/service/mail/CuiQiuMailService.java
  17. 108 0
      netflix-service/src/main/java/com/cyksj/service/mail/impl/CuiQiuMailServiceImpl.java
  18. 3 0
      netflix-service/src/main/java/com/cyksj/service/mange/CmsGoodsDonSkuService.java
  19. 2 0
      netflix-service/src/main/java/com/cyksj/service/mange/RefreshCacheService.java
  20. 29 0
      netflix-service/src/main/java/com/cyksj/service/mange/goods/CmsGoodsDonSkuServiceImpl.java
  21. 2 2
      netflix-service/src/main/java/com/cyksj/service/mange/group/CmsGroupServiceImpl.java
  22. 7 0
      netflix-service/src/main/java/com/cyksj/service/mange/impl/RefreshCacheServiceImpl.java
  23. 10 13
      netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java
  24. 3 0
      netflix-service/src/main/java/com/cyksj/service/shop/YhShopGoodsSkuService.java
  25. 23 0
      netflix-service/src/main/java/com/cyksj/service/shop/impl/YhShopGoodsSkuServiceImpl.java
  26. 1 1
      netflix-service/src/main/java/com/cyksj/service/template/impl/TemplateCommonServiceImpl.java
  27. 7 0
      netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java
  28. 2 0
      netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsAccountController.java
  29. 11 0
      netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/CmsGoodsDonSkuController.java
  30. 27 10
      netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/YhShopGoodsController.java
  31. 9 0
      netflix-web/src/main/java/com/cyksj/web/controller/mirror/MirrorController.java

+ 1 - 1
netflix-common/src/main/java/com/cyksj/common/constant/Constant.java

@@ -111,7 +111,7 @@ public interface Constant {
 	 */
 	String QR_CODE_WX_APP_ID = "qr_code_wx_app_id";
 
-	String CHANGE_GROUPS_TRIPS_ACCOUNT = "您好,您购买的%s,密码已更换【银河录像局】";
+	String CHANGE_GROUPS_TRIPS_ACCOUNT = "您好,您购买的%s,车票账号:%s密码已更换【银河录像局】";
 
 	String ACCOUNT_EXPIRY_MSG_TEMPLATE = "您好,您购买的%s,还有%s到期,请登陆网站https://nf.video/及时续费。【银河录像局】";
 

+ 16 - 0
netflix-common/src/main/java/com/cyksj/common/util/StringUtil.java

@@ -11,6 +11,8 @@ import java.net.http.HttpResponse;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * @author  chan 字符串操作辅助类
@@ -555,4 +557,18 @@ public final class StringUtil {
 
 		return "unknown";
 	}
+
+	/**
+	 * 获取账号登录验证码
+	 */
+	public static String getVerifyCodePattern(String code) {
+		if (StrUtil.isNotEmpty(code)) {
+			Pattern pattern = Pattern.compile("\\d{4,}");
+			Matcher matcher = pattern.matcher(code);
+			while (matcher.find()) {
+				return matcher.group();
+			}
+		}
+		return StrUtil.EMPTY;
+	}
 }

+ 13 - 0
netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopGoodsSkuMapper.java

@@ -5,6 +5,10 @@ import com.cyksj.model.entity.GoodsDonSku;
 import com.cyksj.model.entity.YhShopGoodsSku;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * @author zwhui
@@ -15,4 +19,13 @@ public interface YhShopGoodsSkuMapper extends BaseMapper<YhShopGoodsSku> {
 	@Select("select sku.*,ygs.price as yhShopSkuPrice from (select user_id from yh_shop where id = #{yhsId} limit 1) ys inner join yh_shop_goods_sku ygs on ygs.user_id = ys.user_id and ygs.sku_id = #{skuId} and ygs.deleted is true and ygs.status is true" +
 			" inner join goods_don_sku sku on sku.id = ygs.sku_id")
 	GoodsDonSku selectGoodsDonSkuBySkuIdAndYhsId(@Param("yhsId") Long yhsId, @Param("skuId") Long skuId);
+
+	@Update("update yh_shop_goods_sku set status = 0 where sku_id = #{skuId} and price < #{minPrice}")
+	Integer setBelowPriceShopSkuDown(@Param("skuId") Long skuId, @Param("minPrice") BigDecimal minPrice);
+
+	@Select("select sku_id,price from yh_shop_goods_sku where yhs_id = #{yhsId} and goods_id = #{goodsId} order by price limit 1")
+	YhShopGoodsSku selectMinPriceSkuByYhsId(@Param("yhsId") Long yhsId, @Param("skuId") Long goodsId);
+
+	@Select("select * from yh_shop_goods_sku where yhs_id = #{yhsId} and goods_id = #{goodsId} order by price limit 1")
+	List<YhShopGoodsSku> getBelowPriceShopSku(Long skuId, BigDecimal minPrice);
 }

+ 2 - 0
netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopMapper.java

@@ -28,4 +28,6 @@ public interface YhShopMapper extends BaseMapper<YhShop> {
 	Map<String, Object> selectYhShopApplyMoney(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
 	YhShopDistributeMoneyApply selectRelationBusiness(Long userId);
+
+	String getYhShopSkuSysStatusDownInfo(long userId);
 }

+ 19 - 0
netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopSkuSysTakeDownRecordMapper.java

@@ -0,0 +1,19 @@
+package com.cyksj.mapper.shop;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.cyksj.model.entity.YhShopGoodsSku;
+import com.cyksj.model.entity.YhShopSkuSysTakeDownRecord;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 项目名: yhlxj2
+ * 文件名: YhShopSkuSysTakeDownRecordMapper
+ * 创建者: JavaZou
+ * 创建时间:2024/4/26 14:29
+ */
+public interface YhShopSkuSysTakeDownRecordMapper extends BaseMapper<YhShopSkuSysTakeDownRecord> {
+	void batchInsert(@Param("list") List<YhShopGoodsSku> yhShopGoodsSkus, @Param("sysPrice") BigDecimal sysPrice);
+}

+ 44 - 0
netflix-dao/src/main/java/com/cyksj/model/dto/CuiQiuEmailDetailDto.java

@@ -0,0 +1,44 @@
+package com.cyksj.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 项目名: yhlxj2
+ * 文件名: CuiQiuEmailDetailDto
+ * 创建者: JavaZou
+ * 创建时间:2024/4/25 16:52
+ */
+@Getter
+@Setter
+public class CuiQiuEmailDetailDto {
+	private Integer code;
+
+	private String msg;
+
+	private ResultData data;
+
+	@Getter
+	@Setter
+	public static class ResultData{
+		private Content content;
+	}
+
+	@Getter
+	@Setter
+	public static class Content {
+		private Integer id;
+
+		private String time;
+
+		private String subject;
+
+		private List<CuiQiuEmailDto.CuiQiuUser> from;
+
+		private List<CuiQiuEmailDto.CuiQiuUser> to;
+
+		private String body;
+	}
+}

+ 38 - 0
netflix-dao/src/main/java/com/cyksj/model/dto/CuiQiuEmailDto.java

@@ -0,0 +1,38 @@
+package com.cyksj.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 项目名: yhlxj2
+ * 文件名: CuiQiuEmailDto
+ * 创建者: JavaZou
+ * 创建时间:2024/4/25 16:35
+ */
+
+@Getter
+@Setter
+public class CuiQiuEmailDto {
+
+	private Long id;
+
+	private String time;
+
+	private Long timestamp;
+
+	private String subject;
+
+	private List<CuiQiuUser> from;
+
+	private List<CuiQiuUser> to;
+
+	@Getter
+	@Setter
+	public static class CuiQiuUser{
+		private String name;
+
+		private String address;
+	}
+}

+ 31 - 0
netflix-dao/src/main/java/com/cyksj/model/dto/CuiQiuEmailResultDto.java

@@ -0,0 +1,31 @@
+package com.cyksj.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 项目名: yhlxj2
+ * 文件名: CuiQiuEmailResultDto
+ * 创建者: JavaZou
+ * 创建时间:2024/4/25 16:42
+ */
+@Getter
+@Setter
+public class CuiQiuEmailResultDto {
+	private Integer code;
+
+	private String msg;
+
+	private ResultData data;
+
+	@Getter
+	@Setter
+	public static class ResultData {
+		private Integer total;
+
+		private List<CuiQiuEmailDto> list;
+	}
+
+}

+ 36 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/YhShopSkuSysTakeDownRecord.java

@@ -0,0 +1,36 @@
+package com.cyksj.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/**
+ * 项目名: yhlxj2
+ * 文件名: YhShopSkuSysTakeDownRecord
+ * 创建者: JavaZou
+ * 创建时间:2024/4/26 14:26
+ */
+@Getter
+@Setter
+public class YhShopSkuSysTakeDownRecord extends BaseEntity{
+	private Long yhsId;
+
+	private Long userId;
+
+	private Long goodsId;
+
+	private Long skuId;
+
+	/**
+	 * 店铺规格价格
+	 */
+	private BigDecimal shopPrice;
+
+	/**
+	 * 系统后台设置规格最低价格
+	 */
+	private BigDecimal sysPrice;
+
+	private Boolean deleted;
+}

+ 7 - 1
netflix-dao/src/main/java/com/cyksj/model/views/YhShopGoodsFrontCategoryView.java

@@ -75,7 +75,13 @@ public class YhShopGoodsFrontCategoryView {
 	/**
 	 * 店铺最低规格价格
 	 */
-	@DbField("yg.price")
+	@DbIgnore
+	private Long skuId;
+
+	/**
+	 * 店铺最低规格价格
+	 */
+	@DbIgnore
 	private BigDecimal price;
 
 	/**

+ 9 - 0
netflix-dao/src/main/resources/mapper/YhShopMapper.xml

@@ -61,4 +61,13 @@
         from (select * from yh_shop where user_id = #{userId} limit 1) ys
                  left join cms_user cu on cu.id = ys.business_id
     </select>
+
+    <select id="getYhShopSkuSysStatusDownInfo" resultType="java.lang.String">
+        select group_CONCAT(g.title, " ", sku.spec_val)
+        from (select goods_id, sku_id
+              from yh_shop_sku_sys_take_down_record
+              where user_id = #{userId} and deleted is true) s
+                 inner join goods_don_sku sku on sku.id = s.sku_id
+                 inner join goods_don g on g.id = s.goods_id
+    </select>
 </mapper>

+ 14 - 0
netflix-dao/src/main/resources/mapper/YhShopSkuSysTakeDownRecordMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cyksj.mapper.shop.YhShopSkuSysTakeDownRecordMapper">
+
+
+    <insert id="batchInsert">
+        insert into
+        yh_shop_sku_sys_take_down_record(`yhs_id`,`user_id`,`goods_id`,`sku_id`,`shop_price`,`sys_price`,`created_time`,`update_time`)
+        values
+        <foreach collection="list" item="item" separator=",">
+            (#{item.yhsId},#{item.userId},#{item.goodsId},#{item.skuId},#{item.price},#{sysPrice},now(),now())
+        </foreach>
+    </insert>
+</mapper>

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/chatgpt/impl/ChatGptAccountServiceImpl.java

@@ -642,7 +642,7 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
                 .map((historyView) -> {
                     ChatgptCarInfoView chatgptCarInfoView = buildChatgptCarInfoView(historyView.getCarId(), historyView.getCarName(), historyView.getIsPLus(), redisService.zScore(RedisService.key.CHATGPT_CAR_SCORES.getName(), historyView.getCarId()));
                     chatgptCarInfoView.setIsHistory(true);
-                    chatgptCarInfoView.setScore(Math.min(redisService.zScore(RedisService.key.CHATGPT_CAR_SCORES.getName(), historyView.getCarId()), 100));
+                    chatgptCarInfoView.setScore(Math.min(redisService.zScore(RedisService.key.CHATGPT_CAR_SCORES.getName(), historyView.getCarId()), 200));
 
                     return chatgptCarInfoView;
                 }).collect(Collectors.toCollection(LinkedHashSet::new));
@@ -740,7 +740,7 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
         ChatgptCarInfoView view = new ChatgptCarInfoView();
         view.setCarId(carId);
         // 假设以下方法从Redis或其他服务获取数据
-        view.setScore(Math.min(score, 100));
+        view.setScore(Math.min(score, 200));
         view.setStatus(score >= 50 ? "繁忙" : "空闲"); // 或“繁忙”
 
         view.setType(isPlus == 1 ? "plus" : "3.5");

+ 15 - 15
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpEventActionServiceImpl.java

@@ -620,22 +620,22 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
 						postData(callback, corpCustomerAcquisitionLinkPopularize.getAddEvent());
 					}
 				}
-
-				if (corpCustomerAcquisitionLinkPopularize.getDelayedPost()) {
-					CorpCustomerAcquistionCallback corpCustomerAcquistionCallback =
-							corpCustomerAcquistionCallbackMapper.selectOne(Wrappers.lambdaQuery(CorpCustomerAcquistionCallback.class).eq(CorpCustomerAcquistionCallback::getCallback, callback).eq(CorpCustomerAcquistionCallback::getUnionId, unionId));
-					if (corpCustomerAcquistionCallback == null) {
-						corpCustomerAcquistionCallback = new CorpCustomerAcquistionCallback();
-					}
-					corpCustomerAcquistionCallback.setCallback(callback);
-					corpCustomerAcquistionCallback.setEvent(corpCustomerAcquisitionLinkPopularize.getEvent());
-					corpCustomerAcquistionCallback.setUnionId(unionId);
-					if (corpCustomerAcquistionCallback.getId() != null) {
-						corpCustomerAcquistionCallbackMapper.updateById(corpCustomerAcquistionCallback);
-					} else {
-						corpCustomerAcquistionCallbackMapper.insert(corpCustomerAcquistionCallback);
-					}
+				// 是否延后回传都记录,只看是否直接回传.
+				CorpCustomerAcquistionCallback corpCustomerAcquistionCallback =
+						corpCustomerAcquistionCallbackMapper.selectOne(Wrappers.lambdaQuery(CorpCustomerAcquistionCallback.class).eq(CorpCustomerAcquistionCallback::getCallback, callback).eq(CorpCustomerAcquistionCallback::getUnionId, unionId));
+				if (corpCustomerAcquistionCallback == null) {
+					corpCustomerAcquistionCallback = new CorpCustomerAcquistionCallback();
 				}
+				corpCustomerAcquistionCallback.setCallback(callback);
+				corpCustomerAcquistionCallback.setEvent(corpCustomerAcquisitionLinkPopularize.getEvent());
+				corpCustomerAcquistionCallback.setUnionId(unionId);
+				corpCustomerAcquistionCallback.setStatus(!corpCustomerAcquisitionLinkPopularize.getDelayedPost());
+				if (corpCustomerAcquistionCallback.getId() != null) {
+					corpCustomerAcquistionCallbackMapper.updateById(corpCustomerAcquistionCallback);
+				} else {
+					corpCustomerAcquistionCallbackMapper.insert(corpCustomerAcquistionCallback);
+				}
+
 			}
 		}
 		return null;

+ 2 - 3
netflix-service/src/main/java/com/cyksj/service/corp/impl/WxCorpOpsImpl.java

@@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.common.exception.BusinessRuntimeException;
 import com.cyksj.common.util.IoKit;
 import com.cyksj.common.util.J11HttpC;
@@ -541,7 +540,7 @@ public class WxCorpOpsImpl implements WxCorpOps {
 		String accessToken = getAccessToken(corpId);
 		String url = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token=" + accessToken;
 		log.info("发送的内容为: {}",Jsons.toJson(msgTemplate));
-		log.info("企业微信群发消息 corpId:{}, sender:{},userCount:{}",corpId,msgTemplate.getSender(),msgTemplate.getExternalUserid().size());
+		log.info("企业微信群发消息 corpId:{},userCount:{}", corpId, msgTemplate.getExternalUserid().size());
 		HttpResponse<String> res =
 				J11HttpC.custom()
 						.ofPost()
@@ -782,7 +781,7 @@ public class WxCorpOpsImpl implements WxCorpOps {
 
 	@Override
 	public WxCpLinkAddResp customerAcquisitionDeleteLink(String corpId, WxCpLinkUpd wxCpLinkUpd) throws Exception {
-		String url = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/delete_link?access_token=";
+		String url = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/delete_link?access_token=" + getAccessToken(corpId);
 
 		HttpResponse<String> res =
 				J11HttpC.custom()

+ 15 - 0
netflix-service/src/main/java/com/cyksj/service/mail/CuiQiuMailService.java

@@ -0,0 +1,15 @@
+package com.cyksj.service.mail;
+
+/**
+ * 项目名: yhlxj2
+ * 文件名: CuiQiuMailService
+ * 创建者: JavaZou
+ * 创建时间:2024/4/25 15:55
+ */
+public interface CuiQiuMailService {
+
+	/**
+	 * 获取最新邮箱 返回验证码
+	 */
+	String getVerifyCode(String email) throws Exception;
+}

+ 108 - 0
netflix-service/src/main/java/com/cyksj/service/mail/impl/CuiQiuMailServiceImpl.java

@@ -0,0 +1,108 @@
+package com.cyksj.service.mail.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.http.HttpUtil;
+import com.cyksj.common.util.Jsons;
+import com.cyksj.common.util.StringUtil;
+import com.cyksj.model.dto.CuiQiuEmailDetailDto;
+import com.cyksj.model.dto.CuiQiuEmailDto;
+import com.cyksj.model.dto.CuiQiuEmailResultDto;
+import com.cyksj.service.mail.CuiQiuMailService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 项目名: yhlxj2
+ * 文件名: CuiQiuMailServiceImpl
+ * 创建者: JavaZou
+ * 创建时间:2024/4/25 15:57
+ */
+@Service
+@Slf4j
+public class CuiQiuMailServiceImpl implements CuiQiuMailService {
+	private final static String CUI_QIU_TOKEN = "4ff0341ebf1747cd89a2d1a5a296b68b";
+
+	//脆球域名id
+	private final static String DOMAIN_ID = "1696913058045050661";
+
+	//代收管理员邮件id
+	private final static String ADMIN_MAIL_ID = "1696913058063659217";
+
+	//PS 验证码官方
+	private final static String PS_ADOBE = "Adobe";
+
+	@Override
+	public String getVerifyCode(String email) throws Exception {
+		//获取近二十封邮件
+		String url = "https://domain-open-api.cuiqiu.com/v1/message/list";
+
+		Map<String, Object> params = new HashMap<>();
+
+		//获取近五分钟的代收邮件
+		//维度是天
+		DateTime now = DateTime.now();
+		params.put("token", CUI_QIU_TOKEN);
+		params.put("mail_id", ADMIN_MAIL_ID);
+		params.put("start_time", DateUtil.offsetDay(now, -1).toDateStr());
+		params.put("end_time", DateUtil.offsetDay(now, 1).toDateStr());
+		params.put("limit", 20);
+
+		HttpRequest post = HttpUtil.createPost(url);
+		post.form(params);
+		HttpResponse execute = post.execute();
+		CuiQiuEmailResultDto resultDto = Jsons.parseObject(execute.body(), CuiQiuEmailResultDto.class);
+		List<CuiQiuEmailDto> list = resultDto.getData().getList();
+		//获取邮箱对应的邮件
+		list = list.stream().filter(emailInfo -> {
+			CuiQiuEmailDto.CuiQiuUser from = emailInfo.getFrom().get(0);
+			CuiQiuEmailDto.CuiQiuUser cuiQiuUser = emailInfo.getTo().get(0);
+			if (StrUtil.equals(from.getName(), PS_ADOBE) && StrUtil.equals(cuiQiuUser.getAddress(), email)) {
+				return true;
+			}
+			return false;
+		}).collect(Collectors.toList());
+
+		if (CollUtil.isNotEmpty(list)) {
+			for (CuiQiuEmailDto cuiQiuEmailDto : list) {
+				Long messageId = cuiQiuEmailDto.getId();
+				try {
+					String code = getVerifyCodeByEmail(messageId);
+					if (StrUtil.isNotBlank(code)) {
+						return code;
+					}
+				} catch (Exception e) {
+				}
+			}
+		}
+		return null;
+	}
+
+	public String getVerifyCodeByEmail(Long messageId) throws Exception {
+		String url = "https://domain-open-api.cuiqiu.com/v1/message/detail";
+		Map<String, Object> params = new HashMap<>();
+		params.put("token", CUI_QIU_TOKEN);
+		params.put("mail_id", ADMIN_MAIL_ID);
+		params.put("message_id", messageId);
+		HttpRequest post = HttpUtil.createPost(url);
+		post.form(params);
+		HttpResponse execute = post.execute();
+		String body = execute.body();
+		CuiQiuEmailDetailDto cuiQiuEmailDetailDto = Jsons.parseObject(body, CuiQiuEmailDetailDto.class);
+		CuiQiuEmailDetailDto.Content content = cuiQiuEmailDetailDto.getData().getContent();
+
+		String contentBody = content.getBody();
+
+		String code = StrUtil.subWithLength(contentBody, contentBody.indexOf("ADOBE"), 215);
+		return StringUtil.getVerifyCodePattern(code);
+	}
+}

+ 3 - 0
netflix-service/src/main/java/com/cyksj/service/mange/CmsGoodsDonSkuService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.cyksj.model.entity.GoodsDiscountPlusPurchaseRelation;
 import com.cyksj.model.entity.GoodsDonSku;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -14,4 +15,6 @@ public interface CmsGoodsDonSkuService extends IService<GoodsDonSku> {
 	void handleDiscountPurchaseGoods(GoodsDonSku sku, List<GoodsDiscountPlusPurchaseRelation> discountPlusPurchaseGoods);
 
 	void updateMirrorCarUserNum(GoodsDonSku sku);
+
+	void setBelowPriceShopSkuDown(Long skuId, BigDecimal newPrice);
 }

+ 2 - 0
netflix-service/src/main/java/com/cyksj/service/mange/RefreshCacheService.java

@@ -28,4 +28,6 @@ public interface RefreshCacheService {
 	 * 清除用户店铺缓存
 	 */
 	void refreshUserShopMangeCache(String customId);
+
+	void refreshShopUserIdCacheByYshId(Long yhsId);
 }

+ 29 - 0
netflix-service/src/main/java/com/cyksj/service/mange/goods/CmsGoodsDonSkuServiceImpl.java

@@ -8,8 +8,13 @@ import com.cyksj.common.exception.BusinessRuntimeException;
 import com.cyksj.mapper.ChatgptUserMapper;
 import com.cyksj.mapper.GoodsDiscountPlusPurchaseRelationMapper;
 import com.cyksj.mapper.GoodsDonSkuMapper;
+import com.cyksj.mapper.shop.YhShopGoodsRateMapper;
+import com.cyksj.mapper.shop.YhShopGoodsSkuMapper;
+import com.cyksj.mapper.shop.YhShopSkuSysTakeDownRecordMapper;
 import com.cyksj.model.entity.GoodsDiscountPlusPurchaseRelation;
 import com.cyksj.model.entity.GoodsDonSku;
+import com.cyksj.model.entity.YhShopGoodsRate;
+import com.cyksj.model.entity.YhShopGoodsSku;
 import com.cyksj.service.mange.CmsGoodsDonSkuService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -36,6 +41,12 @@ public class CmsGoodsDonSkuServiceImpl extends ServiceImpl<GoodsDonSkuMapper,Goo
 
 	private final ChatgptUserMapper chatgptUserMapper;
 
+	private final YhShopGoodsRateMapper yhShopGoodsRateMapper;
+
+	private final YhShopGoodsSkuMapper yhShopGoodsSkuMapper;
+
+	private final YhShopSkuSysTakeDownRecordMapper yhShopSkuSysTakeDownRecordMapper;
+
 	@Override
 	public void handleDiscountPurchaseGoods(GoodsDonSku sku, List<GoodsDiscountPlusPurchaseRelation> discountPlusPurchaseGoods) {
 		Long skuId = sku.getId();
@@ -115,6 +126,24 @@ public class CmsGoodsDonSkuServiceImpl extends ServiceImpl<GoodsDonSkuMapper,Goo
 		}
 	}
 
+	@Override
+	public void setBelowPriceShopSkuDown(Long skuId, BigDecimal newPrice) {
+		YhShopGoodsRate yhShopGoodsRate = yhShopGoodsRateMapper.selectOne(Wrappers.lambdaQuery(YhShopGoodsRate.class)
+				.eq(YhShopGoodsRate::getSkuId, skuId)
+				.last("limit 1"));
+		if (yhShopGoodsRate != null) {
+			BigDecimal oriDiscount = BigDecimal.valueOf(100).subtract(BigDecimal.valueOf(yhShopGoodsRate.getRate()));
+			BigDecimal minPrice = newPrice.multiply(oriDiscount.divide(BigDecimal.valueOf(100)));
+			//记录那些店铺规格被下架
+			List<YhShopGoodsSku> yhShopGoodsSkus = yhShopGoodsSkuMapper.getBelowPriceShopSku(skuId, minPrice);
+			if (CollUtil.isNotEmpty(yhShopGoodsSkus)) {
+				yhShopSkuSysTakeDownRecordMapper.batchInsert(yhShopGoodsSkus, minPrice);
+				Integer update = yhShopGoodsSkuMapper.setBelowPriceShopSkuDown(skuId, minPrice);
+				log.info("变更skuId:{}规格价格,店铺数量:{}低于价格:{}下架", skuId, update, minPrice);
+			}
+		}
+	}
+
 	public void checkPurchaseParamsAndSaveOrUpdate(Long goodsId, Long skuId, GoodsDiscountPlusPurchaseRelation discountGoods) {
 		Long disSid = discountGoods.getDisSid();
 		if (disSid == null) {

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/mange/group/CmsGroupServiceImpl.java

@@ -250,7 +250,7 @@ public class CmsGroupServiceImpl extends ServiceImpl<GroupsMapper,GroupsTrips> i
             }
             if (relation.getUserId() != 0 && isPrdEnv && relation.getYhsId() == 0) {
                 //发送短信
-                smsService.sendSmsToRelationUser(relation.getUserId(), Constant.CHANGE_GROUPS_TRIPS_ACCOUNT, title);
+                smsService.sendSmsToRelationUser(relation.getUserId(), Constant.CHANGE_GROUPS_TRIPS_ACCOUNT, title, account.getAccount());
             }
             if (verifyCodeList != null && verifyCodeList.size() > 0 && i < verifyCodeList.size()) {
                 relation.setVerifyCode(verifyCodeList.get(i));
@@ -462,7 +462,7 @@ public class CmsGroupServiceImpl extends ServiceImpl<GroupsMapper,GroupsTrips> i
             }
             if (relation.getUserId() != 0 && isPrd && relation.getYhsId() == 0) {
                 try {
-                    smsService.sendSmsToRelationUser(relation.getUserId(), Constant.CHANGE_GROUPS_TRIPS_ACCOUNT, title);
+                    smsService.sendSmsToRelationUser(relation.getUserId(), Constant.CHANGE_GROUPS_TRIPS_ACCOUNT, title, account);
                 } catch (Exception e) {
                 }
             }

+ 7 - 0
netflix-service/src/main/java/com/cyksj/service/mange/impl/RefreshCacheServiceImpl.java

@@ -41,4 +41,11 @@ public class RefreshCacheServiceImpl implements RefreshCacheService {
 		Set<String> keys = redisService.keys(RedisService.key.YH_HOME_PAGHE_CACHE_SHOP.getEnvName() + customId + "*");
 		redisService.del(keys.toArray(String[]::new));
 	}
+
+	@Override
+	public void refreshShopUserIdCacheByYshId(Long yhsId) {
+		String yhShopCacheKey = RedisService.key.YH_HOME_PAGHE_CACHE_SHOP.getEnvName() + yhsId + "*";
+		Set<String> keys = redisService.keys(yhShopCacheKey);
+		redisService.del(keys.toArray(String[]::new));
+	}
 }

+ 10 - 13
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -15,6 +15,7 @@ import com.cyksj.common.constant.Constant;
 import com.cyksj.common.exception.BusinessRuntimeException;
 import com.cyksj.common.task.GlobalThreadPoolTaskExecutor;
 import com.cyksj.common.util.Jsons;
+import com.cyksj.common.util.StringUtil;
 import com.cyksj.enums.GatewayApiCode;
 import com.cyksj.mapper.*;
 import com.cyksj.mapper.sys.SysEmailMapper;
@@ -24,6 +25,7 @@ import com.cyksj.model.views.*;
 import com.cyksj.redis.RedisService;
 import com.cyksj.service.chatgpt.ChatGptAuthService;
 import com.cyksj.service.groups.GroupsFuncService;
+import com.cyksj.service.mail.CuiQiuMailService;
 import com.cyksj.service.mail.MailService;
 import com.cyksj.service.mange.coupon.CouponCommonService;
 import com.cyksj.service.relation.GroupRelationFrontService;
@@ -98,7 +100,10 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 
 	private final UserLoginRecordService userLoginRecordService;
 
-	private final static String VERIFY_CODE_SECRET = "q1w2e3";
+	private final CuiQiuMailService cuiQiuMailService;
+
+	//脆球邮箱后缀
+	private final static String CUI_QIU_EMAIL_SUFFIX = "@kindvd.com";
 
 	@Override
 	public SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account) {
@@ -454,6 +459,9 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		if (StrUtil.hasEmpty(account, password)) {
 			throw BusinessRuntimeException.getInstance("您的车票账号密码异常,请联系客服...");
 		}
+		if (renewalView.getGoodsId() == 33l && renewalView.getAccount().contains(CUI_QIU_EMAIL_SUFFIX)) {
+			return cuiQiuMailService.getVerifyCode(renewalView.getAccount());
+		}
 		//获取邮箱密码
 		SysEmail sysEmail = sysEmailMapper.selectOne(Wrappers.lambdaQuery(SysEmail.class)
 				.eq(SysEmail::getEmail, account)
@@ -647,22 +655,11 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		if (goodsId == 33l) {
 			code = StrUtil.subWithLength(body, body.indexOf("ADOBE"), 215);
 		}
-		code = getVerifyCode(code);
+		code = StringUtil.getVerifyCodePattern(code);
 		if (!Validator.isNumber(code)) {
 			log.error("获取账号验证码失败:{}", StrUtil.subSufByLength(code, 512));
 			throw BusinessRuntimeException.getInstance("获取验证码失败,请重新获取..");
 		}
 		return code.trim();
 	}
-
-	public String getVerifyCode(String code) {
-		if (StrUtil.isNotEmpty(code)) {
-			Pattern pattern = Pattern.compile("\\d{4,}");
-			Matcher matcher = pattern.matcher(code);
-			while (matcher.find()) {
-				return matcher.group();
-			}
-		}
-		return StrUtil.EMPTY;
-	}
 }

+ 3 - 0
netflix-service/src/main/java/com/cyksj/service/shop/YhShopGoodsSkuService.java

@@ -13,4 +13,7 @@ public interface YhShopGoodsSkuService extends IService<YhShopGoodsSku> {
     void saveGoods(List<Long> goodsIds, Long userId);
 
 
+	String yhShopSkuSysStatusDownInfo(long userId);
+
+	void deleteSkuDownInfo(long userId);
 }

+ 23 - 0
netflix-service/src/main/java/com/cyksj/service/shop/impl/YhShopGoodsSkuServiceImpl.java

@@ -6,8 +6,10 @@ import com.cyksj.common.exception.BusinessRuntimeException;
 import com.cyksj.mapper.GoodsDonSkuMapper;
 import com.cyksj.mapper.shop.YhShopGoodsSkuMapper;
 import com.cyksj.mapper.shop.YhShopMapper;
+import com.cyksj.mapper.shop.YhShopSkuSysTakeDownRecordMapper;
 import com.cyksj.model.entity.YhShop;
 import com.cyksj.model.entity.YhShopGoodsSku;
+import com.cyksj.model.entity.YhShopSkuSysTakeDownRecord;
 import com.cyksj.service.shop.YhShopGoodsSkuService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
@@ -25,6 +27,8 @@ public class YhShopGoodsSkuServiceImpl extends ServiceImpl<YhShopGoodsSkuMapper,
     private final GoodsDonSkuMapper goodsDonSkuMapper;
 
     private final YhShopMapper yhShopMapper;
+
+    private final YhShopSkuSysTakeDownRecordMapper yhShopSkuSysTakeDownRecordMapper;
     @Override
     public void saveGoods(List<Long> goodsIds, Long userId) {
         YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
@@ -39,4 +43,23 @@ public class YhShopGoodsSkuServiceImpl extends ServiceImpl<YhShopGoodsSkuMapper,
         });
         this.saveOrUpdateBatch(skuShops);
     }
+
+    @Override
+    public String yhShopSkuSysStatusDownInfo(long userId) {
+        String info = yhShopMapper.getYhShopSkuSysStatusDownInfo(userId);
+        return info;
+    }
+
+    @Override
+    public void deleteSkuDownInfo(long userId) {
+        Integer selectCount = yhShopSkuSysTakeDownRecordMapper.selectCount(Wrappers.lambdaQuery(YhShopSkuSysTakeDownRecord.class)
+                .eq(YhShopSkuSysTakeDownRecord::getUserId, userId)
+                .eq(YhShopSkuSysTakeDownRecord::getDeleted, 1));
+        if (selectCount > 0) {
+            yhShopSkuSysTakeDownRecordMapper.update(null, Wrappers.lambdaUpdate(YhShopSkuSysTakeDownRecord.class)
+                    .set(YhShopSkuSysTakeDownRecord::getDeleted, 0)
+                    .eq(YhShopSkuSysTakeDownRecord::getUserId, userId)
+                    .eq(YhShopSkuSysTakeDownRecord::getDeleted, 1));
+        }
+    }
 }

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/template/impl/TemplateCommonServiceImpl.java

@@ -239,7 +239,7 @@ public class TemplateCommonServiceImpl implements TemplateCommonService {
 				return;
 			}
 			if (relation.getUserId() != 0 && relation.getYhsId() == 0 && isPrd) {
-				String msg = String.format(Constant.CHANGE_GROUPS_TRIPS_ACCOUNT, title);
+				String msg = String.format(Constant.CHANGE_GROUPS_TRIPS_ACCOUNT, title, account.getAccount());
 				smsService.sendSmsToRelationUser(relation.getUserId(), msg);
 			}
 		}

+ 7 - 0
netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java

@@ -18,6 +18,7 @@ import com.cyksj.enums.GatewayResponse;
 import com.cyksj.mapper.GoodsDonSkuMapper;
 import com.cyksj.mapper.OrderDonMapper;
 import com.cyksj.mapper.RegisterOrderDonMapper;
+import com.cyksj.mapper.shop.YhShopGoodsSkuMapper;
 import com.cyksj.mapper.sys.SysConfigMapper;
 import com.cyksj.model.entity.*;
 import com.cyksj.model.request.ClickRecordReq;
@@ -67,6 +68,8 @@ public class GoodsDonController {
 
     private final GoodsDonSkuMapper goodsDonSkuMapper;
 
+    private final YhShopGoodsSkuMapper yhShopGoodsSkuMapper;
+
     private final RedisService redisService;
 
     private final SysConfigMapper sysConfigMapper;
@@ -1045,6 +1048,10 @@ public class GoodsDonController {
 						.eq(OrderDon::getGoodsId, data.getId()).notIn(OrderDon::getStatus, Constant.noOrderStatus));
 				data.setSold(sold + data.getSold());
 				data.setNotifyMsg(getPayMsgTime(data.getId(), now, 1, yhsId));
+				//重新设置最低价格规格
+				YhShopGoodsSku sku = yhShopGoodsSkuMapper.selectMinPriceSkuByYhsId(yhsId, data.getId());
+				data.setPrice(sku.getPrice());
+				data.setSkuId(sku.getSkuId());
 			});
 			redisService.setNx(categoryGoodsKey, list, RedisService.key.YH_HOME_PAGHE_CACHE.getTimeout() + 5 * 60);
 			value = redisService.get(categoryGoodsKey);

+ 2 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsAccountController.java

@@ -640,6 +640,7 @@ public class CmsAccountController {
 							.eq(UserTicketClearedRecord::getAccountId, account.getId()));
 					//发放模板消息
 					try {
+						account.setAccount(db.getAccount());
 						templateCommonService.sendAccountTemplateMsg(account);
 					} catch (Exception e) {
 						log.error("发送账号{}修改密码消息模板错误", account.getId());
@@ -885,6 +886,7 @@ public class CmsAccountController {
 		if (isFlag) {
 			boolean b = accountService.updateById(db);
 			if (StrUtil.isNotBlank(newPwd) && !dnPwd.equals(newPwd) && b) {
+				account.setAccount(db.getAccount());
 				templateCommonService.sendAccountTemplateMsg(account);
 			}
 		}

+ 11 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/CmsGoodsDonSkuController.java

@@ -107,6 +107,9 @@ public class CmsGoodsDonSkuController {
     @PutMapping(value = "/update")
     @Log(module = "平台管理/编辑规格", businessType = BusinessType.PUT, isSaveRequestData = true)
     public Result<String> skuUpdate(@RequestBody GoodsDonSku sku) throws Exception {
+        Long skuId = sku.getId();
+        GoodsDonSku dbSku = goodsDonSkuService.getById(skuId);
+        Assert.notNull(dbSku, "规格不存在");
         Long goodsId = sku.getGoodsId();
         GoodsDon goods = goodsDonService.getById(goodsId);
         if (goods.getType() == 1) {
@@ -162,6 +165,14 @@ public class CmsGoodsDonSkuController {
         goodsDonSkuService.saveOrUpdate(sku);
         //给平台更新额外属性
         goodsDonService.updateGoodsSkuPrice(sku.getGoodsId(), null);
+        //前后两次价格不同 下架店铺低于这个折扣最低价格
+        BigDecimal oldPrice = dbSku.getPrice();
+        BigDecimal newPrice = sku.getPrice();
+        //规格新价 变高
+        if (newPrice.compareTo(oldPrice) > 0) {
+            //下架店铺低于这个规格价格的品
+            goodsDonSkuService.setBelowPriceShopSkuDown(skuId, newPrice);
+        }
         refreshCacheService.refreshYhHomePageCache();
         return GatewayResponse.SUCCESS.newBuilder().toResult();
     }

+ 27 - 10
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/YhShopGoodsController.java

@@ -11,6 +11,7 @@ import com.cyksj.model.views.YhShopAvailableGoodsView;
 import com.cyksj.model.views.YhShopGoodsRateView;
 import com.cyksj.model.views.YhShopGoodsView;
 import com.cyksj.redis.RedisService;
+import com.cyksj.service.mange.RefreshCacheService;
 import com.cyksj.service.shop.YhShopGoodsSkuService;
 import com.cyksj.web.util.StpYhShopManageUser;
 import com.ejlchina.searcher.BeanSearcher;
@@ -22,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.List;
-import java.util.Set;
 
 /*
  *项目名: yhlxj
@@ -45,6 +45,8 @@ public class YhShopGoodsController {
 
 	private final HttpServletRequest request;
 
+	private final RefreshCacheService refreshCacheService;
+
 	/**
 	 * 新增平台
 	 */
@@ -72,9 +74,7 @@ public class YhShopGoodsController {
 			sku.setYhsId(yhShop.getId());
 		});
 		yhShopGoodsSkuService.saveOrUpdateBatch(goodsSkus);
-		String yhShopCacheKey = RedisService.key.YH_HOME_PAGHE_CACHE_SHOP.getEnvName() + yhShop.getId() + "*";
-		Set<String> keys = redisService.keys(yhShopCacheKey);
-		redisService.del(keys.toArray(String[]::new));
+		refreshCacheService.refreshShopUserIdCacheByYshId(yhShop.getId());
 		return GatewayResponse.SUCCESS.newBuilder().toResult();
 	}
 
@@ -87,9 +87,7 @@ public class YhShopGoodsController {
 		YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
 				.eq(YhShop::getUserId, userId).last("limit 1"));
 		yhShopGoodsSkuService.update(Wrappers.lambdaUpdate(YhShopGoodsSku.class).eq(YhShopGoodsSku::getGoodsId, goodsId).eq(YhShopGoodsSku::getDeleted, true).eq(YhShopGoodsSku::getUserId, userId).set(YhShopGoodsSku::getStatus, status));
-		String yhShopCacheKey = RedisService.key.YH_HOME_PAGHE_CACHE_SHOP.getEnvName() + yhShop.getId() + "*";
-		Set<String> keys = redisService.keys(yhShopCacheKey);
-		redisService.del(keys.toArray(String[]::new));
+		refreshCacheService.refreshShopUserIdCacheByYshId(yhShop.getId());
 		return GatewayResponse.SUCCESS.newBuilder().toResult();
 	}
 
@@ -103,9 +101,7 @@ public class YhShopGoodsController {
 		YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
 				.eq(YhShop::getUserId, userId).last("limit 1"));
 		yhShopGoodsSkuService.update(Wrappers.lambdaUpdate(YhShopGoodsSku.class).eq(YhShopGoodsSku::getGoodsId, goodsId).eq(YhShopGoodsSku::getUserId, userId).set(YhShopGoodsSku::getDeleted, false));
-		String yhShopCacheKey = RedisService.key.YH_HOME_PAGHE_CACHE_SHOP.getEnvName() + yhShop.getId() + "*";
-		Set<String> keys = redisService.keys(yhShopCacheKey);
-		redisService.del(keys.toArray(String[]::new));
+		refreshCacheService.refreshShopUserIdCacheByYshId(yhShop.getId());
 		return GatewayResponse.SUCCESS.newBuilder().toResult();
 	}
 
@@ -142,4 +138,25 @@ public class YhShopGoodsController {
 				.field(YhShopGoodsView.YhShopGoodsSkuView::getGoodsId, goodsId).build());
 		return GatewayResponse.SUCCESS.newBuilder().toResult(views);
 	}
+
+	/**
+	 * 小店规格被下架提示
+	 * @return
+	 */
+	@GetMapping("/get/sku/down/info")
+	public Result<String> yhShopSkuSysStatusDownInfo() {
+		long userId = StpYhShopManageUser.getLoginIdAsLong();
+		String info = yhShopGoodsSkuService.yhShopSkuSysStatusDownInfo(userId);
+		return GatewayResponse.SUCCESS.newBuilder().toResult(info);
+	}
+
+	/**
+	 * 删除提示
+	 */
+	@DeleteMapping("/delete/sku/down/info")
+	public Result<String> deleteSkuDownInfo() {
+		long userId = StpYhShopManageUser.getLoginIdAsLong();
+		yhShopGoodsSkuService.deleteSkuDownInfo(userId);
+		return GatewayResponse.SUCCESS.newBuilder().toResult();
+	}
 }

+ 9 - 0
netflix-web/src/main/java/com/cyksj/web/controller/mirror/MirrorController.java

@@ -28,6 +28,8 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.time.LocalDateTime;
 import java.util.Set;
 
@@ -187,6 +189,13 @@ public class MirrorController {
             throw BusinessRuntimeException.getInstance("您还未购买车票");
         }
         Set<ChatgptCarInfoView> carInfoList = chatGptAccountService.getCarInfoList(carChatGptUser.getUserToken(),10, isPlus);
+        for (ChatgptCarInfoView chatgptCarInfoView : carInfoList) {
+            Double score = BigDecimal.valueOf(chatgptCarInfoView.getScore()).multiply(BigDecimal.valueOf(0.5)).setScale(0, RoundingMode.DOWN).doubleValue();
+            chatgptCarInfoView.setScore(score);
+            if (!"停运".equals(chatgptCarInfoView.getStatus())) {
+                chatgptCarInfoView.setStatus(score >= 50 ? "繁忙" : "空闲");
+            }
+        }
         return GatewayResponse.SUCCESS.newBuilder().toResult(carInfoList);
     }