Commit f18593ef authored by Quxl's avatar Quxl

x

parent c5fd1abc
......@@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONObject;
import com.egolm.sso.SapServiceApplication;
import com.egolm.sso.config.XRException;
import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.HttpUtil;
......@@ -56,18 +55,8 @@ public class CommonService {
@Value("${dataTracking.isOpen}")
private boolean isOpen;
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public Long getNextval(String sName) {
CommonService common = SapServiceApplication.getBean(CommonService.class);
return common.getNextval2(sName);
}
public void saveApiAccessLog(String METHOD, String ADDRESS, String RESULT) {
CommonService common = SapServiceApplication.getBean(CommonService.class);
common.saveApiAccessLog2(METHOD, ADDRESS, RESULT);
}
@Transactional(propagation=Propagation.NOT_SUPPORTED)
public Long getNextval2(String sName) {
try {
Map<String, Object> seqMap = jdbcTemplate.queryForMap("select * from x_sequence where name = ?", sName);
Integer id = (Integer) seqMap.get("id");
......@@ -100,8 +89,8 @@ public class CommonService {
}
}
@Transactional(propagation=Propagation.NOT_SUPPORTED)
public void saveApiAccessLog2(String METHOD, String ADDRESS, String RESULT) {
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public void saveApiAccessLog(String METHOD, String ADDRESS, String RESULT) {
Date now = new Date();
Map<String, Object> map = new HashMap<String, Object>();
map.put("ID", Long.valueOf(System.currentTimeMillis() + StringUtil.getIndex("T_API_ACCESS_LOG_ID")));
......@@ -117,14 +106,14 @@ public class CommonService {
jdbcTemplate.update(sql, objs);
}
@Transactional(propagation=Propagation.NOT_SUPPORTED)
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public String getNextBatch(Date day, String sPrefix, String sName) {
String dateString = DateUtil.formatDate(day, "yyyyMMdd");
sName = sPrefix + "_" + sName + "_" + dateString;
return dateString + "-" + this.getNextval(sName);
}
@Transactional(propagation=Propagation.NOT_SUPPORTED)
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public String getNextTrace(Date now, String sPrefix, String sName) {
String dateString = DateUtil.formatDate(now, DateUtil.FMT_DATE);
String timeString = DateUtil.formatDate(now, "yyyyMMddHHmmssSSS");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment