|
|
@@ -15,11 +15,13 @@ import com.goafanti.achievement.service.AchievementInterestService;
|
|
|
import com.goafanti.common.dao.AchievementInterestMapper;
|
|
|
import com.goafanti.common.dao.DemandInterestMapper;
|
|
|
import com.goafanti.common.dao.NewsInterestMapper;
|
|
|
+import com.goafanti.common.dao.ProjectInterestMapper;
|
|
|
import com.goafanti.common.dao.UserInterestMapper;
|
|
|
import com.goafanti.common.enums.InterestType;
|
|
|
import com.goafanti.common.model.AchievementInterest;
|
|
|
import com.goafanti.common.model.DemandInterest;
|
|
|
import com.goafanti.common.model.NewsInterest;
|
|
|
+import com.goafanti.common.model.ProjectInterest;
|
|
|
import com.goafanti.common.model.User;
|
|
|
import com.goafanti.common.model.UserInterest;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
@@ -41,6 +43,8 @@ public class AchievementInterestServiceImpl extends BaseMybatisDao<AchievementIn
|
|
|
private UserInterestMapper userInterestMapper;
|
|
|
@Autowired
|
|
|
private NewsInterestMapper newsInterestMapper;
|
|
|
+ @Autowired
|
|
|
+ private ProjectInterestMapper projectInterestMapper;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -123,6 +127,14 @@ public class AchievementInterestServiceImpl extends BaseMybatisDao<AchievementIn
|
|
|
a.setCreateTime(new Date());
|
|
|
i= achievementInterestMapper.insert(a);
|
|
|
}
|
|
|
+ if (type==InterestType.PROJECT.getCode()) {
|
|
|
+ ProjectInterest p=new ProjectInterest();
|
|
|
+ p.setId(UUID.randomUUID().toString());
|
|
|
+ p.setUid(uid);
|
|
|
+ p.setProjectId(objectId);
|
|
|
+ p.setCreateTime(new Date());
|
|
|
+ i=projectInterestMapper.insert(p);
|
|
|
+ }
|
|
|
if (i==1) {
|
|
|
return "关注成功";
|
|
|
}
|
|
|
@@ -148,6 +160,9 @@ public class AchievementInterestServiceImpl extends BaseMybatisDao<AchievementIn
|
|
|
if (type==InterestType.ACHIEVEMENT.getCode()) {
|
|
|
i=achievementInterestMapper.deleteInterest(uid,objectId);
|
|
|
}
|
|
|
+ if (type==InterestType.PROJECT.getCode()) {
|
|
|
+ i=projectInterestMapper.deleteInterest(uid,objectId);
|
|
|
+ }
|
|
|
if (i==1) {
|
|
|
return "取消关注成功";
|
|
|
}
|