- 清理被错误提交的 target
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
spring:
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
enabled: false # 暂时不用了
|
||||
url: http://127.0.0.1:18097
|
||||
|
||||
|
||||
#management:
|
||||
# endpoints:
|
||||
# web:
|
||||
# exposure:
|
||||
# include: "*"
|
||||
# server:
|
||||
# port: 19083 # 配置独立端口。而该端口,不使用 nginx 对外暴露,从而不配置安全认证。也就是说,内网环境可访问,外网环境不可访问。当然,这么做的前提是,认为内网安全。
|
||||
|
||||
swagger:
|
||||
enable: true # 暂时不去掉
|
||||
@@ -1,42 +0,0 @@
|
||||
spring:
|
||||
application:
|
||||
name: admin-application
|
||||
cloud:
|
||||
sentinel:
|
||||
transport:
|
||||
port: 8719
|
||||
dashboard: localhost:12088
|
||||
metric:
|
||||
charset: UTF-8
|
||||
eager: false
|
||||
|
||||
# server
|
||||
server:
|
||||
port: 18083
|
||||
servlet:
|
||||
context-path: /admin-api/
|
||||
|
||||
admins:
|
||||
security:
|
||||
ignore_urls: /admin-api/admins/passport/login, /admin-api/admins/file/get_qiniu_token
|
||||
|
||||
# qiniu
|
||||
qiniu:
|
||||
access-key: YldfyUC7OewoWM63TPYTairqnq8GMJvNek9EGoID
|
||||
secret-key: zZ7Q8wwZRyaklVvkyLmVydA4WygOBqtc_gTYzalS
|
||||
bucket: onemall
|
||||
|
||||
swagger:
|
||||
enable: true # 暂时不去掉
|
||||
title: 管理员子系统
|
||||
description: 管理员子系统
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.mall.admin.application.controller
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,env,metrics,prometheus
|
||||
metrics:
|
||||
enabled: true
|
||||
@@ -1,155 +0,0 @@
|
||||
package cn.iocoder.mall.admin.application.convert;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.admin.api.bo.admin.AdminBO;
|
||||
import cn.iocoder.mall.admin.api.bo.role.RoleBO;
|
||||
import cn.iocoder.mall.admin.application.vo.admin.AdminInfoVO;
|
||||
import cn.iocoder.mall.admin.application.vo.admin.AdminRoleVO;
|
||||
import cn.iocoder.mall.admin.application.vo.admin.AdminVO;
|
||||
import cn.iocoder.mall.admin.application.vo.admin.AdminVO.Role;
|
||||
import cn.iocoder.mall.admin.sdk.context.AdminSecurityContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:11:49+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class AdminConvertImpl implements AdminConvert {
|
||||
|
||||
@Override
|
||||
public AdminInfoVO convert(AdminSecurityContext adminSecurityContext) {
|
||||
if ( adminSecurityContext == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminInfoVO adminInfoVO = new AdminInfoVO();
|
||||
|
||||
adminInfoVO.setAdminId( adminSecurityContext.getAdminId() );
|
||||
Set<Integer> set = adminSecurityContext.getRoleIds();
|
||||
if ( set != null ) {
|
||||
adminInfoVO.setRoleIds( new HashSet<Integer>( set ) );
|
||||
}
|
||||
|
||||
return adminInfoVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminVO convert(AdminBO adminBO) {
|
||||
if ( adminBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminVO adminVO = new AdminVO();
|
||||
|
||||
adminVO.setId( adminBO.getId() );
|
||||
adminVO.setUsername( adminBO.getUsername() );
|
||||
adminVO.setNickname( adminBO.getNickname() );
|
||||
adminVO.setStatus( adminBO.getStatus() );
|
||||
adminVO.setCreateTime( adminBO.getCreateTime() );
|
||||
|
||||
return adminVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<AdminVO> convert2(CommonResult<AdminBO> result) {
|
||||
if ( result == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CommonResult<AdminVO> commonResult = new CommonResult<AdminVO>();
|
||||
|
||||
commonResult.setCode( result.getCode() );
|
||||
commonResult.setMessage( result.getMessage() );
|
||||
commonResult.setData( convert( result.getData() ) );
|
||||
|
||||
return commonResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdminRoleVO> convert(List<RoleBO> roleList) {
|
||||
if ( roleList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminRoleVO> list = new ArrayList<AdminRoleVO>( roleList.size() );
|
||||
for ( RoleBO roleBO : roleList ) {
|
||||
list.add( roleBOToAdminRoleVO( roleBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AdminVO> convertAdminVOPage(PageResult<AdminBO> page) {
|
||||
if ( page == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
PageResult<AdminVO> pageResult = new PageResult<AdminVO>();
|
||||
|
||||
pageResult.setList( adminBOListToAdminVOList( page.getList() ) );
|
||||
pageResult.setTotal( page.getTotal() );
|
||||
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Role> convertAdminVORoleList(Collection<RoleBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Role> list1 = new ArrayList<Role>( list.size() );
|
||||
for ( RoleBO roleBO : list ) {
|
||||
list1.add( roleBOToRole( roleBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected AdminRoleVO roleBOToAdminRoleVO(RoleBO roleBO) {
|
||||
if ( roleBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminRoleVO adminRoleVO = new AdminRoleVO();
|
||||
|
||||
adminRoleVO.setId( roleBO.getId() );
|
||||
adminRoleVO.setName( roleBO.getName() );
|
||||
|
||||
return adminRoleVO;
|
||||
}
|
||||
|
||||
protected List<AdminVO> adminBOListToAdminVOList(List<AdminBO> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminVO> list1 = new ArrayList<AdminVO>( list.size() );
|
||||
for ( AdminBO adminBO : list ) {
|
||||
list1.add( convert( adminBO ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected Role roleBOToRole(RoleBO roleBO) {
|
||||
if ( roleBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Role role = new Role();
|
||||
|
||||
role.setId( roleBO.getId() );
|
||||
role.setName( roleBO.getName() );
|
||||
|
||||
return role;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package cn.iocoder.mall.admin.application.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO;
|
||||
import cn.iocoder.mall.admin.application.vo.datadict.DataDictEnumVO.Value;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:11:48+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class DataDictConvertImpl implements DataDictConvert {
|
||||
|
||||
@Override
|
||||
public List<Value> convert2(List<DataDictBO> dataDictBOs) {
|
||||
if ( dataDictBOs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Value> list = new ArrayList<Value>( dataDictBOs.size() );
|
||||
for ( DataDictBO dataDictBO : dataDictBOs ) {
|
||||
list.add( dataDictBOToValue( dataDictBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected Value dataDictBOToValue(DataDictBO dataDictBO) {
|
||||
if ( dataDictBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Value value = new Value();
|
||||
|
||||
value.setValue( dataDictBO.getValue() );
|
||||
value.setDisplayName( dataDictBO.getDisplayName() );
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package cn.iocoder.mall.admin.application.convert;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO;
|
||||
import cn.iocoder.mall.admin.application.vo.PassportLoginVO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:11:49+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class PassportConvertImpl implements PassportConvert {
|
||||
|
||||
@Override
|
||||
public PassportLoginVO convert(OAuth2AccessTokenBO oauth2AccessTokenBO) {
|
||||
if ( oauth2AccessTokenBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
PassportLoginVO passportLoginVO = new PassportLoginVO();
|
||||
|
||||
passportLoginVO.setAccessToken( oauth2AccessTokenBO.getAccessToken() );
|
||||
passportLoginVO.setRefreshToken( oauth2AccessTokenBO.getRefreshToken() );
|
||||
passportLoginVO.setExpiresIn( oauth2AccessTokenBO.getExpiresIn() );
|
||||
|
||||
return passportLoginVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PassportLoginVO> convert(CommonResult<OAuth2AccessTokenBO> oauth2AccessTokenBO) {
|
||||
if ( oauth2AccessTokenBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CommonResult<PassportLoginVO> commonResult = new CommonResult<PassportLoginVO>();
|
||||
|
||||
commonResult.setCode( oauth2AccessTokenBO.getCode() );
|
||||
commonResult.setMessage( oauth2AccessTokenBO.getMessage() );
|
||||
commonResult.setData( convert( oauth2AccessTokenBO.getData() ) );
|
||||
|
||||
return commonResult;
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package cn.iocoder.mall.admin.application.convert;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.admin.api.bo.resource.ResourceBO;
|
||||
import cn.iocoder.mall.admin.application.vo.admin.AdminMenuTreeNodeVO;
|
||||
import cn.iocoder.mall.admin.application.vo.resource.ResourceTreeNodeVO;
|
||||
import cn.iocoder.mall.admin.application.vo.resource.ResourceVO;
|
||||
import cn.iocoder.mall.admin.application.vo.role.RoleResourceTreeNodeVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:11:49+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ResourceConvertImpl implements ResourceConvert {
|
||||
|
||||
@Override
|
||||
public AdminMenuTreeNodeVO convert(ResourceBO resourceBO) {
|
||||
if ( resourceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminMenuTreeNodeVO adminMenuTreeNodeVO = new AdminMenuTreeNodeVO();
|
||||
|
||||
adminMenuTreeNodeVO.setId( resourceBO.getId() );
|
||||
adminMenuTreeNodeVO.setHandler( resourceBO.getHandler() );
|
||||
adminMenuTreeNodeVO.setPid( resourceBO.getPid() );
|
||||
adminMenuTreeNodeVO.setSort( resourceBO.getSort() );
|
||||
adminMenuTreeNodeVO.setDisplayName( resourceBO.getDisplayName() );
|
||||
|
||||
return adminMenuTreeNodeVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceTreeNodeVO convert2(ResourceBO resourceBO) {
|
||||
if ( resourceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ResourceTreeNodeVO resourceTreeNodeVO = new ResourceTreeNodeVO();
|
||||
|
||||
resourceTreeNodeVO.setId( resourceBO.getId() );
|
||||
resourceTreeNodeVO.setType( resourceBO.getType() );
|
||||
resourceTreeNodeVO.setSort( resourceBO.getSort() );
|
||||
resourceTreeNodeVO.setDisplayName( resourceBO.getDisplayName() );
|
||||
resourceTreeNodeVO.setPid( resourceBO.getPid() );
|
||||
resourceTreeNodeVO.setHandler( resourceBO.getHandler() );
|
||||
resourceTreeNodeVO.setIcon( resourceBO.getIcon() );
|
||||
List<String> list = resourceBO.getPermissions();
|
||||
if ( list != null ) {
|
||||
resourceTreeNodeVO.setPermissions( new ArrayList<String>( list ) );
|
||||
}
|
||||
resourceTreeNodeVO.setCreateTime( resourceBO.getCreateTime() );
|
||||
|
||||
return resourceTreeNodeVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoleResourceTreeNodeVO convert4(ResourceBO resourceBO) {
|
||||
if ( resourceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
RoleResourceTreeNodeVO roleResourceTreeNodeVO = new RoleResourceTreeNodeVO();
|
||||
|
||||
roleResourceTreeNodeVO.setId( resourceBO.getId() );
|
||||
roleResourceTreeNodeVO.setHandler( resourceBO.getHandler() );
|
||||
roleResourceTreeNodeVO.setPid( resourceBO.getPid() );
|
||||
roleResourceTreeNodeVO.setSort( resourceBO.getSort() );
|
||||
roleResourceTreeNodeVO.setDisplayName( resourceBO.getDisplayName() );
|
||||
|
||||
return roleResourceTreeNodeVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceVO convert3(ResourceBO resourceBO) {
|
||||
if ( resourceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ResourceVO resourceVO = new ResourceVO();
|
||||
|
||||
resourceVO.setId( resourceBO.getId() );
|
||||
resourceVO.setType( resourceBO.getType() );
|
||||
resourceVO.setSort( resourceBO.getSort() );
|
||||
resourceVO.setDisplayName( resourceBO.getDisplayName() );
|
||||
resourceVO.setCreateTime( resourceBO.getCreateTime() );
|
||||
resourceVO.setPid( resourceBO.getPid() );
|
||||
resourceVO.setHandler( resourceBO.getHandler() );
|
||||
|
||||
return resourceVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<ResourceVO> convert3(CommonResult<ResourceBO> resourceBO) {
|
||||
if ( resourceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CommonResult<ResourceVO> commonResult = new CommonResult<ResourceVO>();
|
||||
|
||||
commonResult.setCode( resourceBO.getCode() );
|
||||
commonResult.setMessage( resourceBO.getMessage() );
|
||||
commonResult.setData( convert3( resourceBO.getData() ) );
|
||||
|
||||
return commonResult;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.iocoder.mall.admin.application.convert;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:11:49+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class RoleConvertImpl implements RoleConvert {
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.88.14:3306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
@@ -1,4 +0,0 @@
|
||||
##################### 业务模块 #####################
|
||||
## OAuth2CodeService
|
||||
modules.oauth2-code-service.access-token-expire-time-millis = 2880000
|
||||
modules.oauth2-code-service.refresh-token-expire-time-millis = 43200000
|
||||
@@ -1,67 +0,0 @@
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://180.167.213.26:13306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
|
||||
# mybatis
|
||||
#mybatis:
|
||||
# config-location: classpath:mybatis-config.xml
|
||||
# mapper-locations: classpath:mapper/*.xml
|
||||
# type-aliases-package: cn.iocoder.mall.admin.dataobject
|
||||
|
||||
# mybatis-plus
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
mapper-locations: classpath*:mapper/*.xml
|
||||
type-aliases-package: cn.iocoder.mall.admin.dataobject
|
||||
|
||||
# sms
|
||||
sms:
|
||||
yunPian:
|
||||
apiKey:
|
||||
aliYun:
|
||||
accessKeyId:
|
||||
accessSecret:
|
||||
|
||||
# dubbo
|
||||
dubbo:
|
||||
application:
|
||||
name: admin-service
|
||||
registry:
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
scan:
|
||||
base-packages: cn.iocoder.mall.admin.service
|
||||
provider:
|
||||
filter: -exception
|
||||
AdminAccessLogService:
|
||||
version: 1.0.0
|
||||
AdminService:
|
||||
version: 1.0.0
|
||||
DataDictService:
|
||||
version: 1.0.0
|
||||
OAuth2Service:
|
||||
version: 1.0.0
|
||||
ResourceService:
|
||||
version: 1.0.0
|
||||
RoleService:
|
||||
version: 1.0.0
|
||||
SmsService:
|
||||
version: 1.0.0
|
||||
|
||||
# logging
|
||||
logging:
|
||||
level:
|
||||
# dao 开启 debug 模式 mybatis 输入 sql
|
||||
cn.iocoder.mall.admin.dao: debug
|
||||
@@ -1,14 +0,0 @@
|
||||
<?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="cn.iocoder.mall.admin.dao.AdminRoleMapper">
|
||||
|
||||
<insert id="insertList">
|
||||
INSERT INTO admin_role (
|
||||
admin_id, role_id, create_time, deleted
|
||||
) VALUES
|
||||
<foreach collection="adminRoleDOs" item="adminRole" separator=",">
|
||||
(#{adminRole.adminId}, #{adminRole.roleId}, #{adminRole.createTime}, #{adminRole.deleted})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?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="cn.iocoder.mall.admin.dao.DataDictMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, enum_value, value, display_name, sort,
|
||||
memo, create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByEnumValueAndValue" resultType="DataDictDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM data_dict
|
||||
WHERE enum_value = #{enumValue}
|
||||
AND value = #{value}
|
||||
AND deleted = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectByEnumValueAndValues" resultType="cn.iocoder.mall.admin.dataobject.DataDictDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM data_dict
|
||||
WHERE deleted = 0
|
||||
AND enum_value = #{enumValue}
|
||||
AND `value` IN
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectByEnumValue" resultType="cn.iocoder.mall.admin.dataobject.DataDictDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM data_dict
|
||||
WHERE deleted = 0
|
||||
AND enum_value = #{enumValue}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?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="cn.iocoder.mall.admin.dao.ResourceMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, type, sort, display_name, icon, permissions,
|
||||
create_time, pid, handler
|
||||
</sql>
|
||||
|
||||
<select id="selectListByTypeAndRoleIds" resultType="ResourceDO">
|
||||
SELECT
|
||||
r.id, r.type, r.sort, r.display_name,
|
||||
r.create_time, r.pid, r.handler
|
||||
FROM resource r, role_resource rr
|
||||
WHERE r.deleted = 0
|
||||
AND rr.deleted = 0
|
||||
<if test="type != null">
|
||||
AND r.type = #{type}
|
||||
</if>
|
||||
AND rr.role_id IN
|
||||
<foreach item="roleId" collection="roleIds" separator="," open="(" close=")" index="">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
AND r.id = rr.resource_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?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="cn.iocoder.mall.admin.dao.RoleResourceMapper">
|
||||
|
||||
<insert id="insertList">
|
||||
INSERT INTO role_resource (
|
||||
resource_id, role_id, create_time, deleted
|
||||
) VALUES
|
||||
<foreach collection="roleResources" item="roleResource" separator=",">
|
||||
(#{roleResource.resourceId}, #{roleResource.roleId}, #{roleResource.createTime}, #{roleResource.deleted})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -1,70 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO;
|
||||
import cn.iocoder.mall.admin.api.dto.systemlog.ExceptionLogAddDTO;
|
||||
import cn.iocoder.mall.admin.dataobject.AccessLogDO;
|
||||
import cn.iocoder.mall.admin.dataobject.ExceptionLogDO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:14+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class AccessLogConvertImpl implements AccessLogConvert {
|
||||
|
||||
@Override
|
||||
public AccessLogDO convert(AccessLogAddDTO accessLogAddDTO) {
|
||||
if ( accessLogAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AccessLogDO accessLogDO = new AccessLogDO();
|
||||
|
||||
accessLogDO.setTraceId( accessLogAddDTO.getTraceId() );
|
||||
accessLogDO.setUserId( accessLogAddDTO.getUserId() );
|
||||
accessLogDO.setUserType( accessLogAddDTO.getUserType() );
|
||||
accessLogDO.setApplicationName( accessLogAddDTO.getApplicationName() );
|
||||
accessLogDO.setUri( accessLogAddDTO.getUri() );
|
||||
accessLogDO.setQueryString( accessLogAddDTO.getQueryString() );
|
||||
accessLogDO.setMethod( accessLogAddDTO.getMethod() );
|
||||
accessLogDO.setUserAgent( accessLogAddDTO.getUserAgent() );
|
||||
accessLogDO.setIp( accessLogAddDTO.getIp() );
|
||||
accessLogDO.setStartTime( accessLogAddDTO.getStartTime() );
|
||||
accessLogDO.setResponseTime( accessLogAddDTO.getResponseTime() );
|
||||
accessLogDO.setErrorCode( accessLogAddDTO.getErrorCode() );
|
||||
accessLogDO.setErrorMessage( accessLogAddDTO.getErrorMessage() );
|
||||
|
||||
return accessLogDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExceptionLogDO convert(ExceptionLogAddDTO exceptionLogAddDTO) {
|
||||
if ( exceptionLogAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ExceptionLogDO exceptionLogDO = new ExceptionLogDO();
|
||||
|
||||
exceptionLogDO.setTraceId( exceptionLogAddDTO.getTraceId() );
|
||||
exceptionLogDO.setUserId( exceptionLogAddDTO.getUserId() );
|
||||
exceptionLogDO.setUserType( exceptionLogAddDTO.getUserType() );
|
||||
exceptionLogDO.setApplicationName( exceptionLogAddDTO.getApplicationName() );
|
||||
exceptionLogDO.setUri( exceptionLogAddDTO.getUri() );
|
||||
exceptionLogDO.setQueryString( exceptionLogAddDTO.getQueryString() );
|
||||
exceptionLogDO.setMethod( exceptionLogAddDTO.getMethod() );
|
||||
exceptionLogDO.setUserAgent( exceptionLogAddDTO.getUserAgent() );
|
||||
exceptionLogDO.setIp( exceptionLogAddDTO.getIp() );
|
||||
exceptionLogDO.setExceptionTime( exceptionLogAddDTO.getExceptionTime() );
|
||||
exceptionLogDO.setExceptionName( exceptionLogAddDTO.getExceptionName() );
|
||||
exceptionLogDO.setExceptionMessage( exceptionLogAddDTO.getExceptionMessage() );
|
||||
exceptionLogDO.setExceptionRootCauseMessage( exceptionLogAddDTO.getExceptionRootCauseMessage() );
|
||||
exceptionLogDO.setExceptionStackTrace( exceptionLogAddDTO.getExceptionStackTrace() );
|
||||
exceptionLogDO.setExceptionClassName( exceptionLogAddDTO.getExceptionClassName() );
|
||||
exceptionLogDO.setExceptionFileName( exceptionLogAddDTO.getExceptionFileName() );
|
||||
exceptionLogDO.setExceptionMethodName( exceptionLogAddDTO.getExceptionMethodName() );
|
||||
exceptionLogDO.setExceptionLineNumber( exceptionLogAddDTO.getExceptionLineNumber() );
|
||||
|
||||
return exceptionLogDO;
|
||||
}
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.admin.api.bo.admin.AdminAuthenticationBO;
|
||||
import cn.iocoder.mall.admin.api.bo.admin.AdminBO;
|
||||
import cn.iocoder.mall.admin.api.dto.admin.AdminAddDTO;
|
||||
import cn.iocoder.mall.admin.api.dto.admin.AdminUpdateDTO;
|
||||
import cn.iocoder.mall.admin.dataobject.AdminDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:13+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class AdminConvertImpl implements AdminConvert {
|
||||
|
||||
@Override
|
||||
public AdminBO convert(AdminDO adminDO) {
|
||||
if ( adminDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminBO adminBO = new AdminBO();
|
||||
|
||||
adminBO.setId( adminDO.getId() );
|
||||
adminBO.setUsername( adminDO.getUsername() );
|
||||
adminBO.setNickname( adminDO.getNickname() );
|
||||
adminBO.setStatus( adminDO.getStatus() );
|
||||
adminBO.setCreateTime( adminDO.getCreateTime() );
|
||||
|
||||
return adminBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminAuthenticationBO convert2(AdminDO admin) {
|
||||
if ( admin == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminAuthenticationBO adminAuthenticationBO = new AdminAuthenticationBO();
|
||||
|
||||
adminAuthenticationBO.setId( admin.getId() );
|
||||
adminAuthenticationBO.setNickname( admin.getNickname() );
|
||||
|
||||
return adminAuthenticationBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminDO convert(AdminAddDTO adminAddDTO) {
|
||||
if ( adminAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminDO adminDO = new AdminDO();
|
||||
|
||||
adminDO.setUsername( adminAddDTO.getUsername() );
|
||||
adminDO.setNickname( adminAddDTO.getNickname() );
|
||||
adminDO.setPassword( adminAddDTO.getPassword() );
|
||||
|
||||
return adminDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminDO convert(AdminUpdateDTO adminUpdateDTO) {
|
||||
if ( adminUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AdminDO adminDO = new AdminDO();
|
||||
|
||||
adminDO.setId( adminUpdateDTO.getId() );
|
||||
adminDO.setUsername( adminUpdateDTO.getUsername() );
|
||||
adminDO.setNickname( adminUpdateDTO.getNickname() );
|
||||
adminDO.setPassword( adminUpdateDTO.getPassword() );
|
||||
|
||||
return adminDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdminBO> convert(List<AdminDO> adminBOs) {
|
||||
if ( adminBOs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AdminBO> list = new ArrayList<AdminBO>( adminBOs.size() );
|
||||
for ( AdminDO adminDO : adminBOs ) {
|
||||
list.add( convert( adminDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AdminBO> convert(IPage<AdminDO> page) {
|
||||
if ( page == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
PageResult<AdminBO> pageResult = new PageResult<AdminBO>();
|
||||
|
||||
pageResult.setList( convert( page.getRecords() ) );
|
||||
pageResult.setTotal( (int) page.getTotal() );
|
||||
|
||||
return pageResult;
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO;
|
||||
import cn.iocoder.mall.admin.api.dto.datadict.DataDictAddDTO;
|
||||
import cn.iocoder.mall.admin.api.dto.datadict.DataDictUpdateDTO;
|
||||
import cn.iocoder.mall.admin.dataobject.DataDictDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:13+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class DataDictConvertImpl implements DataDictConvert {
|
||||
|
||||
@Override
|
||||
public DataDictDO convert(DataDictAddDTO dataDictAddDTO) {
|
||||
if ( dataDictAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
DataDictDO dataDictDO = new DataDictDO();
|
||||
|
||||
dataDictDO.setEnumValue( dataDictAddDTO.getEnumValue() );
|
||||
dataDictDO.setValue( dataDictAddDTO.getValue() );
|
||||
dataDictDO.setDisplayName( dataDictAddDTO.getDisplayName() );
|
||||
dataDictDO.setSort( dataDictAddDTO.getSort() );
|
||||
dataDictDO.setMemo( dataDictAddDTO.getMemo() );
|
||||
|
||||
return dataDictDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataDictDO convert(DataDictUpdateDTO dataDictUpdateDTO) {
|
||||
if ( dataDictUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
DataDictDO dataDictDO = new DataDictDO();
|
||||
|
||||
dataDictDO.setId( dataDictUpdateDTO.getId() );
|
||||
dataDictDO.setEnumValue( dataDictUpdateDTO.getEnumValue() );
|
||||
dataDictDO.setValue( dataDictUpdateDTO.getValue() );
|
||||
dataDictDO.setDisplayName( dataDictUpdateDTO.getDisplayName() );
|
||||
dataDictDO.setSort( dataDictUpdateDTO.getSort() );
|
||||
dataDictDO.setMemo( dataDictUpdateDTO.getMemo() );
|
||||
|
||||
return dataDictDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataDictBO convert(DataDictDO dataDictDO) {
|
||||
if ( dataDictDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
DataDictBO dataDictBO = new DataDictBO();
|
||||
|
||||
dataDictBO.setId( dataDictDO.getId() );
|
||||
dataDictBO.setEnumValue( dataDictDO.getEnumValue() );
|
||||
dataDictBO.setValue( dataDictDO.getValue() );
|
||||
dataDictBO.setDisplayName( dataDictDO.getDisplayName() );
|
||||
dataDictBO.setSort( dataDictDO.getSort() );
|
||||
dataDictBO.setMemo( dataDictDO.getMemo() );
|
||||
dataDictBO.setCreateTime( dataDictDO.getCreateTime() );
|
||||
|
||||
return dataDictBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataDictBO> convert(List<DataDictDO> dataDictDOs) {
|
||||
if ( dataDictDOs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<DataDictBO> list = new ArrayList<DataDictBO>( dataDictDOs.size() );
|
||||
for ( DataDictDO dataDictDO : dataDictDOs ) {
|
||||
list.add( convert( dataDictDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO;
|
||||
import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO;
|
||||
import cn.iocoder.mall.admin.dataobject.OAuth2AccessTokenDO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:14+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OAuth2ConvertImpl implements OAuth2Convert {
|
||||
|
||||
@Override
|
||||
public OAuth2AccessTokenBO convertToAccessToken(OAuth2AccessTokenDO oauth2AccessTokenDO) {
|
||||
if ( oauth2AccessTokenDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OAuth2AccessTokenBO oAuth2AccessTokenBO = new OAuth2AccessTokenBO();
|
||||
|
||||
oAuth2AccessTokenBO.setAccessToken( oauth2AccessTokenDO.getId() );
|
||||
oAuth2AccessTokenBO.setRefreshToken( oauth2AccessTokenDO.getRefreshToken() );
|
||||
|
||||
return oAuth2AccessTokenBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OAuth2AuthenticationBO convertToAuthentication(OAuth2AccessTokenDO oauth2AccessTokenDO) {
|
||||
if ( oauth2AccessTokenDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OAuth2AuthenticationBO oAuth2AuthenticationBO = new OAuth2AuthenticationBO();
|
||||
|
||||
oAuth2AuthenticationBO.setUserId( oauth2AccessTokenDO.getUserId() );
|
||||
oAuth2AuthenticationBO.setUserType( oauth2AccessTokenDO.getUserType() );
|
||||
|
||||
return oAuth2AuthenticationBO;
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.bo.resource.ResourceBO;
|
||||
import cn.iocoder.mall.admin.api.dto.resource.ResourceAddDTO;
|
||||
import cn.iocoder.mall.admin.api.dto.resource.ResourceUpdateDTO;
|
||||
import cn.iocoder.mall.admin.dataobject.ResourceDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:13+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class ResourceConvertImpl implements ResourceConvert {
|
||||
|
||||
@Override
|
||||
public ResourceBO convert(ResourceDO resourceDO) {
|
||||
if ( resourceDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ResourceBO resourceBO = new ResourceBO();
|
||||
|
||||
resourceBO.setPermissions( translateListFromString( resourceDO.getPermissions() ) );
|
||||
resourceBO.setId( resourceDO.getId() );
|
||||
resourceBO.setType( resourceDO.getType() );
|
||||
resourceBO.setSort( resourceDO.getSort() );
|
||||
resourceBO.setDisplayName( resourceDO.getDisplayName() );
|
||||
resourceBO.setPid( resourceDO.getPid() );
|
||||
resourceBO.setHandler( resourceDO.getHandler() );
|
||||
resourceBO.setIcon( resourceDO.getIcon() );
|
||||
resourceBO.setCreateTime( resourceDO.getCreateTime() );
|
||||
|
||||
return resourceBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResourceBO> convert(List<ResourceDO> resourceDOs) {
|
||||
if ( resourceDOs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ResourceBO> list = new ArrayList<ResourceBO>( resourceDOs.size() );
|
||||
for ( ResourceDO resourceDO : resourceDOs ) {
|
||||
list.add( convert( resourceDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceDO convert(ResourceAddDTO resourceAddDTO) {
|
||||
if ( resourceAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ResourceDO resourceDO = new ResourceDO();
|
||||
|
||||
resourceDO.setPermissions( translateStringFromList( resourceAddDTO.getPermissions() ) );
|
||||
resourceDO.setType( resourceAddDTO.getType() );
|
||||
resourceDO.setSort( resourceAddDTO.getSort() );
|
||||
resourceDO.setDisplayName( resourceAddDTO.getDisplayName() );
|
||||
resourceDO.setPid( resourceAddDTO.getPid() );
|
||||
resourceDO.setHandler( resourceAddDTO.getHandler() );
|
||||
resourceDO.setIcon( resourceAddDTO.getIcon() );
|
||||
|
||||
return resourceDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceDO convert(ResourceUpdateDTO resourceUpdateDTO) {
|
||||
if ( resourceUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ResourceDO resourceDO = new ResourceDO();
|
||||
|
||||
resourceDO.setPermissions( translateStringFromList( resourceUpdateDTO.getPermissions() ) );
|
||||
resourceDO.setId( resourceUpdateDTO.getId() );
|
||||
resourceDO.setType( resourceUpdateDTO.getType() );
|
||||
resourceDO.setSort( resourceUpdateDTO.getSort() );
|
||||
resourceDO.setDisplayName( resourceUpdateDTO.getDisplayName() );
|
||||
resourceDO.setPid( resourceUpdateDTO.getPid() );
|
||||
resourceDO.setHandler( resourceUpdateDTO.getHandler() );
|
||||
resourceDO.setIcon( resourceUpdateDTO.getIcon() );
|
||||
|
||||
return resourceDO;
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.admin.api.bo.role.RoleBO;
|
||||
import cn.iocoder.mall.admin.api.dto.role.RoleAddDTO;
|
||||
import cn.iocoder.mall.admin.api.dto.role.RoleUpdateDTO;
|
||||
import cn.iocoder.mall.admin.dataobject.RoleDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:13+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class RoleConvertImpl implements RoleConvert {
|
||||
|
||||
@Override
|
||||
public RoleDO convert(RoleAddDTO roleAddDTO) {
|
||||
if ( roleAddDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
RoleDO roleDO = new RoleDO();
|
||||
|
||||
roleDO.setName( roleAddDTO.getName() );
|
||||
|
||||
return roleDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoleDO convert(RoleUpdateDTO roleUpdateDTO) {
|
||||
if ( roleUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
RoleDO roleDO = new RoleDO();
|
||||
|
||||
roleDO.setId( roleUpdateDTO.getId() );
|
||||
roleDO.setName( roleUpdateDTO.getName() );
|
||||
|
||||
return roleDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoleBO convert(RoleDO roleDO) {
|
||||
if ( roleDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
RoleBO roleBO = new RoleBO();
|
||||
|
||||
roleBO.setId( roleDO.getId() );
|
||||
roleBO.setName( roleDO.getName() );
|
||||
roleBO.setCreateTime( roleDO.getCreateTime() );
|
||||
|
||||
return roleBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleBO> convert(List<RoleDO> roleDOs) {
|
||||
if ( roleDOs == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<RoleBO> list = new ArrayList<RoleBO>( roleDOs.size() );
|
||||
for ( RoleDO roleDO : roleDOs ) {
|
||||
list.add( convert( roleDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<RoleBO> convert(IPage<RoleDO> page) {
|
||||
if ( page == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
PageResult<RoleBO> pageResult = new PageResult<RoleBO>();
|
||||
|
||||
pageResult.setList( convert( page.getRecords() ) );
|
||||
pageResult.setTotal( (int) page.getTotal() );
|
||||
|
||||
return pageResult;
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.bo.sms.PageSmsSignBO.Sign;
|
||||
import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO;
|
||||
import cn.iocoder.mall.admin.dataobject.SmsSignDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:13+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class SmsSignConvertImpl implements SmsSignConvert {
|
||||
|
||||
@Override
|
||||
public SmsSignBO convert(SmsSignDO smsSignDO) {
|
||||
if ( smsSignDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
SmsSignBO smsSignBO = new SmsSignBO();
|
||||
|
||||
smsSignBO.setId( smsSignDO.getId() );
|
||||
smsSignBO.setSign( smsSignDO.getSign() );
|
||||
smsSignBO.setApplyStatus( smsSignDO.getApplyStatus() );
|
||||
smsSignBO.setApplyMessage( smsSignDO.getApplyMessage() );
|
||||
|
||||
return smsSignBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Sign> convert(List<SmsSignDO> smsSignDOList) {
|
||||
if ( smsSignDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Sign> list = new ArrayList<Sign>( smsSignDOList.size() );
|
||||
for ( SmsSignDO smsSignDO : smsSignDOList ) {
|
||||
list.add( smsSignDOToSign( smsSignDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected Sign smsSignDOToSign(SmsSignDO smsSignDO) {
|
||||
if ( smsSignDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Sign sign = new Sign();
|
||||
|
||||
sign.setId( smsSignDO.getId() );
|
||||
sign.setPlatform( smsSignDO.getPlatform() );
|
||||
sign.setSign( smsSignDO.getSign() );
|
||||
sign.setApplyStatus( smsSignDO.getApplyStatus() );
|
||||
sign.setApplyMessage( smsSignDO.getApplyMessage() );
|
||||
sign.setUpdateTime( smsSignDO.getUpdateTime() );
|
||||
sign.setCreateTime( smsSignDO.getCreateTime() );
|
||||
|
||||
return sign;
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO.Sign;
|
||||
import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO.Template;
|
||||
import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO;
|
||||
import cn.iocoder.mall.admin.dataobject.SmsSignDO;
|
||||
import cn.iocoder.mall.admin.dataobject.SmsTemplateDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:10:13+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class SmsTemplateConvertImpl implements SmsTemplateConvert {
|
||||
|
||||
@Override
|
||||
public SmsTemplateBO convert(SmsTemplateDO smsTemplateDO) {
|
||||
if ( smsTemplateDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
SmsTemplateBO smsTemplateBO = new SmsTemplateBO();
|
||||
|
||||
smsTemplateBO.setId( smsTemplateDO.getId() );
|
||||
smsTemplateBO.setSmsSignId( smsTemplateDO.getSmsSignId() );
|
||||
smsTemplateBO.setTemplate( smsTemplateDO.getTemplate() );
|
||||
smsTemplateBO.setApplyStatus( smsTemplateDO.getApplyStatus() );
|
||||
smsTemplateBO.setApplyMessage( smsTemplateDO.getApplyMessage() );
|
||||
|
||||
return smsTemplateBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Template> convert(List<SmsTemplateDO> smsTemplateDOList) {
|
||||
if ( smsTemplateDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Template> list = new ArrayList<Template>( smsTemplateDOList.size() );
|
||||
for ( SmsTemplateDO smsTemplateDO : smsTemplateDOList ) {
|
||||
list.add( smsTemplateDOToTemplate( smsTemplateDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Sign> convertTemplateSign(List<SmsSignDO> smsSignDOList) {
|
||||
if ( smsSignDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Sign> list = new ArrayList<Sign>( smsSignDOList.size() );
|
||||
for ( SmsSignDO smsSignDO : smsSignDOList ) {
|
||||
list.add( smsSignDOToSign( smsSignDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected Template smsTemplateDOToTemplate(SmsTemplateDO smsTemplateDO) {
|
||||
if ( smsTemplateDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Template template = new Template();
|
||||
|
||||
template.setId( smsTemplateDO.getId() );
|
||||
template.setSmsSignId( smsTemplateDO.getSmsSignId() );
|
||||
if ( smsTemplateDO.getPlatform() != null ) {
|
||||
template.setPlatform( String.valueOf( smsTemplateDO.getPlatform() ) );
|
||||
}
|
||||
template.setTemplateCode( smsTemplateDO.getTemplateCode() );
|
||||
template.setTemplate( smsTemplateDO.getTemplate() );
|
||||
template.setSmsType( smsTemplateDO.getSmsType() );
|
||||
template.setApplyStatus( smsTemplateDO.getApplyStatus() );
|
||||
template.setApplyMessage( smsTemplateDO.getApplyMessage() );
|
||||
template.setUpdateTime( smsTemplateDO.getUpdateTime() );
|
||||
template.setCreateTime( smsTemplateDO.getCreateTime() );
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
protected Sign smsSignDOToSign(SmsSignDO smsSignDO) {
|
||||
if ( smsSignDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Sign sign = new Sign();
|
||||
|
||||
sign.setId( smsSignDO.getId() );
|
||||
sign.setSign( smsSignDO.getSign() );
|
||||
sign.setApplyStatus( smsSignDO.getApplyStatus() );
|
||||
sign.setApplyMessage( smsSignDO.getApplyMessage() );
|
||||
|
||||
return sign;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user