|
|
|
@ -10,6 +10,7 @@ import com.gszc.mapper.CustomSupportMapper;
|
|
|
|
|
import com.gszc.service.ICustomService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -24,6 +25,7 @@ import java.util.UUID;
|
|
|
|
|
* @since 2020-04-27
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
@Transactional
|
|
|
|
|
public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> implements ICustomService {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -38,13 +40,15 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
custom.setCreateDate(LocalDateTime.now());
|
|
|
|
|
custom.setModifyDate(LocalDateTime.now());
|
|
|
|
|
customMapper.insert(custom);
|
|
|
|
|
for(CustomSupport customSupport:customSupports){
|
|
|
|
|
String id = UUID.randomUUID().toString();
|
|
|
|
|
customSupport.setId(id);
|
|
|
|
|
customSupport.setCreateDate(LocalDateTime.now());
|
|
|
|
|
customSupport.setModifyDate(LocalDateTime.now());
|
|
|
|
|
customSupport.setCustomId(uuid);
|
|
|
|
|
customSupportMapper.insert(customSupport);
|
|
|
|
|
if(customSupports.size()>0){
|
|
|
|
|
for(CustomSupport customSupport:customSupports){
|
|
|
|
|
String id = UUID.randomUUID().toString();
|
|
|
|
|
customSupport.setId(id);
|
|
|
|
|
customSupport.setCreateDate(LocalDateTime.now());
|
|
|
|
|
customSupport.setModifyDate(LocalDateTime.now());
|
|
|
|
|
customSupport.setCustomId(uuid);
|
|
|
|
|
customSupportMapper.insert(customSupport);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|