Former-commit-id: e604869e3d7af5c20a60a7e874eb9a07122e0bef
master
wangbing 5 years ago
parent cc16980059
commit 87be605b7c

@ -1,8 +1,6 @@
package ${basePackage}.frame.utils; package ${basePackage}.frame.utils;
import java.io.BufferedReader; import java.util.UUID;
import java.io.IOException;
import java.io.InputStreamReader;
/** /**
* IDgenerator - ID * IDgenerator - ID
@ -70,4 +68,8 @@ public class IDgenerator {
protected static long timeGen() { protected static long timeGen() {
return System.currentTimeMillis(); return System.currentTimeMillis();
} }
public static String nextUUID() {
return UUID.randomUUID().toString();
}
} }

@ -0,0 +1,102 @@
package ${basePackage}.module.system.ent;
import ${basePackage}.frame.excel.annotation.ColumnDescription;
import ${basePackage}.frame.excel.annotation.ColumnName;
import ${basePackage}.frame.excel.annotation.SheetName;
import ${basePackage}.frame.base.BaseEntity;
/**
* DEPT -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
@SheetName("部门")
public class Dept extends BaseEntity {
/**
* DEPT_CODE -
*/
@ColumnName("部门代码")
@ColumnDescription("")
private String deptCode;
/**
* DEPT_NAME -
*/
@ColumnName("部门名称")
@ColumnDescription("")
private String deptName;
/**
* DEPT_ALIAS -
*/
@ColumnName("部门别名")
@ColumnDescription("")
private String deptAlias;
/**
* SUP_CODE -
*/
@ColumnName("父部门代码")
@ColumnDescription("")
private String supCode;
/**
* SUP_NAME -
*/
@ColumnName("父部门名称")
@ColumnDescription("")
private String supName;
/**
* VALID -
*/
@ColumnName("是否有效")
@ColumnDescription("")
private Boolean valid;
public String getDeptCode() {
return this.deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
public String getDeptName() {
return this.deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getDeptAlias() {
return this.deptAlias;
}
public void setDeptAlias(String deptAlias) {
this.deptAlias = deptAlias;
}
public String getSupCode() {
return this.supCode;
}
public void setSupCode(String supCode) {
this.supCode = supCode;
}
public String getSupName() {
return this.supName;
}
public void setSupName(String supName) {
this.supName = supName;
}
public Boolean getValid() {
return this.valid;
}
public void setValid(Boolean valid) {
this.valid = valid;
}
}

@ -0,0 +1,68 @@
package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.DeptCreateRequest;
import ${basePackage}.module.system.req.DeptDeleteRequest;
import ${basePackage}.module.system.req.DeptFindRequest;
import ${basePackage}.module.system.req.DeptGetRequest;
import ${basePackage}.module.system.req.DeptUpdateRequest;
import ${basePackage}.module.system.rsp.DeptCreateResponse;
import ${basePackage}.module.system.rsp.DeptDeleteResponse;
import ${basePackage}.module.system.rsp.DeptFindResponse;
import ${basePackage}.module.system.rsp.DeptGetResponse;
import ${basePackage}.module.system.rsp.DeptUpdateResponse;
import ${basePackage}.frame.base.Token;
/**
*
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public interface DeptManager {
/**
*
*
* @param request
* @param token
* @return
*/
DeptCreateResponse create(DeptCreateRequest request, Token token);
/**
*
*
* @param request
* @param token
* @return
*/
DeptDeleteResponse delete(DeptDeleteRequest request, Token token);
/**
*
*
* @param request
* @param token
* @return
*/
DeptUpdateResponse update(DeptUpdateRequest request, Token token);
/**
*
*
* @param request
* @param token
* @return
*/
DeptFindResponse find(DeptFindRequest request, Token token);
/**
*
*
* @param request
* @param token
* @return
*/
DeptGetResponse get(DeptGetRequest request, Token token);
}

@ -0,0 +1,175 @@
package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.Dept;
import ${basePackage}.module.system.mpr.DeptMapper;
import ${basePackage}.module.system.req.DeptCreateRequest;
import ${basePackage}.module.system.req.DeptDeleteRequest;
import ${basePackage}.module.system.req.DeptFindRequest;
import ${basePackage}.module.system.req.DeptGetRequest;
import ${basePackage}.module.system.req.DeptUpdateRequest;
import ${basePackage}.module.system.rsp.DeptCreateResponse;
import ${basePackage}.module.system.rsp.DeptDeleteResponse;
import ${basePackage}.module.system.rsp.DeptFindResponse;
import ${basePackage}.module.system.rsp.DeptGetResponse;
import ${basePackage}.module.system.rsp.DeptUpdateResponse;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* DEPT -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
@Transactional
@Service
public class DeptManagerImpl implements DeptManager {
@Autowired
private DeptMapper deptMapper;
/**
*
*
* @param request
* @param token
* @return
*/
public DeptCreateResponse create(DeptCreateRequest request, Token token) {
DeptCreateResponse response = new DeptCreateResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
long id = IDgenerator.nextId();
Dept entity = MapperUtil.map(request, Dept.class);
entity.setId(id);
long result = deptMapper.insert(entity, token);
if (1L != result) {
response.addError(ErrorType.BUSINESS_ERROR, Message.CREATE_FAILURE);
return response;
}
response.setId(id);
return response;
}
/**
*
*
* @param request
* @param token
* @return
*/
public DeptDeleteResponse delete(DeptDeleteRequest request, Token token) {
DeptDeleteResponse response = new DeptDeleteResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
long result = deptMapper.delete(request, token);
if (1L != result) {
response.addError(ErrorType.BUSINESS_ERROR, Message.DELETE_FAILURE);
return response;
}
response.setResult(result);
return response;
}
/**
*
*
* @param request
* @param token
* @return
*/
public DeptUpdateResponse update(DeptUpdateRequest request, Token token) {
DeptUpdateResponse response = new DeptUpdateResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
long result = deptMapper.update(request, token);
if (1L != result) {
response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE);
return response;
}
response.setResult(result);
return response;
}
/**
*
*
* @param request
* @param token
* @return
*/
@Transactional(readOnly = true)
public DeptFindResponse find(DeptFindRequest request, Token token) {
DeptFindResponse response = new DeptFindResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
if (StringUtil.isNotEmpty(request.getSortKey())) {
PageHelper.orderBy(request.getSortKey() + " " + request.getSortType());
}
PageInfo<Dept> pageInfo = new PageInfo<>(deptMapper.find(request, token));
response.setResult(pageInfo.getList());
response.setTotalCount(pageInfo.getTotal());
return response;
}
/**
*
*
* @param request
* @param token
* @return
*/
@Transactional(readOnly = true)
public DeptGetResponse get(DeptGetRequest request, Token token) {
DeptGetResponse response = new DeptGetResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
Dept po = deptMapper.get(request, token);
if (po != null) {
response.setDept(po);
} else {
response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE);
}
return response;
}
}

@ -1,8 +1,16 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.DictItemCreateRequest;
import ${basePackage}.module.system.rsp.*; import ${basePackage}.module.system.req.DictItemDeleteRequest;
import ${basePackage}.module.system.req.DictItemFindRequest;
import ${basePackage}.module.system.req.DictItemGetRequest;
import ${basePackage}.module.system.req.DictItemUpdateRequest;
import ${basePackage}.module.system.rsp.DictItemCreateResponse;
import ${basePackage}.module.system.rsp.DictItemDeleteResponse;
import ${basePackage}.module.system.rsp.DictItemFindResponse;
import ${basePackage}.module.system.rsp.DictItemGetResponse;
import ${basePackage}.module.system.rsp.DictItemUpdateResponse;
/** /**
* *

@ -14,8 +14,16 @@ import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil; import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.DictItem; import ${basePackage}.module.system.ent.DictItem;
import ${basePackage}.module.system.mpr.DictItemMapper; import ${basePackage}.module.system.mpr.DictItemMapper;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.DictItemCreateRequest;
import ${basePackage}.module.system.rsp.*; import ${basePackage}.module.system.req.DictItemDeleteRequest;
import ${basePackage}.module.system.req.DictItemFindRequest;
import ${basePackage}.module.system.req.DictItemGetRequest;
import ${basePackage}.module.system.req.DictItemUpdateRequest;
import ${basePackage}.module.system.rsp.DictItemCreateResponse;
import ${basePackage}.module.system.rsp.DictItemDeleteResponse;
import ${basePackage}.module.system.rsp.DictItemFindResponse;
import ${basePackage}.module.system.rsp.DictItemGetResponse;
import ${basePackage}.module.system.rsp.DictItemUpdateResponse;
/** /**
* DICT_ITEM - * DICT_ITEM -

@ -1,8 +1,18 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.DictCreateRequest;
import ${basePackage}.module.system.rsp.*; import ${basePackage}.module.system.req.DictDeleteRequest;
import ${basePackage}.module.system.req.DictFindRequest;
import ${basePackage}.module.system.req.DictGetRequest;
import ${basePackage}.module.system.req.DictLoadRequest;
import ${basePackage}.module.system.req.DictUpdateRequest;
import ${basePackage}.module.system.rsp.DictCreateResponse;
import ${basePackage}.module.system.rsp.DictDeleteResponse;
import ${basePackage}.module.system.rsp.DictFindResponse;
import ${basePackage}.module.system.rsp.DictGetResponse;
import ${basePackage}.module.system.rsp.DictLoadResponse;
import ${basePackage}.module.system.rsp.DictUpdateResponse;
/** /**
* *

@ -14,8 +14,20 @@ import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil; import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.Dict; import ${basePackage}.module.system.ent.Dict;
import ${basePackage}.module.system.mpr.DictMapper; import ${basePackage}.module.system.mpr.DictMapper;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.DictCreateRequest;
import ${basePackage}.module.system.rsp.*; import ${basePackage}.module.system.req.DictDeleteRequest;
import ${basePackage}.module.system.req.DictFindRequest;
import ${basePackage}.module.system.req.DictGetRequest;
import ${basePackage}.module.system.req.DictItemFindRequest;
import ${basePackage}.module.system.req.DictLoadRequest;
import ${basePackage}.module.system.req.DictUpdateRequest;
import ${basePackage}.module.system.rsp.DictCreateResponse;
import ${basePackage}.module.system.rsp.DictDeleteResponse;
import ${basePackage}.module.system.rsp.DictFindResponse;
import ${basePackage}.module.system.rsp.DictGetResponse;
import ${basePackage}.module.system.rsp.DictItemFindResponse;
import ${basePackage}.module.system.rsp.DictLoadResponse;
import ${basePackage}.module.system.rsp.DictUpdateResponse;
import java.util.List; import java.util.List;

@ -1,8 +1,14 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.FileCreateRequest;
import ${basePackage}.module.system.req.FileDeleteRequest;
import ${basePackage}.module.system.req.FileFindRequest;
import ${basePackage}.module.system.req.FileGetRequest;
import ${basePackage}.module.system.rsp.FileCreateResponse;
import ${basePackage}.module.system.rsp.FileDeleteResponse;
import ${basePackage}.module.system.rsp.FileFindResponse;
import ${basePackage}.module.system.rsp.FileGetResponse;
/** /**
* *

@ -1,21 +1,27 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.File;
import ${basePackage}.module.system.mpr.FileMapper;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.File;
import ${basePackage}.module.system.mpr.FileMapper;
import ${basePackage}.module.system.req.FileCreateRequest;
import ${basePackage}.module.system.req.FileDeleteRequest;
import ${basePackage}.module.system.req.FileFindRequest;
import ${basePackage}.module.system.req.FileGetRequest;
import ${basePackage}.module.system.rsp.FileCreateResponse;
import ${basePackage}.module.system.rsp.FileDeleteResponse;
import ${basePackage}.module.system.rsp.FileFindResponse;
import ${basePackage}.module.system.rsp.FileGetResponse;
/** /**
* FILE - * FILE -

@ -1,8 +1,16 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.ResourceCreateRequest;
import ${basePackage}.module.system.req.ResourceDeleteRequest;
import ${basePackage}.module.system.req.ResourceFindRequest;
import ${basePackage}.module.system.req.ResourceGetRequest;
import ${basePackage}.module.system.req.ResourceUpdateRequest;
import ${basePackage}.module.system.rsp.ResourceCreateResponse;
import ${basePackage}.module.system.rsp.ResourceDeleteResponse;
import ${basePackage}.module.system.rsp.ResourceFindResponse;
import ${basePackage}.module.system.rsp.ResourceGetResponse;
import ${basePackage}.module.system.rsp.ResourceUpdateResponse;
/** /**
* *

@ -1,21 +1,29 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.Resource;
import ${basePackage}.module.system.mpr.ResourceMapper;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.Resource;
import ${basePackage}.module.system.mpr.ResourceMapper;
import ${basePackage}.module.system.req.ResourceCreateRequest;
import ${basePackage}.module.system.req.ResourceDeleteRequest;
import ${basePackage}.module.system.req.ResourceFindRequest;
import ${basePackage}.module.system.req.ResourceGetRequest;
import ${basePackage}.module.system.req.ResourceUpdateRequest;
import ${basePackage}.module.system.rsp.ResourceCreateResponse;
import ${basePackage}.module.system.rsp.ResourceDeleteResponse;
import ${basePackage}.module.system.rsp.ResourceFindResponse;
import ${basePackage}.module.system.rsp.ResourceGetResponse;
import ${basePackage}.module.system.rsp.ResourceUpdateResponse;
/** /**
* RESOURCE - * RESOURCE -

@ -1,8 +1,16 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.RoleCreateRequest;
import ${basePackage}.module.system.req.RoleDeleteRequest;
import ${basePackage}.module.system.req.RoleFindRequest;
import ${basePackage}.module.system.req.RoleGetRequest;
import ${basePackage}.module.system.req.RoleUpdateRequest;
import ${basePackage}.module.system.rsp.RoleCreateResponse;
import ${basePackage}.module.system.rsp.RoleDeleteResponse;
import ${basePackage}.module.system.rsp.RoleFindResponse;
import ${basePackage}.module.system.rsp.RoleGetResponse;
import ${basePackage}.module.system.rsp.RoleUpdateResponse;
/** /**
* *

@ -1,21 +1,29 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.Role;
import ${basePackage}.module.system.mpr.RoleMapper;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.Role;
import ${basePackage}.module.system.mpr.RoleMapper;
import ${basePackage}.module.system.req.RoleCreateRequest;
import ${basePackage}.module.system.req.RoleDeleteRequest;
import ${basePackage}.module.system.req.RoleFindRequest;
import ${basePackage}.module.system.req.RoleGetRequest;
import ${basePackage}.module.system.req.RoleUpdateRequest;
import ${basePackage}.module.system.rsp.RoleCreateResponse;
import ${basePackage}.module.system.rsp.RoleDeleteResponse;
import ${basePackage}.module.system.rsp.RoleFindResponse;
import ${basePackage}.module.system.rsp.RoleGetResponse;
import ${basePackage}.module.system.rsp.RoleUpdateResponse;
/** /**
* ROLE - * ROLE -

@ -1,8 +1,16 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.RoleResourceCreateRequest;
import ${basePackage}.module.system.req.RoleResourceDeleteRequest;
import ${basePackage}.module.system.req.RoleResourceFindRequest;
import ${basePackage}.module.system.req.RoleResourceGetRequest;
import ${basePackage}.module.system.req.RoleResourceUpdateRequest;
import ${basePackage}.module.system.rsp.RoleResourceCreateResponse;
import ${basePackage}.module.system.rsp.RoleResourceDeleteResponse;
import ${basePackage}.module.system.rsp.RoleResourceFindResponse;
import ${basePackage}.module.system.rsp.RoleResourceGetResponse;
import ${basePackage}.module.system.rsp.RoleResourceUpdateResponse;
/** /**
* *

@ -1,21 +1,29 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.RoleResource;
import ${basePackage}.module.system.mpr.RoleResourceMapper;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.RoleResource;
import ${basePackage}.module.system.mpr.RoleResourceMapper;
import ${basePackage}.module.system.req.RoleResourceCreateRequest;
import ${basePackage}.module.system.req.RoleResourceDeleteRequest;
import ${basePackage}.module.system.req.RoleResourceFindRequest;
import ${basePackage}.module.system.req.RoleResourceGetRequest;
import ${basePackage}.module.system.req.RoleResourceUpdateRequest;
import ${basePackage}.module.system.rsp.RoleResourceCreateResponse;
import ${basePackage}.module.system.rsp.RoleResourceDeleteResponse;
import ${basePackage}.module.system.rsp.RoleResourceFindResponse;
import ${basePackage}.module.system.rsp.RoleResourceGetResponse;
import ${basePackage}.module.system.rsp.RoleResourceUpdateResponse;
/** /**
* ROLE_RESOURCE - * ROLE_RESOURCE -

@ -1,8 +1,18 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.TokensBuildRequest;
import ${basePackage}.module.system.req.TokensCreateRequest;
import ${basePackage}.module.system.req.TokensDeleteRequest;
import ${basePackage}.module.system.req.TokensFindRequest;
import ${basePackage}.module.system.req.TokensGetRequest;
import ${basePackage}.module.system.req.TokensUpdateRequest;
import ${basePackage}.module.system.rsp.TokensBuildResponse;
import ${basePackage}.module.system.rsp.TokensCreateResponse;
import ${basePackage}.module.system.rsp.TokensDeleteResponse;
import ${basePackage}.module.system.rsp.TokensFindResponse;
import ${basePackage}.module.system.rsp.TokensGetResponse;
import ${basePackage}.module.system.rsp.TokensUpdateResponse;
/** /**
* *

@ -1,8 +1,16 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.UserCreateRequest;
import ${basePackage}.module.system.req.UserDeleteRequest;
import ${basePackage}.module.system.req.UserFindRequest;
import ${basePackage}.module.system.req.UserGetRequest;
import ${basePackage}.module.system.req.UserUpdateRequest;
import ${basePackage}.module.system.rsp.UserCreateResponse;
import ${basePackage}.module.system.rsp.UserDeleteResponse;
import ${basePackage}.module.system.rsp.UserFindResponse;
import ${basePackage}.module.system.rsp.UserGetResponse;
import ${basePackage}.module.system.rsp.UserUpdateResponse;
/** /**
* *

@ -1,21 +1,29 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.User;
import ${basePackage}.module.system.mpr.UserMapper;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.User;
import ${basePackage}.module.system.mpr.UserMapper;
import ${basePackage}.module.system.req.UserCreateRequest;
import ${basePackage}.module.system.req.UserDeleteRequest;
import ${basePackage}.module.system.req.UserFindRequest;
import ${basePackage}.module.system.req.UserGetRequest;
import ${basePackage}.module.system.req.UserUpdateRequest;
import ${basePackage}.module.system.rsp.UserCreateResponse;
import ${basePackage}.module.system.rsp.UserDeleteResponse;
import ${basePackage}.module.system.rsp.UserFindResponse;
import ${basePackage}.module.system.rsp.UserGetResponse;
import ${basePackage}.module.system.rsp.UserUpdateResponse;
/** /**
* USER - * USER -

@ -1,8 +1,16 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.req.UserRoleCreateRequest;
import ${basePackage}.module.system.req.UserRoleDeleteRequest;
import ${basePackage}.module.system.req.UserRoleFindRequest;
import ${basePackage}.module.system.req.UserRoleGetRequest;
import ${basePackage}.module.system.req.UserRoleUpdateRequest;
import ${basePackage}.module.system.rsp.UserRoleCreateResponse;
import ${basePackage}.module.system.rsp.UserRoleDeleteResponse;
import ${basePackage}.module.system.rsp.UserRoleFindResponse;
import ${basePackage}.module.system.rsp.UserRoleGetResponse;
import ${basePackage}.module.system.rsp.UserRoleUpdateResponse;
/** /**
* *

@ -1,21 +1,29 @@
package ${basePackage}.module.system.mgr; package ${basePackage}.module.system.mgr;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.UserRole;
import ${basePackage}.module.system.mpr.UserRoleMapper;
import ${basePackage}.module.system.req.*;
import ${basePackage}.module.system.rsp.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Token;
import ${basePackage}.frame.utils.IDgenerator;
import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Message;
import ${basePackage}.frame.utils.ValidationUtil;
import ${basePackage}.module.system.ent.UserRole;
import ${basePackage}.module.system.mpr.UserRoleMapper;
import ${basePackage}.module.system.req.UserRoleCreateRequest;
import ${basePackage}.module.system.req.UserRoleDeleteRequest;
import ${basePackage}.module.system.req.UserRoleFindRequest;
import ${basePackage}.module.system.req.UserRoleGetRequest;
import ${basePackage}.module.system.req.UserRoleUpdateRequest;
import ${basePackage}.module.system.rsp.UserRoleCreateResponse;
import ${basePackage}.module.system.rsp.UserRoleDeleteResponse;
import ${basePackage}.module.system.rsp.UserRoleFindResponse;
import ${basePackage}.module.system.rsp.UserRoleGetResponse;
import ${basePackage}.module.system.rsp.UserRoleUpdateResponse;
/** /**
* USER_ROLE - * USER_ROLE -

@ -0,0 +1,78 @@
package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import ${basePackage}.module.system.ent.Dept;
import ${basePackage}.module.system.req.DeptCreateRequest;
import ${basePackage}.module.system.req.DeptDeleteRequest;
import ${basePackage}.module.system.req.DeptFindRequest;
import ${basePackage}.module.system.req.DeptGetRequest;
import ${basePackage}.module.system.req.DeptUpdateRequest;
import ${basePackage}.frame.base.Token;
/**
* DEPT -
*
* @author wangbing
* @date 2019-12-24
*/
@Mapper
public interface DeptMapper {
/**
*
*
* @param request
* @param token
* @return
*/
long insert(@Param("request") Dept request, @Param("token") Token token);
/**
*
*
* @param request
* @param token
* @return
*/
long insertBatch(@Param("list") List<Dept> request, @Param("token") Token token);
/**
*
*
* @param request
* @param token
* @return
*/
long delete(@Param("request") DeptDeleteRequest request, @Param("token") Token token);
/**
*
*
* @param request
* @param token
* @return
*/
long update(@Param("request") DeptUpdateRequest request, @Param("token") Token token);
/**
*
*
* @param request
* @param token
* @return
*/
List<Dept> find(@Param("request") DeptFindRequest request, @Param("token") Token token);
/**
*
*
* @param request
* @param token
* @return
*/
Dept get(@Param("request") DeptGetRequest request, @Param("token") Token token);
}

