|
|
@@ -9,6 +9,7 @@ import com.usky.iot.domain.DmpProductInfo;
|
|
|
import com.usky.iot.service.DmpProductInfoService;
|
|
|
import com.usky.iot.service.vo.DmpProductInfoRequest;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
@@ -33,6 +34,7 @@ public class DmpProductInfoController {
|
|
|
* @param dmpProductInfo
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
@PostMapping
|
|
|
public ApiResult<Void> add(@RequestBody List<DmpProductInfo> dmpProductInfo){
|
|
|
dmpProductInfoService.add(dmpProductInfo);
|
|
|
@@ -44,6 +46,7 @@ public class DmpProductInfoController {
|
|
|
* @param dmpProductInfo
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
@PutMapping
|
|
|
public ApiResult<Void> edit(@RequestBody DmpProductInfo dmpProductInfo){
|
|
|
dmpProductInfoService.update(dmpProductInfo);
|