|
@ -15,6 +15,8 @@ import org.nl.modules.wql.util.WqlUtil; |
|
|
import org.springframework.cache.annotation.CacheConfig; |
|
|
import org.springframework.cache.annotation.CacheConfig; |
|
|
import org.springframework.data.domain.Pageable; |
|
|
import org.springframework.data.domain.Pageable; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
@ -98,13 +100,14 @@ public class GenCodeServiceImpl implements GenCodeService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) |
|
|
public String codeDemo(Map form) { |
|
|
public String codeDemo(Map form) { |
|
|
String code = (String) form.get("code"); |
|
|
String code = (String) form.get("code"); |
|
|
String id = this.queryIdByCode(code); |
|
|
String id = this.queryIdByCode(code); |
|
|
//如果flag=1就执行更新数据库的操作
|
|
|
//如果flag=1就执行更新数据库的操作
|
|
|
String flag = (String) form.get("flag"); |
|
|
String flag = (String) form.get("flag"); |
|
|
WQLObject wo = WQLObject.getWQLObject("sys_code_rule_detail"); |
|
|
WQLObject wo = WQLObject.getWQLObject("sys_code_rule_detail"); |
|
|
JSONArray ja = wo.query("code_rule_id = '" + id + "'", " sort_num,type FOR UPDATE").getResultJSONArray(0); |
|
|
JSONArray ja = wo.query("code_rule_id = '" + id + "'", " sort_num,type").getResultJSONArray(0); |
|
|
String demo = ""; |
|
|
String demo = ""; |
|
|
boolean is_same = true; |
|
|
boolean is_same = true; |
|
|
for (int i = 0; i < ja.size(); i++) { |
|
|
for (int i = 0; i < ja.size(); i++) { |
|
|