@ -4,7 +4,11 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token; import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.Dict; import ${basePackage}.module.system.ent.Dict;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.DictDeleteRequest;
import ${basePackage}.module.system.req.DictFindRequest;
import ${basePackage}.module.system.req.DictGetRequest;
import ${basePackage}.module.system.req.DictUpdateRequest;
import java.util.List; import java.util.List;
/** /**

@ -1,14 +1,15 @@
package ${basePackage}.module.system.mpr; package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.File;
import ${basePackage}.module.system.req.FileDeleteRequest;
import ${basePackage}.module.system.req.FileFindRequest;
import ${basePackage}.module.system.req.FileGetRequest;
import java.util.List; import java.util.List;
import ${basePackage}.module.system.ent.File;
import ${basePackage}.module.system.req.*;
import ${basePackage}.frame.base.Token;
/** /**
* FILE - * FILE -
* *

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${basePackage}.module.system.mpr.DeptMapper">
<sql id="table">`SYS_DEPT`</sql>
<sql id="entityColumnList">
`ID`,`DEPT_CODE`,`DEPT_NAME`,`DEPT_ALIAS`,`SUP_CODE`,`SUP_NAME`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
</sql>
<resultMap id="dept" type="${basePackage}.module.system.ent.Dept">
<result column="ID" jdbcType="BIGINT" property="id"/>
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode"/>
<result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName"/>
<result column="DEPT_ALIAS" jdbcType="VARCHAR" property="deptAlias"/>
<result column="SUP_CODE" jdbcType="VARCHAR" property="supCode"/>
<result column="SUP_NAME" jdbcType="VARCHAR" property="supName"/>
<result column="VALID" jdbcType="BIT" property="valid"/>
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
</resultMap>
<select id="find" resultMap="dept">
SELECT
<include refid="entityColumnList"/>
FROM
<include refid="table"/>
WHERE
`IS_DELETED` = 0
<if test="request.deptCode != null and request.deptCode != ''">
AND `DEPT_CODE` = ${r"#"}{request.deptCode}
</if>
<if test="request.deptName != null and request.deptName != ''">
AND `DEPT_NAME` = ${r"#"}{request.deptName}
</if>
<if test="request.deptAlias != null and request.deptAlias != ''">
AND `DEPT_ALIAS` = ${r"#"}{request.deptAlias}
</if>
<if test="request.supCode != null and request.supCode != ''">
AND `SUP_CODE` = ${r"#"}{request.supCode}
</if>
<if test="request.supName != null and request.supName != ''">
AND `SUP_NAME` = ${r"#"}{request.supName}
</if>
<if test="request.valid != null">
AND `VALID` = ${r"#"}{request.valid}
</if>
</select>
<select id="search" resultMap="dept">
SELECT
<include refid="entityColumnList"/>
FROM
<include refid="table"/>
WHERE
`IS_DELETED` = 0
<if test="request.keyword != null and request.keyword != ''">
1 = 2
</if>
</select>
<insert id="insert">
INSERT INTO
<include refid="table"/>
(
<include refid="entityColumnList"/>
)
VALUES
(
${r"#"}{request.id},
${r"#"}{request.deptCode,jdbcType=VARCHAR},
${r"#"}{request.deptName,jdbcType=VARCHAR},
${r"#"}{request.deptAlias,jdbcType=VARCHAR},
${r"#"}{request.supCode,jdbcType=VARCHAR},
${r"#"}{request.supName,jdbcType=VARCHAR},
${r"#"}{request.valid,jdbcType=BIT},
0,
0,
${r"#"}{token.userId,jdbcType=NUMERIC},
sysdate(),
NULL,
NULL
)
</insert>
<insert id="insertBatch">
INSERT INTO
<include refid="table"/>
(
<include refid="entityColumnList"/>
)
VALUES
<foreach collection="list" item= "item" index ="index" separator=",">
(
${r"#"}{item.id},
${r"#"}{item.deptCode,jdbcType=VARCHAR},
${r"#"}{item.deptName,jdbcType=VARCHAR},
${r"#"}{item.deptAlias,jdbcType=VARCHAR},
${r"#"}{item.supCode,jdbcType=VARCHAR},
${r"#"}{item.supName,jdbcType=VARCHAR},
${r"#"}{item.valid,jdbcType=BIT},
0,
0,
${r"#"}{token.userId,jdbcType=NUMERIC},
sysdate(),
NULL,
NULL
)
</foreach >
</insert>
<update id="delete">
UPDATE
<include refid="table"/>
SET `IS_DELETED` = 1
WHERE `IS_DELETED` = 0
AND `ID` = ${r"#"}{request.id}
</update>
<update id="update">
UPDATE
<include refid="table"/>
SET
`DEPT_CODE` = ${r"#"}{request.deptCode,jdbcType=VARCHAR},
`DEPT_NAME` = ${r"#"}{request.deptName,jdbcType=VARCHAR},
`DEPT_ALIAS` = ${r"#"}{request.deptAlias,jdbcType=VARCHAR},
`SUP_CODE` = ${r"#"}{request.supCode,jdbcType=VARCHAR},
`SUP_NAME` = ${r"#"}{request.supName,jdbcType=VARCHAR},
`VALID` = ${r"#"}{request.valid,jdbcType=BIT},
`ROW_VERSION` = `ROW_VERSION` + 1,
`LAST_UPDATE_BY` = ${r"#"}{token.userId},
`LAST_UPDATE_TIME` = sysdate()
WHERE
`IS_DELETED` = 0
AND `ID` = ${r"#"}{request.id}
AND `ROW_VERSION` = ${r"#"}{request.rowVersion}
</update>
<select id="get" resultMap="dept">
SELECT
<include refid="entityColumnList"/>
FROM
<include refid="table"/>
WHERE
`IS_DELETED` = 0
AND `ID` = ${r"#"}{request.id}
</select>
</mapper>

@ -1,14 +1,16 @@
package ${basePackage}.module.system.mpr; package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.Resource;
import ${basePackage}.module.system.req.ResourceDeleteRequest;
import ${basePackage}.module.system.req.ResourceFindRequest;
import ${basePackage}.module.system.req.ResourceGetRequest;
import ${basePackage}.module.system.req.ResourceUpdateRequest;
import java.util.List; import java.util.List;
import ${basePackage}.module.system.ent.Resource;
import ${basePackage}.module.system.req.*;
import ${basePackage}.frame.base.Token;
/** /**
* RESOURCE - * RESOURCE -
* *

@ -1,14 +1,16 @@
package ${basePackage}.module.system.mpr; package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.Role;
import ${basePackage}.module.system.req.RoleDeleteRequest;
import ${basePackage}.module.system.req.RoleFindRequest;
import ${basePackage}.module.system.req.RoleGetRequest;
import ${basePackage}.module.system.req.RoleUpdateRequest;
import java.util.List; import java.util.List;
import ${basePackage}.module.system.ent.Role;
import ${basePackage}.module.system.req.*;
import ${basePackage}.frame.base.Token;
/** /**
* ROLE - * ROLE -
* *

@ -1,14 +1,16 @@
package ${basePackage}.module.system.mpr; package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.RoleResource;
import ${basePackage}.module.system.req.RoleResourceDeleteRequest;
import ${basePackage}.module.system.req.RoleResourceFindRequest;
import ${basePackage}.module.system.req.RoleResourceGetRequest;
import ${basePackage}.module.system.req.RoleResourceUpdateRequest;
import java.util.List; import java.util.List;
import ${basePackage}.module.system.ent.RoleResource;
import ${basePackage}.module.system.req.*;
import ${basePackage}.frame.base.Token;
/** /**
* ROLE_RESOURCE - * ROLE_RESOURCE -
* *

@ -1,14 +1,16 @@
package ${basePackage}.module.system.mpr; package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.Tokens;
import ${basePackage}.module.system.req.TokensDeleteRequest;
import ${basePackage}.module.system.req.TokensFindRequest;
import ${basePackage}.module.system.req.TokensGetRequest;
import ${basePackage}.module.system.req.TokensUpdateRequest;
import java.util.List; import java.util.List;
import ${basePackage}.module.system.ent.Tokens;
import ${basePackage}.module.system.req.*;
import ${basePackage}.frame.base.Token;
/** /**
* TOKENS - * TOKENS -
* *

@ -1,14 +1,16 @@
package ${basePackage}.module.system.mpr; package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.User;
import ${basePackage}.module.system.req.UserDeleteRequest;
import ${basePackage}.module.system.req.UserFindRequest;
import ${basePackage}.module.system.req.UserGetRequest;
import ${basePackage}.module.system.req.UserUpdateRequest;
import java.util.List; import java.util.List;
import ${basePackage}.module.system.ent.User;
import ${basePackage}.module.system.req.*;
import ${basePackage}.frame.base.Token;
/** /**
* USER - * USER -
* *

@ -1,14 +1,16 @@
package ${basePackage}.module.system.mpr; package ${basePackage}.module.system.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${basePackage}.frame.base.Token;
import ${basePackage}.module.system.ent.UserRole;
import ${basePackage}.module.system.req.UserRoleDeleteRequest;
import ${basePackage}.module.system.req.UserRoleFindRequest;
import ${basePackage}.module.system.req.UserRoleGetRequest;
import ${basePackage}.module.system.req.UserRoleUpdateRequest;
import java.util.List; import java.util.List;
import ${basePackage}.module.system.ent.UserRole;
import ${basePackage}.module.system.req.*;
import ${basePackage}.frame.base.Token;
/** /**
* USER_ROLE - * USER_ROLE -
* *

@ -0,0 +1,60 @@
package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseRequest;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Length;
/**
* RoleCreateRequest -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleCreateRequest extends BaseRequest {
/**
*
*/
@NotEmpty(message = "[roleName]角色名称不能为空")
@Length(min = 0, max = 50, message = "[roleName]角色名称长度不合法(0-50)")
private String roleName;
/**
*
*/
@NotEmpty(message = "[roleCode]角色代码不能为空")
@Length(min = 0, max = 50, message = "[roleCode]角色代码长度不合法(0-50)")
private String roleCode;
/**
*
*/
@Length(min = 0, max = 50, message = "[roleComment]角色描述长度不合法(0-50)")
private String roleComment;
public String getRoleName() {
return this.roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getRoleCode() {
return this.roleCode;
}
public void setRoleCode(String roleCode) {
this.roleCode = roleCode;
}
public String getRoleComment() {
return this.roleComment;
}
public void setRoleComment(String roleComment) {
this.roleComment = roleComment;
}
}

