Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dataC_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高宇
dataC_api
Commits
0dfba35b
Commit
0dfba35b
authored
May 27, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.文件上传
parent
f61474de
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
800 additions
and
0 deletions
+800
-0
OssInfoController.java
...org/rcisoft/bus/ossinfo/controller/OssInfoController.java
+127
-0
OssInfoRepository.java
...n/java/org/rcisoft/bus/ossinfo/dao/OssInfoRepository.java
+29
-0
OssInfo.java
src/main/java/org/rcisoft/bus/ossinfo/entity/OssInfo.java
+109
-0
OssInfoService.java
.../java/org/rcisoft/bus/ossinfo/service/OssInfoService.java
+68
-0
OssInfoServiceImpl.java
.../rcisoft/bus/ossinfo/service/impl/OssInfoServiceImpl.java
+122
-0
OssInfoMapper_mysql.xml
...sources/mapper/bus/ossinfo/mapper/OssInfoMapper_mysql.xml
+96
-0
OssInfoMapper_oraclel.xml
...urces/mapper/bus/ossinfo/mapper/OssInfoMapper_oraclel.xml
+83
-0
OssInfoMapper_postgresql.xml
...es/mapper/bus/ossinfo/mapper/OssInfoMapper_postgresql.xml
+83
-0
OssInfoMapper_sqlserver.xml
...ces/mapper/bus/ossinfo/mapper/OssInfoMapper_sqlserver.xml
+83
-0
No files found.
src/main/java/org/rcisoft/bus/ossinfo/controller/OssInfoController.java
0 → 100644
View file @
0dfba35b
package
org
.
rcisoft
.
bus
.
ossinfo
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.CyResult
;
import
org.rcisoft.core.util.CyResultGenUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.constant.CyMessCons
;
import
org.rcisoft.core.controller.CyPaginationController
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.exception.CyServiceException
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
org.rcisoft.bus.ossinfo.entity.OssInfo
;
import
org.rcisoft.bus.ossinfo.service.OssInfoService
;
import
java.util.List
;
/**
* Created by cy on 2024年5月27日 下午3:19:03.
*/
@RestController
@RequestMapping
(
"/ossinfo"
)
public
class
OssInfoController
extends
CyPaginationController
<
OssInfo
>
{
@Autowired
private
OssInfoService
ossInfoServiceImpl
;
//@PreAuthorize("@cyPerm.hasPerm('sys:info:add')")
@CyOpeLogAnno
(
title
=
"system-OssInfo管理-新增OssInfo"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加OssInfo"
,
notes
=
"添加OssInfo"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
OssInfo
ossInfo
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
ossInfoServiceImpl
.
persist
(
ossInfo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
ossInfo
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:info:delete')")
@CyOpeLogAnno
(
title
=
"system-OssInfo管理-删除OssInfo"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"删除OssInfo"
,
notes
=
"删除OssInfo"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/deleteLogical/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
int
businessId
,
OssInfo
ossInfo
)
{
ossInfo
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
ossInfoServiceImpl
.
remove
(
ossInfo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:info:update')")
@CyOpeLogAnno
(
title
=
"system-OssInfo管理-修改OssInfo"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改OssInfo"
,
notes
=
"修改OssInfo"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{businessId:\\w+}"
)
public
CyResult
update
(
@PathVariable
int
businessId
,
@Valid
OssInfo
ossInfo
,
BindingResult
bindingResult
)
{
ossInfo
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
ossInfoServiceImpl
.
merge
(
ossInfo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
ossInfo
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:info:query')")
@CyOpeLogAnno
(
title
=
"system-OssInfo管理-查询OssInfo"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询单一OssInfo"
,
notes
=
"查询单一OssInfo"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@GetMapping
(
"/detail/{businessId:\\w+}"
)
public
CyResult
detail
(
@PathVariable
int
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
ossInfoServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:info:list')")
@CyOpeLogAnno
(
title
=
"system-OssInfo管理-查询OssInfo"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询OssInfo集合"
,
notes
=
"查询OssInfo集合"
)
@GetMapping
(
value
=
"/listAll"
)
public
CyResult
listAll
(
OssInfo
ossInfo
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
ossInfoServiceImpl
.
findAll
(
ossInfo
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:info:list')")
@CyOpeLogAnno
(
title
=
"system-OssInfo管理-查询OssInfo"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询OssInfo集合"
,
notes
=
"分页查询OssInfo集合"
)
@GetMapping
(
value
=
"/list"
)
public
CyGridModel
listByPagination
(
OssInfo
ossInfo
)
{
ossInfoServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
ossInfo
);
return
getGridModelResponse
();
}
@CyOpeLogAnno
(
title
=
"system-OssInfo管理-查询OssInfo"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出OssInfo信息"
,
notes
=
"导出OssInfo信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
outOssInfo
(
HttpServletResponse
response
,
OssInfo
ossInfo
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
switch
(
excelId
){
case
"0"
:
excelName
=
"OssInfo信息.xls"
;
break
;
case
"1"
:
excelName
=
"OssInfo信息.xlsx"
;
break
;
case
"2"
:
excelName
=
"OssInfo信息.csv"
;
break
;
}
List
<
OssInfo
>
ossInfoList
=
ossInfoServiceImpl
.
export
(
ossInfo
);
CyEpExcelUtil
.
exportExcel
(
ossInfoList
,
"OssInfo信息"
,
"OssInfo信息"
,
OssInfo
.
class
,
excelName
,
response
);
}
}
src/main/java/org/rcisoft/bus/ossinfo/dao/OssInfoRepository.java
0 → 100644
View file @
0dfba35b
package
org
.
rcisoft
.
bus
.
ossinfo
.
dao
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.bus.ossinfo.entity.OssInfo
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.rcisoft.core.model.CyPageInfo
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.List
;
/**
* Created with cy on 2024年5月27日 下午3:19:03.
*/
public
interface
OssInfoRepository
extends
CyBaseMapper
<
OssInfo
>
{
List
<
OssInfo
>
queryOssInfos
(
@Param
(
"entity"
)
OssInfo
ossInfo
);
/**
* 分页查询 ossInfo
*
*/
IPage
<
OssInfo
>
queryOssInfosPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
OssInfo
ossInfo
);
}
src/main/java/org/rcisoft/bus/ossinfo/entity/OssInfo.java
0 → 100644
View file @
0dfba35b
package
org
.
rcisoft
.
bus
.
ossinfo
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
org.rcisoft.core.entity.CyIdNotDataEntity
;
import
org.springframework.beans.factory.annotation.Value
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created with cy on 2024年5月27日 下午3:19:03.
*/
@Data
@TableName
(
"oss_info"
)
public
class
OssInfo
extends
CyIdIncreEntity
<
OssInfo
>
{
/**
* @desc bucket
* @column bucket
* @default
*/
@Excel
(
name
=
"bucket"
,
orderNum
=
"0"
,
width
=
20
)
private
String
bucket
;
/**
* @desc path
* @column path
* @default
*/
@Excel
(
name
=
"path"
,
orderNum
=
"1"
,
width
=
20
)
private
String
path
;
/**
* @desc ossKey
* @column oss_key
* @default
*/
@Excel
(
name
=
"ossKey"
,
orderNum
=
"2"
,
width
=
20
)
private
String
ossKey
;
/**
* @desc md5
* @column md5
* @default
*/
private
String
md5
;
/**
* @desc etag
* @column e_tag
* @default
*/
private
String
eTag
;
/**
* @desc url
* @column url
* @default
*/
private
String
url
;
/**
* @desc fileSize
* @column file_size
* @default
*/
@Excel
(
name
=
"fileSize"
,
orderNum
=
"6"
,
width
=
20
)
private
Integer
fileSize
;
/**
* @desc fileType
* @column file_type
* @default
*/
@Excel
(
name
=
"fileType"
,
orderNum
=
"7"
,
width
=
20
)
private
String
fileType
;
/**
* @desc originalName
* @column original_name
* @default
*/
@Excel
(
name
=
"originalName"
,
orderNum
=
"8"
,
width
=
20
)
private
String
originalName
;
/**
* @desc toPdfUrl
* @column to_pdf_url
* @default
*/
private
String
toPdfUrl
;
/**
* ids
* **/
@TableField
(
exist
=
false
)
private
String
ids
;
}
src/main/java/org/rcisoft/bus/ossinfo/service/OssInfoService.java
0 → 100644
View file @
0dfba35b
package
org
.
rcisoft
.
bus
.
ossinfo
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.rcisoft.bus.ossinfo.entity.OssInfo
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
/**
* Created by cy on 2024年5月27日 下午3:19:03.
*/
public
interface
OssInfoService
{
/**
* 保存
* @param ossInfo
* @return
*/
CyPersistModel
persist
(
OssInfo
ossInfo
);
/**
* 删除
* @param ossInfo
* @return
*/
CyPersistModel
remove
(
OssInfo
ossInfo
);
/**
* 修改
* @param ossInfo
* @return
*/
CyPersistModel
merge
(
OssInfo
ossInfo
);
/**
* 根据id查询
* @param id
* @return
*/
OssInfo
findById
(
int
id
);
/**
* 分页查询
* @param ossInfo
* @return
*/
IPage
<
OssInfo
>
findAllByPagination
(
CyPageInfo
<
OssInfo
>
paginationUtility
,
OssInfo
ossInfo
);
/**
* 查询list
* @param ossInfo
* @return
*/
List
<
OssInfo
>
findAll
(
OssInfo
ossInfo
);
/**
* 导出
* @return
*/
List
<
OssInfo
>
export
(
OssInfo
ossInfo
);
}
src/main/java/org/rcisoft/bus/ossinfo/service/impl/OssInfoServiceImpl.java
0 → 100644
View file @
0dfba35b
package
org
.
rcisoft
.
bus
.
ossinfo
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.util.CyEpExcelUtil
;
import
org.rcisoft.bus.ossinfo.dao.OssInfoRepository
;
import
org.rcisoft.bus.ossinfo.entity.OssInfo
;
import
org.rcisoft.bus.ossinfo.service.OssInfoService
;
import
org.rcisoft.core.service.CyBaseService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by cy on 2024年5月27日 下午3:19:03.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
OssInfoServiceImpl
extends
ServiceImpl
<
OssInfoRepository
,
OssInfo
>
implements
OssInfoService
{
/**
* 保存
* @param ossInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
OssInfo
ossInfo
){
//增加操作
int
line
=
baseMapper
.
insert
(
ossInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
ossInfo
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除
* @param ossInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
OssInfo
ossInfo
){
ossInfo
.
setDeleted
();
int
line
=
baseMapper
.
deleteById
(
ossInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
ossInfo
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改
* @param ossInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
OssInfo
ossInfo
){
int
line
=
baseMapper
.
updateById
(
ossInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
ossInfo
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询
* @param id
* @return
*/
@Override
public
OssInfo
findById
(
int
id
){
return
baseMapper
.
selectById
(
id
);
}
/**
* 分页查询
* @param ossInfo
* @return
*/
@Override
public
IPage
<
OssInfo
>
findAllByPagination
(
CyPageInfo
<
OssInfo
>
paginationUtility
,
OssInfo
ossInfo
){
return
baseMapper
.
queryOssInfosPaged
(
paginationUtility
,
ossInfo
);
}
/**
* 查询list
* @param ossInfo
* @return
*/
@Override
public
List
<
OssInfo
>
findAll
(
OssInfo
ossInfo
){
return
baseMapper
.
queryOssInfos
(
ossInfo
);
}
/**
* 导出
* @return
*/
@Override
public
List
<
OssInfo
>
export
(
OssInfo
ossInfo
)
{
List
<
OssInfo
>
ossInfoList
=
baseMapper
.
queryOssInfos
(
ossInfo
);
return
ossInfoList
;
}
}
src/main/resources/mapper/bus/ossinfo/mapper/OssInfoMapper_mysql.xml
0 → 100644
View file @
0dfba35b
<?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=
"org.rcisoft.bus.ossinfo.dao.OssInfoRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.bus.ossinfo.entity.OssInfo"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"bucket"
jdbcType=
"VARCHAR"
property=
"bucket"
/>
<result
column=
"path"
jdbcType=
"VARCHAR"
property=
"path"
/>
<result
column=
"oss_key"
jdbcType=
"VARCHAR"
property=
"ossKey"
/>
<result
column=
"md5"
jdbcType=
"VARCHAR"
property=
"md5"
/>
<result
column=
"e_tag"
jdbcType=
"VARCHAR"
property=
"eTag"
/>
<result
column=
"url"
jdbcType=
"VARCHAR"
property=
"url"
/>
<result
column=
"file_size"
jdbcType=
"INTEGER"
property=
"fileSize"
/>
<result
column=
"file_type"
jdbcType=
"VARCHAR"
property=
"fileType"
/>
<result
column=
"original_name"
jdbcType=
"VARCHAR"
property=
"originalName"
/>
<result
column=
"to_pdf_url"
jdbcType=
"VARCHAR"
property=
"toPdfUrl"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/> _oracle-->
<select
id=
"queryOssInfos"
resultMap=
"BaseResultMap"
databaseId=
"mysql"
>
select * from oss_info
where 1=1
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.ids != null and entity.ids != ''"
>
and business_id in
<foreach
collection=
"entity.ids.split(',')"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryOssInfosPaged"
resultMap=
"BaseResultMap"
databaseId=
"mysql"
>
select * from oss_info
where del_flag = '0'
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
</mapper>
src/main/resources/mapper/bus/ossinfo/mapper/OssInfoMapper_oraclel.xml
0 → 100644
View file @
0dfba35b
<?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=
"org.rcisoft.bus.ossinfo.dao.OssInfoRepository"
>
<!--<cache type="${corePackag!}.util.RedisCache"/> postgresql-->
<select
id=
"queryOssInfos"
resultMap=
"BaseResultMap"
databaseId=
"oracle"
>
select * from oss_info
where 1=1
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.ids != null and entity.ids != ''"
>
and business_id in
<foreach
collection=
"entity.ids.split(',')"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryOssInfosPaged"
resultMap=
"BaseResultMap"
databaseId=
"oracle"
>
select * from oss_info
where del_flag = '0'
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
</mapper>
src/main/resources/mapper/bus/ossinfo/mapper/OssInfoMapper_postgresql.xml
0 → 100644
View file @
0dfba35b
<?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=
"org.rcisoft.bus.ossinfo.dao.OssInfoRepository"
>
<!--<cache type="${corePackag!}.util.RedisCache"/> sqlserver-->
<select
id=
"queryOssInfos"
resultMap=
"BaseResultMap"
databaseId=
"postgresql"
>
select * from oss_info
where 1=1
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.ids != null and entity.ids != ''"
>
and business_id in
<foreach
collection=
"entity.ids.split(',')"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryOssInfosPaged"
resultMap=
"BaseResultMap"
databaseId=
"postgresql"
>
select * from oss_info
where del_flag = '0'
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
</mapper>
src/main/resources/mapper/bus/ossinfo/mapper/OssInfoMapper_sqlserver.xml
0 → 100644
View file @
0dfba35b
<?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=
"org.rcisoft.bus.ossinfo.dao.OssInfoRepository"
>
<!--<cache type="${corePackag!}.util.RedisCache"/> sqlserver-->
<select
id=
"queryOssInfos"
resultMap=
"BaseResultMap"
databaseId=
"sqlserver"
>
select * from oss_info
where 1=1
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.ids != null and entity.ids != ''"
>
and business_id in
<foreach
collection=
"entity.ids.split(',')"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
<select
id=
"queryOssInfosPaged"
resultMap=
"BaseResultMap"
databaseId=
"sqlserver"
>
select * from oss_info
where del_flag = '0'
<if
test=
"entity.bucket !=null and entity.bucket != '' "
>
and bucket like concat('%',#{entity.bucket},'%')
</if>
<if
test=
"entity.path !=null and entity.path != '' "
>
and path like concat('%',#{entity.path},'%')
</if>
<if
test=
"entity.ossKey !=null and entity.ossKey != '' "
>
and oss_key like concat('%',#{entity.ossKey},'%')
</if>
<if
test=
"entity.md5 !=null and entity.md5 != '' "
>
and md5 like concat('%',#{entity.md5},'%')
</if>
<if
test=
"entity.eTag !=null and entity.eTag != '' "
>
and e_tag like concat('%',#{entity.eTag},'%')
</if>
<if
test=
"entity.url !=null and entity.url != '' "
>
and url like concat('%',#{entity.url},'%')
</if>
<if
test=
"entity.fileSize !=null and entity.fileSize != '' "
>
and file_size = #{entity.fileSize}
</if>
<if
test=
"entity.fileType !=null and entity.fileType != '' "
>
and file_type like concat('%',#{entity.fileType},'%')
</if>
<if
test=
"entity.originalName !=null and entity.originalName != '' "
>
and original_name like concat('%',#{entity.originalName},'%')
</if>
<if
test=
"entity.toPdfUrl !=null and entity.toPdfUrl != '' "
>
and to_pdf_url like concat('%',#{entity.toPdfUrl},'%')
</if>
ORDER BY business_id DESC
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment