fix():修改公共实体类的字段

master
lwj 2024-08-09 08:58:44 +08:00
parent f2f7e4fbfe
commit 3b79604c35
2 changed files with 14 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package com.muyu.common.core.text;
import com.muyu.common.core.utils.StringUtils;
import lombok.extern.log4j.Log4j2;
import java.math.BigDecimal;
import java.math.BigInteger;
@ -15,6 +16,7 @@ import java.util.Set;
*
* @author muyu
*/
@Log4j2
public class Convert {
/**
* <br>
@ -687,7 +689,13 @@ public class Convert {
* @return
*/
public static String str (Object obj, String charsetName) {
return str(obj, Charset.forName(charsetName));
try {
return str(obj, Charset.forName(charsetName));
}catch (Exception exception){
log.error("字符转换异常:[{}-{}]",obj,charsetName);
throw new RuntimeException();
}
}
/**

View File

@ -1,5 +1,6 @@
package com.muyu.common.core.web.domain;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
@ -36,22 +37,26 @@ public class BaseEntity implements Serializable {
/**
*
*/
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
*
*/
@TableField(fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
*
*/
@TableField(fill = FieldFill.UPDATE)
private String updateBy;
/**
*
*/
@TableField(fill = FieldFill.UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;