Ver código fonte

fix ChatGPT直连平台不展示账号密码

zoujiajian 3 anos atrás
pai
commit
aeed1a814f

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/views/RenewalView.java

@@ -111,6 +111,9 @@ public class RenewalView {
     @DbField("if(a.api_secret='',false,true)")
     @DbField("if(a.api_secret='',false,true)")
     private Boolean isVerify;
     private Boolean isVerify;
 
 
+    @DbField("a.gpt_refresh_token")
+    private String gptRefreshToken;
+
     @DbField("gr.verify_code")
     @DbField("gr.verify_code")
     private String verifyCode;
     private String verifyCode;
 
 

+ 2 - 1
netflix-dao/src/main/resources/mapper/CouponUserMapper.xml

@@ -197,7 +197,8 @@
               from `coupon_user`
               from `coupon_user`
               where channel = #{channel}
               where channel = #{channel}
                 and user_id = #{userId}
                 and user_id = #{userId}
-                and valid_end_time > #{now} limit 1) cu
+                and valid_end_time > #{now}
+                 and status = 'unused' limit 1) cu
                  inner join coupon c on c.id = cu.coupon_id
                  inner join coupon c on c.id = cu.coupon_id
     </select>
     </select>
 </mapper>
 </mapper>

+ 7 - 0
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -69,6 +69,13 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 			if (ticket.getGoodsId() == 18 && ticket.getSkuNum() > 1) {
 			if (ticket.getGoodsId() == 18 && ticket.getSkuNum() > 1) {
 				ticket.setPassword(null);
 				ticket.setPassword(null);
 			}
 			}
+			//chatGPT直连
+			if (ticket.getGoodsId().equals(42l)) {
+				ticket.setAccount(null);
+				ticket.setPassword(null);
+			} else {
+				ticket.setGptRefreshToken(null);
+			}
 			if (ticket.getSecondType() == 1) {
 			if (ticket.getSecondType() == 1) {
 				ticket.setAccount(null);
 				ticket.setAccount(null);
 				ticket.setPassword(null);
 				ticket.setPassword(null);