package com.jdw.service;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hd.domain.vo.UserVo;
import com.hd.interfaces.IUserService;
import com.jdw.entity.User;
import com.jdw.mapper.UserMapper;
import com.v5ent.distribut.entities.TransactionLock;
@Service
public class UserService implements IUserService{
	@Autowired
	private UserMapper userMapper;
	
	@Transactional(readOnly=false)
	public int save(UserVo user, TransactionLock transactionLock) {
		User record = new User();
		BeanUtils.copyProperties(user, record);
		int i = userMapper.insert(record);
//		i=i/0;
		return i;
	}
	
	@Override
	@Transactional(readOnly=false)
	public int saveOne(UserVo user) {
		int i=0;
		User record=new User();
		BeanUtils.copyProperties(user, record);
		i = userMapper.insert(record);
		return i;
	}
}

@@ -952,25 +952,208 @@
 ecord);%0A
-%09%09return i
+//%09%09try %7B%0A%09%09%09testError(i);%0A//%09%09%7D catch (Exception e) %7B%0A//%09%09%09e.printStackTrace();%0A//%09%09%7D%0A%09%09return i;%0A%09%7D%0A%09@Transactional%0A%09public void testError(int i)%7B%0A%09%09Object o = null;%0A%09%09o.getClass();%0A//%09%09i=i/0
 ;%0A%09%7D%0A%7D%0A

Update UserService.java