@ -0,0 +1,28 @@
package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseUpdateRequest;
import javax.validation.constraints.NotNull;
/**
* RoleDeleteRequest -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleDeleteRequest extends BaseUpdateRequest {
/**
*
*/
@NotNull(message = "[id]主键不能为空")
private long id;
public long getId() {
return this.id;
}
public void setId(long id) {
this.id = id;
}
}

@ -0,0 +1,52 @@
package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseFindRequest;
/**
* RoleRequest -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleFindRequest extends BaseFindRequest {
/**
*
*/
private String roleName;
/**
*
*/
private String roleCode;
/**
*
*/
private String roleComment;
public String getRoleName() {
return this.roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getRoleCode() {
return this.roleCode;
}
public void setRoleCode(String roleCode) {
this.roleCode = roleCode;
}
public String getRoleComment() {
return this.roleComment;
}
public void setRoleComment(String roleComment) {
this.roleComment = roleComment;
}
}

@ -0,0 +1,28 @@
package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseRequest;
import javax.validation.constraints.NotNull;
/**
* RoleGetRequest -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleGetRequest extends BaseRequest {
/**
*
*/
@NotNull(message = "[id]主键不能为空")
private long id;
public long getId() {
return this.id;
}
public void setId(long id) {
this.id = id;
}
}

