|
@@ -155,12 +155,11 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@Transactional
|
|
@Transactional
|
|
- public void insertPoTetherWithCollection(TetherVo tetherVo) {
|
|
+ public void insertPoTetherWithCollection(TetherVo tetherVo,PoTetherandcollection poTetherandcollection) {
|
|
|
|
|
|
this.poTetherMapper.insertPoTether(tetherVo);
|
|
this.poTetherMapper.insertPoTether(tetherVo);
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
System.out.println(tetherVo.getPoTetherandcollections().size());
|
|
System.out.println(tetherVo.getPoTetherandcollections().size());
|
|
for (int i = 0 ; i < tetherVo.getPoTetherandcollections().size();i++) {
|
|
for (int i = 0 ; i < tetherVo.getPoTetherandcollections().size();i++) {
|
|
System.out.println(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
|
|
System.out.println(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
|
|
@@ -198,16 +197,20 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
|
|
|
|
|
|
this.poTetherMapper.updatePoTether(tetherVo);
|
|
this.poTetherMapper.updatePoTether(tetherVo);
|
|
|
|
|
|
-
|
|
+ LambdaQueryWrapper<PoTetherandcollection> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
-
|
|
+ lambdaQueryWrapper.eq(PoTetherandcollection::getTetherId,tetherVo.getTetherId());
|
|
-
|
|
+ poTetherandcollectionService.remove(lambdaQueryWrapper);
|
|
|
|
|
|
-
|
|
+ for (int i = 0 ; i < tetherVo.getPoTetherandcollections().size();i++) {
|
|
-
|
|
+
|
|
-
|
|
+ System.out.println(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
|
|
-
|
|
+ PoTetherandcollection poTetherandcollection1 = new PoTetherandcollection();
|
|
-
|
|
+ poTetherandcollection1.setCollectionTitle(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
|
|
-
|
|
+ poTetherandcollection1.setCollectionType(tetherVo.getPoTetherandcollections().get(i).getCollectionType());
|
|
|
|
+ poTetherandcollection1.setTetherId(tetherVo.getTetherId());
|
|
|
|
+ poTetherandcollectionService.insertPoTetherandcollection(poTetherandcollection1);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|