|
@@ -124,11 +124,11 @@ public class LifeUserService extends ServiceImpl<LifeUserMapper, LifeUser> {
|
|
|
lambdaQueryWrapper.eq(LifeFans::getFollowedId, fans.getFollowedId())
|
|
lambdaQueryWrapper.eq(LifeFans::getFollowedId, fans.getFollowedId())
|
|
|
.eq(LifeFans::getFansId, fans.getFansId())
|
|
.eq(LifeFans::getFansId, fans.getFansId())
|
|
|
.eq(LifeFans::getDeleteFlag, 0);
|
|
.eq(LifeFans::getDeleteFlag, 0);
|
|
|
- int num = lifeFansMapper.selectCount(lambdaQueryWrapper);
|
|
|
|
|
- if (num != 0) {
|
|
|
|
|
- return 1;
|
|
|
|
|
|
|
+ int number = lifeFansMapper.selectCount(lambdaQueryWrapper);
|
|
|
|
|
+ if (number >= 1) {
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
- lifeFansMapper.insert(fans);
|
|
|
|
|
|
|
+ int num = lifeFansMapper.insert(fans);
|
|
|
|
|
|
|
|
if (num == 1) {
|
|
if (num == 1) {
|
|
|
LifeNotice notice = new LifeNotice();
|
|
LifeNotice notice = new LifeNotice();
|