Antiloveg 8 years ago
parent
commit
b282a17bf8

+ 1 - 1
src/main/java/com/goafanti/user/service/UserInterestService.java

@@ -8,7 +8,7 @@ public interface UserInterestService {
 
 	UserInterest findByFromUidAndToUid(String fromUid, String toUid);
 
-	int insert(String uid);
+	String insert(String uid);
 
 	UserInterest findByPrimaryKey(String id);
 

+ 3 - 2
src/main/java/com/goafanti/user/service/impl/UserInterestServiceImpl.java

@@ -26,7 +26,7 @@ public class UserInterestServiceImpl extends BaseMybatisDao<UserInterestMapper>
 	}
 
 	@Override
-	public int insert(String toUid) {
+	public String insert(String toUid) {
 		UserInterest ui = new UserInterest();
 		ui.setId(UUID.randomUUID().toString());
 		ui.setFromUid(TokenManager.getUserId());
@@ -34,7 +34,8 @@ public class UserInterestServiceImpl extends BaseMybatisDao<UserInterestMapper>
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
 		ui.setCreateTime(now.getTime());
-		return userInterestMapper.insert(ui);
+		userInterestMapper.insert(ui);
+		return ui.getId();
 	}
 
 	@Override