异常信息 添加 USER_LOGIN_NAME_EXCEPTION

yun-zuoyi
wei.peng 7 years ago
parent 5335cf3b44
commit 978bb1e8be

@ -26,69 +26,70 @@ import java.io.Serializable;
@JsonInclude(value = JsonInclude.Include.NON_EMPTY) //""或null属性不参加序列转换 @JsonInclude(value = JsonInclude.Include.NON_EMPTY) //""或null属性不参加序列转换
public abstract class BaseBean implements Serializable { public abstract class BaseBean implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//此处使用hibernate的主键策略方式 //此处使用hibernate的主键策略方式
//手动设置,使用iplus-platform-common中的idtool生成 //手动设置,使用iplus-platform-common中的idtool生成
@Id //将Long类型系列化成String避免精度丢失
@GeneratedValue(generator = "IDGenerator") @Id
@GenericGenerator(name = "IDGenerator", strategy = "assigned") @GeneratedValue(generator = "IDGenerator")
@Column(name="id") @GenericGenerator(name = "IDGenerator", strategy = "assigned")
@ApiParam(value = "主键",example = "0") @Column(name="id")
//将Long类型系列化成String避免精度丢失 @ApiParam(value = "主键",example = "0")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
public Long id; public Long id;
//get单独处理
public Long getId() { //get单独处理
if(id != null) { public Long getId() {
return id.longValue(); if(id != null) {
}else{ return id.longValue();
return id; }else{
} return id;
} }
}
@Column(name="factory_code") @Column(name="factory_code")
@ApiParam(value = "工厂代码") @ApiParam(value = "工厂代码")
public String factoryCode; public String factoryCode;
@Column(name="is_valid") @Column(name="is_valid")
@ApiParam(value = "有效性",example = "1") @ApiParam(value = "有效性",example = "1")
public Integer isValid; //EnumUtil.isValid; public Integer isValid; //EnumUtil.isValid;
@Column(name="create_user") @Column(name="create_user")
@ApiParam(value = "创建日期") @ApiParam(value = "创建日期")
public String createUser; public String createUser;
@Column(name="create_date") @Column(name="create_date")
@ApiParam(value = "创建日期") @ApiParam(value = "创建日期")
public String createDatetime; public String createDatetime;
@Column(name="modify_user") @Column(name="modify_user")
@ApiParam(value = "修改人") @ApiParam(value = "修改人")
public String modifyUser; public String modifyUser;
@Column(name="modify_date") @Column(name="modify_date")
@ApiParam(value = "修改日期") @ApiParam(value = "修改日期")
public String modifyDatetime; public String modifyDatetime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="创建日期查询用,查询起始日期",example = "2000-01-01 01:00:00") @ApiParam(value="创建日期查询用,查询起始日期",example = "2000-01-01 01:00:00")
public transient String createDateTimeStart; public transient String createDateTimeStart;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="创建日期查询用,查询结束日期",example = "2000-01-01 01:00:00") @ApiParam(value="创建日期查询用,查询结束日期",example = "2000-01-01 01:00:00")
public transient String createDateTimeEnd; public transient String createDateTimeEnd;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="修改日期查询用,查询起始日期",example = "用于前台查询") @ApiParam(value="修改日期查询用,查询起始日期",example = "用于前台查询")
public transient String modifyDateTimeStart; public transient String modifyDateTimeStart;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "修改日期查询用,查询结束日期",example = "用于前台查询") @ApiParam(value = "修改日期查询用,查询结束日期",example = "用于前台查询")
public transient String modifyDateTimeEnd; public transient String modifyDateTimeEnd;
@ApiParam(value = "排序属性") @ApiParam(value = "排序属性")
public transient String orderByParam; public transient String orderByParam;
@ApiParam(value = "排序属性",example = "1") @ApiParam(value = "排序属性",example = "1")
//CommonEnumUtil.ASC_OR_DESC 1 asc,2 desc //CommonEnumUtil.ASC_OR_DESC 1 asc,2 desc

@ -80,7 +80,7 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
* in * in
* @param ids * @param ids
*/ */
public void deleteByIdIn(long[] ids); public void deleteByIds(long[] ids);
/** /**
* *

@ -144,7 +144,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
} }
@Override @Override
public void deleteByIdIn(long[] ids) { public void deleteByIds(long[] ids) {
if(ids != null && ids.length > 0){ if(ids != null && ids.length > 0){
String hql = "delete from " + persistentClass.getName() + " model where model.id in(:ids) "; String hql = "delete from " + persistentClass.getName() + " model where model.id in(:ids) ";
Query query = entityManager.createQuery(hql); Query query = entityManager.createQuery(hql);

@ -82,7 +82,7 @@ public class SysMenu extends BaseBean {
@Column(name="MENU_STATUS") @Column(name="MENU_STATUS")
@ApiParam(value ="功能状态1.正常2.禁用)" , example ="1" , access ="功能状态1.正常2.禁用)",defaultValue="1") @ApiParam(value ="功能状态1.正常2.禁用)" , example ="1" , access ="功能状态1.正常2.禁用)",defaultValue="1")
private Integer menuStatus = 1; private Integer menuStatus;
@ApiParam(value ="子集列表") @ApiParam(value ="子集列表")
private transient List<SysMenu> childList; private transient List<SysMenu> childList;

Loading…
Cancel
Save