代码更新

This commit is contained in:
ldj_willow
2022-10-19 13:14:42 +08:00
parent cdd2225b5a
commit 8b89c10e33
31 changed files with 341 additions and 421 deletions

View File

@@ -55,8 +55,15 @@ public class DictDetail extends BaseEntity implements Serializable {
@ApiModelProperty(value = "字典值")
private String value;
@ApiModelProperty(value = "参数1")
private String para1;
@ApiModelProperty(value = "参数2")
private String para2;
@ApiModelProperty(value = "参数3")
private String para3;
@ApiModelProperty(value = "排序")
private Integer dictSort = 999;
}
}

View File

@@ -50,8 +50,8 @@ public class GenCodeController {
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("修改字典")
@ApiOperation("修改字典")
@Log("修改编码")
@ApiOperation("修改编码")
@PutMapping
@SaCheckPermission("genCode:edit")
public ResponseEntity<Object> update(@RequestBody JSONObject json) {

View File

@@ -22,9 +22,9 @@ import org.nl.modules.common.base.BaseDTO;
import java.io.Serializable;
/**
* @author Zheng Jie
* @date 2019-04-10
*/
* @author Zheng Jie
* @date 2019-04-10
*/
@Getter
@Setter
public class DictDetailDto extends BaseDTO implements Serializable {
@@ -36,6 +36,11 @@ public class DictDetailDto extends BaseDTO implements Serializable {
private String label;
private String value;
private String para1;
private String para2;
private String name;
private String para3;
private Integer dictSort;
}
}

View File

@@ -48,7 +48,9 @@ public class CodeDetailServiceImpl implements CodeDetailService {
json.put("code_rule_id",dict.get("id"));
json.put("is_active","1");
json.put("is_delete","0");
json.put("create_by", SecurityUtils.getCurrentUsername());
json.put("create_id", SecurityUtils.getCurrentUserId());
json.put("create_name", SecurityUtils.getCurrentNickName());
json.put("create_time", now);
if(form.get("type").equals("02")){
Date date = DateUtil.date();
@@ -69,7 +71,8 @@ public class CodeDetailServiceImpl implements CodeDetailService {
public void update(JSONObject json) {
String now = DateUtil.now();
json.put("update_time",now);
json.put("update_by", SecurityUtils.getCurrentUsername());
json.put("update_optid", SecurityUtils.getCurrentUserId());
json.put("update_optname", SecurityUtils.getCurrentNickName());
WQLObject.getWQLObject("sys_code_rule_detail").update(json);
}
}

View File

@@ -86,7 +86,7 @@ public class GenCodeServiceImpl implements GenCodeService {
WQLObject wql = WQLObject.getWQLObject("sys_code_rule");
String code = json.getString("code");
String id = json.getString("id");
JSONObject jo = wql.query("id<>'"+id+"code = '" + code + "'").uniqueResult(0);
JSONObject jo = wql.query("id <> '"+id+"' and code = '"+code+"'").uniqueResult(0);
if (jo != null){
throw new BadRequestException("该编码code已存在请校验");
}