|
|
@@ -9,6 +9,7 @@ import com.xpyy.xpyy.service.BomInfoService;
|
|
|
import com.xpyy.xpyy.util.SnowflakeUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
@@ -35,6 +36,7 @@ public class BomInfoServiceImpl implements BomInfoService {
|
|
|
* @return 返回结果
|
|
|
*/
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public Map<String, Object> addBomInfo(BomInfo bomInfo, HttpServletRequest request) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
try{
|
|
|
@@ -53,6 +55,7 @@ public class BomInfoServiceImpl implements BomInfoService {
|
|
|
e.printStackTrace();
|
|
|
map.put("msg", "500");
|
|
|
map.put("errMsg", "服务器请求异常,请稍后再试");
|
|
|
+ throw new RuntimeException();
|
|
|
}
|
|
|
return map;
|
|
|
}
|