@ -0,0 +1,74 @@
package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseUpdateRequest;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
/**
* RoleUpdateRequest -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleUpdateRequest extends BaseUpdateRequest {
/**
*
*/
@NotNull(message = "[id]主键不能为NULL")
private Long id;
/**
*
*/
@NotEmpty(message = "[roleName]角色名称不能为空")
@Length(min = 0, max = 50, message = "[roleName]角色名称长度不合法(0-50)")
private String roleName;
/**
*
*/
@NotEmpty(message = "[roleCode]角色代码不能为空")
@Length(min = 0, max = 50, message = "[roleCode]角色代码长度不合法(0-50)")
private String roleCode;
/**
*
*/
@Length(min = 0, max = 50, message = "[roleComment]角色描述长度不合法(0-50)")
private String roleComment;
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getRoleName() {
return this.roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getRoleCode() {
return this.roleCode;
}
public void setRoleCode(String roleCode) {
this.roleCode = roleCode;
}
public String getRoleComment() {
return this.roleComment;
}
public void setRoleComment(String roleComment) {
this.roleComment = roleComment;
}
}

@ -0,0 +1,26 @@
package ${basePackage}.module.system.rsp;
import ${basePackage}.frame.base.BaseResponse;
/**
* RoleCreateResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleCreateResponse extends BaseResponse {
/**
*
*/
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

