| | |
| | | import org.springframework.transaction.TransactionStatus; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | public Response<Object> addWindingExperiment(Experiment experiment) { |
| | | String id = "RZ_"; |
| | | id+=new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); |
| | | experiment.setId(id); |
| | | experiment.setCreateTime(new Date()); |
| | | experiment.setStatus(0); |
| | | experiment.setStatus(1); |
| | | try { |
| | | if (mapper.insertmanual(experiment) > 0) { |
| | | if (mapper.insert(experiment) > 0) { |
| | | return new Response().setMsg(1, "添加成功"); |
| | | } else { |
| | | return new Response().setMsg(0, "添加失败"); |