|
@@ -77,4 +77,13 @@ public class FavorServiceImpl implements FavorService {
|
|
|
public Favor findById(Long id) {
|
|
|
return favorMapper.findById(id);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean deleteById(Long id) {
|
|
|
+ int i = favorMapper.deleteById(id);
|
|
|
+ if (i>0) {
|
|
|
+ favorItemMapper.deleteByFavorId(id);
|
|
|
+ }
|
|
|
+ return i>0;
|
|
|
+ }
|
|
|
}
|