@ -0,0 +1,26 @@
package ${basePackage}.module.system.rsp;
import ${basePackage}.frame.base.BaseResponse;
/**
* RoleDeleteResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleDeleteResponse extends BaseResponse {
/**
*
*/
private Long result;
public Long getResult() {
return this.result;
}
public void setResult(Long result) {
this.result = result;
}
}

@ -0,0 +1,14 @@
package ${basePackage}.module.system.rsp;
import ${basePackage}.frame.base.BaseFindResponse;
import ${basePackage}.module.system.ent.Role;
/**
* RoleFindResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleFindResponse extends BaseFindResponse<Role> {
}

@ -0,0 +1,27 @@
package ${basePackage}.module.system.rsp;
import ${basePackage}.module.system.ent.Role;
import ${basePackage}.frame.base.BaseResponse;
/**
* RoleGetResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleGetResponse extends BaseResponse {
/**
*
*/
private Role role;
public Role getRole() {
return this.role;
}
public void setRole(Role role) {
this.role = role;
}
}

@ -0,0 +1,26 @@
package ${basePackage}.module.system.rsp;
import ${basePackage}.frame.base.BaseResponse;
/**
* RoleUpdateResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2019-12-24
*/
public class RoleUpdateResponse extends BaseResponse {
/**
*
*/
private Long result;
public Long getResult() {
return this.result;
}
public void setResult(Long result) {
this.result = result;
}
}
Loading…
Cancel
Save

Powered by TurnKey Linux.