|
@@ -67,7 +67,19 @@ public class TSetupService {
|
|
|
return model;
|
|
|
}
|
|
|
|
|
|
+ public TSetupModel updateTSetup(TSetupModel model){
|
|
|
+ TSetup tSetup = tSetupMapper.selectByPrimaryKey(model.getId());
|
|
|
+ BeanUtils.copyProperties(model,tSetup);
|
|
|
+ int i = tSetupMapper.updateByPrimaryKey(tSetup);
|
|
|
+ model.setPicList(tSetupPicService.findSetupPicsBySetupId(tSetup.getSetupId()));
|
|
|
+ return model;
|
|
|
+ }
|
|
|
|
|
|
+ public int deleteTSetup(int id,String setupId){
|
|
|
|
|
|
+ int result1 = tSetupMapper.deleteByPrimaryKey(id);
|
|
|
+ int result2 = tSetupPicService.deleteTSetupPicBySetupId(setupId);
|
|
|
+ return (result1>1 && result2>0)?1:0;
|
|
|
+ }
|
|
|
|
|
|
}
|