Selaa lähdekoodia

Merge remote-tracking branch 'origin/test_dev' into test_dev

caojp 1 päivä sitten
vanhempi
commit
dfac66b82b

+ 2 - 1
LiangZhiYUMao/pages/activities/detail.vue

@@ -150,7 +150,7 @@
 				
 				// 如果是相对路径,添加协议和域名
 				if (cleanedUrl.startsWith('/')) {
-					return `http://115.190.125.125:9000${cleanedUrl}`
+					return `https://api.zhongruanke.cn/minio/${cleanedUrl}`
 				}
 				
 				// 如果已经是完整URL,直接返回
@@ -387,6 +387,7 @@
 		padding: 0 20rpx;
 		background-color: #E91E63;
 		z-index: 999;
+		padding-top: 40px;
 
 		.navbar-left,
 		.navbar-right {

+ 5 - 34
LiangZhiYUMao/pages/index/index.vue

@@ -702,14 +702,7 @@ async loadFunctionGridData() {
 
 			// 跳转到VIP页面
 			goToVip() {
-				const status = uni.getStorageSync("userInfo").status
-					if(status != 1){
-						uni.showToast({
-							title: '您的账户违反规定已被禁用',
-							icon: 'none'
-						})
-						return
-					}
+				
 				uni.navigateTo({
 					url: '/pages/vip/index'
 				})
@@ -717,14 +710,6 @@ async loadFunctionGridData() {
 
 			// 跳转到活动列表
 			goToActivityList() {
-				const status = uni.getStorageSync("userInfo").status
-				if(status != 1){
-					uni.showToast({
-						title: '您的账户违反规定已被禁用',
-						icon: 'none'
-					})
-					return
-				}
 				uni.navigateTo({
 					url: '/pages/activities/list'
 				})
@@ -732,14 +717,7 @@ async loadFunctionGridData() {
 
 			// 处理活动点击
 			handleActivityClick(activity) {
-				const status = uni.getStorageSync("userInfo").status
-				if(status != 1){
-					uni.showToast({
-						title: '您的账户违反规定已被禁用',
-						icon: 'none'
-					})
-					return
-				}
+				
 				uni.navigateTo({
 					url: `/pages/activities/detail?id=${activity.id}`
 				})
@@ -747,14 +725,7 @@ async loadFunctionGridData() {
 
 			// 跳转到成功案例列表
 			goToSuccessCaseList() {
-				const status = uni.getStorageSync("userInfo").status
-				if(status != 1){
-					uni.showToast({
-						title: '您的账户违反规定已被禁用',
-						icon: 'none'
-					})
-					return
-				}
+				
 				uni.navigateTo({
 					url: '/pages/success-case/list'
 				})
@@ -839,9 +810,9 @@ async loadFunctionGridData() {
 				if (cleanedUrl.startsWith('/')) {
 					// 检查是否是完整的服务器路径
 					if (cleanedUrl.startsWith('/banners/') || cleanedUrl.startsWith('/activities/') || cleanedUrl.startsWith('/images/')) {
-						return `http://115.190.125.125:9000${cleanedUrl}`
+						return `https://api.zhongruanke.cn/minio/${cleanedUrl}`
 					}
-					return `http://115.190.125.125:9000${cleanedUrl}`
+					return `https://api.zhongruanke.cn/minio/${cleanedUrl}`
 				}
 				
 				// 如果已经是完整URL,直接返回

+ 1 - 1
LiangZhiYUMao/pages/matchmaker-workbench/index.vue

@@ -5,7 +5,6 @@
     <view class="header">
       <text class="header-title">红娘工作台</text>
       <view class="header-right">
-        <view class="search-icon" @click="handleSearch"></view>
         <!-- 返回用户端按钮 - 修改为与"前往红娘工作台"一致的样式 -->
         <view class="back-to-user-btn" @click="openExitPopup">
           <text class="btn-text">返回用户端</text>
@@ -419,6 +418,7 @@ export default {
       justify-content: center;
       box-shadow: 0 4rpx 12rpx rgba(255, 107, 138, 0.3);
       transition: all 0.3s ease;
+	  margin-right: 80px;
 
       &:active {
         transform: scale(0.95);

+ 2 - 2
LiangZhiYUMao/pages/matchmaker-workbench/mine.vue

@@ -313,8 +313,8 @@ export default {
           const nextLevel = currentLevel < 5 ? currentLevel + 1 : 5
           const nextLevelName = levelNames[nextLevel]
           const defaultAvatars = {
-            male: 'http://115.190.125.125:9000/dynamic-comments/dynamics/5c645152-9940-41d3-83a9-69ee6e0c0aaa.png',
-            female: 'http://115.190.125.125:9000/dynamic-comments/dynamics/c7fb04d7-ee4d-4b3d-bcef-f246da9c841f.png'
+            male: 'https://api.zhongruanke.cn/minio//dynamic-comments/dynamics/5c645152-9940-41d3-83a9-69ee6e0c0aaa.png',
+            female: 'https://api.zhongruanke.cn/minio//dynamic-comments/dynamics/c7fb04d7-ee4d-4b3d-bcef-f246da9c841f.png'
           }
           const avatarUrl = matchmakerInfo.avatarUrl || matchmakerInfo.avatar_url || (matchmakerInfo.gender === 1 ? defaultAvatars.male : defaultAvatars.female)
          

+ 3 - 4
LiangZhiYUMao/pages/page3/page3.vue

@@ -1,13 +1,12 @@
 <template>
   <view class="content">
-    <!-- 背景图片 http://115.190.125.125:9000/static-images/login-bg.png-->
+    
     <image class="bg-image" src="https://api.zhongruanke.cn/minio/static-images/login-bg.png" mode="aspectFill"></image>
 
 
     <!-- 顶部标题区域 -->
     <view class="header-section">
-      <!-- <view class="app-logo">🪶🪶</view> -->
-	  <!-- http://115.190.125.125:9000/static-images/logo.png -->
+    
       <image class="app-logo" src="https://api.zhongruanke.cn/minio/static-images/logo.png" mode="widthFix"></image>
       <!-- <view class="app-name">青鸾之恋</view> -->
       <view class="app-slogan">真诚相遇 · 携手一生</view>
@@ -17,7 +16,7 @@
     <view class="login-box">
       <!-- 微信一键登录 -->
       <button class="wechat-login-btn" @click="login_zheshow">
-		  <!-- http://115.190.125.125:9000/static-images/wechat-icon.png -->
+		 
         <image class="wechat-icon" src="https://api.zhongruanke.cn/minio/static-images/wechat-icon.png" mode="aspectFit"></image>
         <text>微信一键登录</text>
       </button>

+ 4 - 3
LiangZhiYUMao/pages/plaza/detail.vue

@@ -13,9 +13,7 @@
 				<text class="main-title">💕 爱的故事</text>
 				<text class="sub-title">两只羽毛的浪漫时光</text>
 			</view>
-			<view class="navbar-right" @click="showMoreMenu">
-				<text class="more-icon">⋯</text>
-			</view>
+			
 		</view>
 		
 		<!-- 内容区域 -->
@@ -38,6 +36,9 @@
 						<text class="nickname">{{ getNickname(dynamic) }}</text>
 						<text class="time">{{ formatTime(dynamic.createdAt) }}</text>
 					</view>
+					<view class="navbar-right" @click="showMoreMenu">
+						<text class="more-icon">⋯</text>
+					</view>
 				</view>
 				
 				<!-- 动态内容 -->

+ 8 - 1
LiangZhiYUMao/pages/profile/index.vue

@@ -24,7 +24,6 @@
 				</view>
 			</view>
 			<text class="nickname">{{ profile.realName || profile.nickname || '未设置' }}</text>
-			<text class="user-id">ID: {{ profile.userId || '未知' }}</text>
 		</view>
 		
 		<!-- 编辑提示 -->
@@ -37,6 +36,13 @@
 			<view class="section">
 				<view class="section-title">个人信息</view>
 				
+				<view class="info-item" :class="{ editing: isEditing }" @click="startEdit">
+					<text class="label">昵称</text>
+					<input v-if="isEditing" class="input" v-model="profile.nickname" placeholder="请输入昵称" />
+					<text v-else class="value">{{ profile.nickname || '未设置' }}</text>
+				</view>
+				
+				
 				<view class="info-item" :class="{ editing: isEditing }" @click="startEdit">
 					<text class="label">真实姓名</text>
 					<input v-if="isEditing" class="input" v-model="profile.realName" placeholder="请输入真实姓名" />
@@ -1304,6 +1310,7 @@
 				// 准备提交的数据(只包含扩展信息字段)
 				const submitData = {
 					userId: this.currentUserId,
+					nickname: this.profile.nickname,
 					realName: this.profile.realName,
 					idCard: this.profile.idCard,
 					height: this.profile.height,

+ 4 - 2
LiangZhiYUMao/pages/success-case/list.vue

@@ -211,6 +211,7 @@
 		min-height: 100vh;
 		background-color: #FFF9F9;
 		padding-top: 90rpx;
+		margin-top: 40px;
 	}
 
 	/* 自定义导航栏 */
@@ -219,17 +220,18 @@
 		top: 0;
 		left: 0;
 		right: 0;
-		height: 90rpx;
+		height: 110rpx;
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
 		padding: 0 20rpx;
+		padding-top: 30px;
 		background-color: #E91E63;
 		z-index: 999;
 
 		.navbar-left,
 		.navbar-right {
-			width: 80rpx;
+			width: 100rpx;
 		}
 
 		.back-icon {

+ 34 - 39
LiangZhiYUMao/pages/today-recommend/index.vue

@@ -27,10 +27,6 @@
 								<text class="user-detail" v-if="user.location && user.location !== '未填写'">{{ user.location }}</text>
 							</view>
 						</view>
-						<view class="online-status" :class="{ online: user.isOnline }">
-							<text class="status-dot"></text>
-							<text class="status-text">{{ user.isOnline ? '在线' : '离线' }}</text>
-						</view>
 					</view>
 
 					<view class="card-content">
@@ -64,10 +60,10 @@
 					</view>
 
 					<view class="card-actions">
-						<view class="action-btn pass-btn" @click="handlePass(user, index)">
-							<text class="action-icon">👎</text>
-							<text class="action-text">不感兴趣</text>
-						</view>
+<!--						<view class="action-btn pass-btn" @click="handlePass(user, index)">-->
+<!--							<text class="action-icon">👎</text>-->
+<!--							<text class="action-text">不感兴趣</text>-->
+<!--						</view>-->
 						<view class="action-btn like-btn" @click="handleLike(user, index)">
 							<text class="action-icon">❤️</text>
 							<text class="action-text">喜欢</text>
@@ -200,8 +196,7 @@
 					hobbies: this.parseHobbies(u.hobby),
 					introduction: u.introduction || u.selfIntro || '',
 					isVip: u.isVip || false,
-					isOnline: u.isOnline || false,
-					compatibilityScore: u.compatibilityScore || 0
+          compatibilityScore: u.compatibilityScore || 0
 				}
 			},
 
@@ -260,7 +255,7 @@
 				const i = c.indexOf('http')
 				if (i > 0) c = c.slice(i)
 				if (!c) return DEFAULT_IMAGES.avatar
-				if (c.startsWith('/')) return `http://115.190.125.125:9000${c}`
+				if (c.startsWith('/')) return `https://api.zhongruanke.cn/minio/${c}`
 				if (c.startsWith('http://') || c.startsWith('https://')) return c
 				return DEFAULT_IMAGES.avatar
 			},
@@ -272,34 +267,34 @@
 			},
 
 			// 处理不感兴趣
-			async handlePass(user, index) {
-				uni.showModal({
-					title: '确认操作',
-					content: `确定对${user.nickname}不感兴趣吗?`,
-					success: async (res) => {
-						if (res.confirm) {
-							try {
-								await api.recommend.feedback({
-									userId: this.currentUserId,
-									targetUserId: user.userId || user.id,
-									type: 'dislike'
-								})
-								uni.showToast({
-									title: '已记录您的偏好',
-									icon: 'success'
-								})
-								this.recommendUsers.splice(index, 1)
-							} catch (e) {
-								console.error('失败:', e)
-								uni.showToast({
-									title: '操作失败,请重试',
-									icon: 'none'
-								})
-							}
-						}
-					}
-				})
-			},
+			// async handlePass(user, index) {
+			// 	uni.showModal({
+			// 		title: '确认操作',
+			// 		content: `确定对${user.nickname}不感兴趣吗?`,
+			// 		success: async (res) => {
+			// 			if (res.confirm) {
+			// 				try {
+			// 					await api.recommend.feedback({
+			// 						userId: this.currentUserId,
+			// 						targetUserId: user.userId || user.id,
+			// 						type: 'dislike'
+			// 					})
+			// 					uni.showToast({
+			// 						title: '已记录您的偏好',
+			// 						icon: 'success'
+			// 					})
+			// 					this.recommendUsers.splice(index, 1)
+			// 				} catch (e) {
+			// 					console.error('失败:', e)
+			// 					uni.showToast({
+			// 						title: '操作失败,请重试',
+			// 						icon: 'none'
+			// 					})
+			// 				}
+			// 			}
+			// 		}
+			// 	})
+			// },
 
 			// 处理喜欢
 			async handleLike(user, index) {

+ 2 - 2
LiangZhiYUMao/subpkg-message/chat/chat.vue

@@ -128,7 +128,7 @@
                 <view class="voice-icon-wrapper" :class="{playing: playingVoiceId === msg.messageId}">
                   <image 
                     class="voice-icon" 
-                    :src="msg.fromUserId === userId ? 'http://115.190.125.125:9000/static-images/%E6%88%91%E6%96%B9%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF' : 'http://115.190.125.125:9000/static-images/%E5%AF%B9%E6%96%B9%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF'" 
+                    :src="msg.fromUserId === userId ? 'https://api.zhongruanke.cn/minio//static-images/%E6%88%91%E6%96%B9%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF' : 'http://115.190.125.125:9000/static-images/%E5%AF%B9%E6%96%B9%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF'" 
                     mode="aspectFit"></image>
                 </view>
                 <!-- 暂停后的继续播放按钮 -->
@@ -180,7 +180,7 @@
         <image 
           v-if="inputType === 'text'"
           class="icon-image"
-          src="http://115.190.125.125:9000/static-images/%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF%E6%8C%89%E9%92%AE"
+          src="https://api.zhongruanke.cn/minio//static-images/%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF%E6%8C%89%E9%92%AE"
           mode="aspectFit" />
         <text v-else>⌨️</text>
       </view>

+ 2 - 0
service/Essential/src/main/java/com/zhentao/entity/UserProfile.java

@@ -57,6 +57,8 @@ public class UserProfile implements Serializable {
     private Integer privacyPhone;
     private Integer authenticityScore;
     private Integer gender;
+    @TableField(exist = false)
+    private String nickname;
     
     @TableField(exist = false)
     private LocalDateTime createTime;

+ 12 - 1
service/Essential/src/main/java/com/zhentao/service/impl/UserProfileServiceImpl.java

@@ -8,11 +8,11 @@ import com.zhentao.mapper.UserMapper;
 import com.zhentao.mapper.UserProfileMapper;
 import com.zhentao.mapper.UserVipMapper;
 import com.zhentao.service.UserProfileService;
+import com.zhentao.service.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.Period;
@@ -35,6 +35,9 @@ public class UserProfileServiceImpl implements UserProfileService {
     
     @Autowired
     private UserVipMapper userVipMapper;
+
+    @Autowired
+    private UserService userService;
     
     @Override
     public Map<String, Object> getUserProfile(Long userId) {
@@ -201,6 +204,10 @@ public class UserProfileServiceImpl implements UserProfileService {
             userProfile.setAuthenticityScore(score);
             
             result = userProfileMapper.insert(userProfile);
+            UpdateWrapper updateWrapper = new UpdateWrapper();
+            updateWrapper.set("nickname",userProfile.getNickname());
+            updateWrapper.eq("user_id",userProfile.getUserId());
+            userMapper.update(null,updateWrapper);
             System.out.println("新增用户扩展信息 - 用户ID: " + userProfile.getUserId() + ", 初始评分: " + score);
         } else {
             // 存在则更新 - 创建完整的更新对象
@@ -286,6 +293,10 @@ public class UserProfileServiceImpl implements UserProfileService {
             
             // 然后使用updateById更新其他字段(会自动忽略null值,但我们已经用UpdateWrapper更新了省市区)
             result = userProfileMapper.updateById(userProfile);
+            UpdateWrapper updateWrapper2 = new UpdateWrapper();
+            updateWrapper2.set("nickname",userProfile.getNickname());
+            updateWrapper2.eq("user_id",userProfile.getUserId());
+            userMapper.update(null,updateWrapper2);
             System.out.println("✅ 更新user_profile表 - 用户ID: " + userProfile.getUserId() + ", 更新后评分: " + score + ", 影响行数: " + result);
         }
         

+ 0 - 6
service/Recommend/src/main/java/com/zhentao/mapper/RecommendMapper.java

@@ -55,15 +55,9 @@ public interface RecommendMapper {
     // 统计喜欢当前用户的用户数量
     Integer countUsersWhoLikedMe(@Param("userId") Integer userId);
     
-    // 查询用户浏览记录
-    com.zhentao.pojo.UserLook selectUserLook(@Param("userId") Integer userId, @Param("lookUserId") Integer lookUserId);
-    
     // 插入用户浏览记录
     int insertUserLook(@Param("userId") Integer userId, @Param("lookUserId") Integer lookUserId);
     
-    // 更新用户浏览记录的update_time
-    int updateUserLookTime(@Param("userId") Integer userId, @Param("lookUserId") Integer lookUserId);
-    
     // 查询用户浏览的列表
     List<RecommendUserVO> selectLookedUsers(@Param("userId") Integer userId, @Param("offset") Integer offset, @Param("limit") Integer limit);
     

+ 16 - 13
service/Recommend/src/main/java/com/zhentao/service/impl/RecommendServiceImpl.java

@@ -123,12 +123,18 @@ public class RecommendServiceImpl implements RecommendService {
             } catch (Exception ignore) {}
         }
 
-        // 过滤用户的"不喜欢"集合,避免再次出现
+        // 过滤用户的"不喜欢"集合和"已喜欢"集合,避免再次出现
         try {
+            // 过滤不喜欢的用户
             java.util.Set<String> disliked = stringRedisTemplate.opsForSet().members("rec:dislike:user:" + userId);
             if (disliked != null && !disliked.isEmpty()) {
                 pool.removeIf(u -> u.getUserId() != null && disliked.contains(String.valueOf(u.getUserId())));
             }
+            // 过滤已喜欢的用户
+            java.util.Set<String> liked = stringRedisTemplate.opsForSet().members("rec:like:user:" + userId);
+            if (liked != null && !liked.isEmpty()) {
+                pool.removeIf(u -> u.getUserId() != null && liked.contains(String.valueOf(u.getUserId())));
+            }
         } catch (Exception ignore) {}
         
         // 再次过滤:确保不包含当前用户本身和未完善性别信息的用户,以及同性用户
@@ -275,13 +281,19 @@ public class RecommendServiceImpl implements RecommendService {
             try { hobbyJson = objectMapper.writeValueAsString(q.getHobbyTags()); } catch (Exception ignore) {}
         }
 
-        // 读取不喜欢集合,作为排除列表
+        // 读取不喜欢集合和已喜欢集合,作为排除列表
         java.util.List<Integer> excludeIds = new java.util.ArrayList<>();
         try {
+            // 添加不喜欢的用户到排除列表
             java.util.Set<String> disliked = stringRedisTemplate.opsForSet().members("rec:dislike:user:" + q.getUserId());
             if (disliked != null) {
                 for (String s : disliked) { try { excludeIds.add(Integer.parseInt(s)); } catch (Exception ignore) {} }
             }
+            // 添加已喜欢的用户到排除列表
+            java.util.Set<String> liked = stringRedisTemplate.opsForSet().members("rec:like:user:" + q.getUserId());
+            if (liked != null) {
+                for (String s : liked) { try { excludeIds.add(Integer.parseInt(s)); } catch (Exception ignore) {} }
+            }
         } catch (Exception ignore) {}
 
         // 获取当前用户的性别信息
@@ -534,17 +546,8 @@ public class RecommendServiceImpl implements RecommendService {
             throw new IllegalArgumentException("userId and lookUserId cannot be null");
         }
         try {
-            // 查询是否已经浏览过此用户
-            com.zhentao.pojo.UserLook existing = recommendMapper.selectUserLook(userId, lookUserId);
-            if (existing != null) {
-                // 如果存在,更新update_time字段
-                int result = recommendMapper.updateUserLookTime(userId, lookUserId);
-                return result > 0;
-            } else {
-                // 如果不存在,插入新记录
-                int result = recommendMapper.insertUserLook(userId, lookUserId);
-                return result > 0;
-            }
+            int result = recommendMapper.insertUserLook(userId, lookUserId);
+            return result > 0;
         } catch (Exception ex) {
             log.error("saveUserLook failed", ex);
             return false;

+ 0 - 18
service/Recommend/src/main/resources/mapper/RecommendMapper.xml

@@ -730,24 +730,6 @@
           AND u.status = 1
         ]]>
     </select>
-    
-    <!-- 查询用户浏览记录 -->
-    <select id="selectUserLook" resultType="com.zhentao.pojo.UserLook">
-        <![CDATA[
-        SELECT user_id, look_user_id, create_time, update_time 
-        FROM user_look 
-        WHERE user_id = #{userId} AND look_user_id = #{lookUserId}
-        ]]>
-    </select>
-    
-    <!-- 更新用户浏览记录的update_time -->
-    <update id="updateUserLookTime">
-        <![CDATA[
-        UPDATE user_look 
-        SET update_time = NOW() 
-        WHERE user_id = #{userId} AND look_user_id = #{lookUserId}
-        ]]>
-    </update>
 </mapper>