fix:重复指令问题处理
This commit is contained in:
@@ -21,6 +21,7 @@ import org.nl.system.service.coderule.dao.mapper.SysCodeRuleMapper;
|
|||||||
import org.nl.system.service.coderule.utils.CodeRuleTypeEnum;
|
import org.nl.system.service.coderule.utils.CodeRuleTypeEnum;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -57,7 +58,8 @@ public class SysCodeRuleServiceImpl extends ServiceImpl<SysCodeRuleMapper, SysCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized String codeDemo(Map form) {
|
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
|
||||||
|
public String codeDemo(Map form) {
|
||||||
String code = (String) form.get("code");
|
String code = (String) form.get("code");
|
||||||
String id = codeRuleMapper.selectOne(new LambdaQueryWrapper<SysCodeRule>().eq(SysCodeRule::getCode, code)).getId();
|
String id = codeRuleMapper.selectOne(new LambdaQueryWrapper<SysCodeRule>().eq(SysCodeRule::getCode, code)).getId();
|
||||||
// 如果flag = 1就执行更新数据库的操作
|
// 如果flag = 1就执行更新数据库的操作
|
||||||
|
|||||||
Reference in New Issue
Block a user