Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
bee321e6
Commit
bee321e6
authored
Jul 02, 2021
by
wenyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签库集合查询增加条件,并支出查询无效的标签;使用场景新增上传图片功能
parent
6c7a0966
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
291 additions
and
48 deletions
+291
-48
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
+11
-3
yd-api/src/main/java/com/yd/api/agms/service/AgmsTagService.java
+4
-1
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsTagServiceImpl.java
+71
-8
yd-api/src/main/java/com/yd/api/agms/vo/tag/TagViewUpdateResponseVO.java
+19
-1
yd-api/src/main/java/com/yd/api/metadata/MetadataController.java
+6
-4
yd-api/src/main/java/com/yd/api/metadata/service/MetadataService.java
+4
-3
yd-api/src/main/java/com/yd/api/metadata/service/impl/MetadataServiceImpl.java
+76
-21
yd-api/src/main/java/com/yd/api/metadata/vo/TagQueryRequestVO.java
+79
-0
yd-api/src/main/java/com/yd/dal/mapper/meta/MdTagNewMapper.java
+2
-1
yd-api/src/main/java/com/yd/dal/service/meta/MdTagNewDALService.java
+1
-1
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdTagNewDALServiceImpl.java
+4
-2
yd-api/src/main/resources/i18n/messages_zh_CN.properties
+3
-2
yd-api/src/main/resources/mapper/meta/MdTagNewMapper.xml
+11
-1
No files found.
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
View file @
bee321e6
...
...
@@ -34,11 +34,15 @@ import com.yd.api.agms.vo.tag.TagViewUpdateRequestVO;
import
com.yd.api.agms.vo.tag.TagViewUpdateResponseVO
;
import
com.yd.api.result.JsonResult
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.JsonUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.UnsupportedEncodingException
;
import
javax.servlet.http.HttpServletResponse
;
@Controller
...
...
@@ -382,15 +386,19 @@ public class AgmsController {
return
result
;
}
/**
* AGMS -- 前端显示标签 保存与修改
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping
(
value
=
"/tagViewUpdate"
)
public
Object
tagViewUpdate
(
@RequestBody
TagViewUpdateRequestVO
requestVO
)
{
JsonResult
result
=
new
JsonResult
();
TagViewUpdateResponseVO
responseVO
=
agmsTagService
.
tagViewUpdate
(
requestVO
);
public
Object
tagViewUpdate
(
@RequestParam
(
value
=
"requestVO"
,
required
=
true
)
String
requestVO
,
@RequestParam
(
value
=
"tagViewImage"
,
required
=
false
)
MultipartFile
tagViewImage
)
throws
Exception
{
requestVO
=
new
String
(
requestVO
.
getBytes
(
"ISO-8859-1"
),
"UTF-8"
);
TagViewUpdateRequestVO
request
=
(
TagViewUpdateRequestVO
)
JsonUtil
.
jsonToObj
(
requestVO
,
TagViewUpdateRequestVO
.
class
);
JsonResult
result
=
new
JsonResult
();
TagViewUpdateResponseVO
responseVO
=
agmsTagService
.
tagViewUpdate
(
request
,
tagViewImage
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
...
...
yd-api/src/main/java/com/yd/api/agms/service/AgmsTagService.java
View file @
bee321e6
package
com
.
yd
.
api
.
agms
.
service
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.yd.api.agms.vo.tag.TagUpdateRequestVO
;
import
com.yd.api.agms.vo.tag.TagUpdateResponseVO
;
import
com.yd.api.agms.vo.tag.TagViewUpdateRequestVO
;
...
...
@@ -19,8 +21,9 @@ public interface AgmsTagService {
/**
* AGMS -- 前端显示标签 保存与修改
* @param requestVO 请求数据
* @param tagViewImage 请求文件图片
* @return 响应数据
*/
TagViewUpdateResponseVO
tagViewUpdate
(
TagViewUpdateRequestVO
requestVO
);
TagViewUpdateResponseVO
tagViewUpdate
(
TagViewUpdateRequestVO
requestVO
,
MultipartFile
tagViewImage
);
}
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsTagServiceImpl.java
View file @
bee321e6
package
com
.
yd
.
api
.
agms
.
service
.
impl
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Date
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.yd.api.agms.service.AgmsTagService
;
import
com.yd.api.agms.vo.tag.TagUpdateRequestVO
;
import
com.yd.api.agms.vo.tag.TagUpdateResponseVO
;
...
...
@@ -10,13 +19,13 @@ import com.yd.dal.entity.meta.MdTagNew;
import
com.yd.dal.entity.meta.MdTagView
;
import
com.yd.dal.service.meta.MdTagNewDALService
;
import
com.yd.dal.service.meta.MdTagViewDALService
;
import
com.yd.rmi.ali.oss.service.OssService
;
import
com.yd.rmi.ali.oss.vo.OssOperateTypeEnum
;
import
com.yd.rmi.ali.oss.vo.OssRequestVO
;
import
com.yd.rmi.ali.oss.vo.OssResponseVO
;
import
com.yd.rmi.cache.SystemConfigService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
* @author xxy
...
...
@@ -30,6 +39,12 @@ public class AgmsTagServiceImpl implements AgmsTagService {
@Autowired
public
MdTagViewDALService
mdTagViewDALService
;
@Autowired
private
SystemConfigService
systemConfigService
;
@Autowired
private
OssService
ossService
;
@Override
public
TagUpdateResponseVO
tagUpdate
(
TagUpdateRequestVO
requestVO
)
{
...
...
@@ -79,11 +94,12 @@ public class AgmsTagServiceImpl implements AgmsTagService {
/**
* AGMS -- 前端显示标签 保存与修改
* @author xxy
* @author ywenyang
* @param tagViewImage 请求文件图片
* @date 2021年06月30日 23:39
*/
@Override
public
TagViewUpdateResponseVO
tagViewUpdate
(
TagViewUpdateRequestVO
requestVO
)
{
public
TagViewUpdateResponseVO
tagViewUpdate
(
TagViewUpdateRequestVO
requestVO
,
MultipartFile
tagViewImage
)
{
TagViewUpdateResponseVO
responseVO
=
new
TagViewUpdateResponseVO
();
CommonResult
commonResult
=
new
CommonResult
();
tagViewUpdateEntryCheck
(
requestVO
,
commonResult
);
...
...
@@ -91,9 +107,55 @@ public class AgmsTagServiceImpl implements AgmsTagService {
responseVO
.
setCommonResult
(
commonResult
);
return
responseVO
;
}
//上传文件
boolean
success
=
false
;
String
message
=
""
;
String
filePathOss
=
null
;
if
(
tagViewImage
!=
null
)
{
String
originalFilename
=
null
;
String
ossKey
=
null
;
originalFilename
=
tagViewImage
.
getOriginalFilename
();
ossKey
=
"downloadfile/"
+
originalFilename
.
replaceAll
(
" "
,
""
).
replaceAll
(
" "
,
""
);
File
file
=
null
;
try
{
file
=
File
.
createTempFile
(
"tmp"
,
null
);
tagViewImage
.
transferTo
(
file
);
OssRequestVO
ossRequestVO
=
new
OssRequestVO
();
ossRequestVO
.
setOperateType
(
OssOperateTypeEnum
.
PUT_OBJECT
.
getCode
());
String
bucketName
=
systemConfigService
.
getSingleConfigValue
(
"ALI_OSS_IMAGES"
);
ossRequestVO
.
setBucketName
(
bucketName
);
ossRequestVO
.
setKey
(
ossKey
);
ossRequestVO
.
setFile
(
file
);
OssResponseVO
ossresponseVO
=
ossService
.
ossOperate
(
ossRequestVO
);
if
(
ossresponseVO
.
getCommonResult
().
isSuccess
()){
ossRequestVO
.
setOperateType
(
OssOperateTypeEnum
.
GENERATE_URL
.
getCode
());
ossresponseVO
=
ossService
.
ossOperate
(
ossRequestVO
);
filePathOss
=
ossresponseVO
.
getUrl
();
}
else
{
success
=
true
;
message
=
ossresponseVO
.
getCommonResult
().
getMessage
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
success
=
true
;
message
=
"Update FileImage error:"
+
e
.
getMessage
();
}
finally
{
if
(
file
!=
null
){
file
.
delete
();}
}
if
(
success
){
commonResult
.
setSuccess
(
false
);
commonResult
.
setMessage
(
message
);
responseVO
.
setCommonResult
(
commonResult
);
return
responseVO
;
}
}
MdTagView
mdTagView
=
new
MdTagView
();
BeanUtils
.
copyProperties
(
requestVO
,
mdTagView
);
if
(
filePathOss
!=
null
&&
!
""
.
equals
(
filePathOss
)){
mdTagView
.
setDisplayImage
(
filePathOss
);
}
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getId
())){
mdTagView
.
setCreatedAt
(
new
Date
());
mdTagView
.
setUpdatedAt
(
new
Date
());
...
...
@@ -105,6 +167,7 @@ public class AgmsTagServiceImpl implements AgmsTagService {
mdTagView
.
setUpdatedBy
(
requestVO
.
getLoginId
());
mdTagViewDALService
.
updateByPrimaryKeySelective
(
mdTagView
);
}
responseVO
.
setFilePathOss
(
mdTagView
.
getDisplayImage
());
commonResult
.
setSuccess
(
true
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"800000"
));
responseVO
.
setId
(
mdTagView
.
getId
());
...
...
yd-api/src/main/java/com/yd/api/agms/vo/tag/TagViewUpdateResponseVO.java
View file @
bee321e6
...
...
@@ -12,6 +12,9 @@ public class TagViewUpdateResponseVO {
private
CommonResult
commonResult
;
private
String
filePathOss
;
/**
* Gets the value of commonResult. *
*
...
...
@@ -47,12 +50,27 @@ public class TagViewUpdateResponseVO {
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* @return the filePathOss
*/
public
String
getFilePathOss
()
{
return
filePathOss
;
}
/**
* @param filePathOss the filePathOss to set
*/
public
void
setFilePathOss
(
String
filePathOss
)
{
this
.
filePathOss
=
filePathOss
;
}
@Override
@Override
public
String
toString
()
{
return
"TagUpdateResponseVO{"
+
"id="
+
id
+
", commonResult="
+
commonResult
+
"filePathOss="
+
filePathOss
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/metadata/MetadataController.java
View file @
bee321e6
package
com
.
yd
.
api
.
metadata
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yd.api.metadata.service.MetadataService
;
import
com.yd.api.metadata.vo.TagQueryRequestVO
;
import
com.yd.api.metadata.vo.TagQueryResponseVO
;
import
com.yd.api.metadata.vo.TagViewQueryRequestVO
;
import
com.yd.api.metadata.vo.TagViewQueryResponseVO
;
...
...
@@ -26,12 +26,13 @@ public class MetadataController {
/**
* 标签合集查询
* @param requestVO
* @return TagQueryResponseVO
*/
@
Ge
tMapping
(
"/tagQuery"
)
public
Object
tagQuery
(
@Request
Param
(
value
=
"isActive"
,
required
=
false
)
Long
isActive
){
@
Reques
tMapping
(
"/tagQuery"
)
public
Object
tagQuery
(
@Request
Body
TagQueryRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
TagQueryResponseVO
responseVO
=
metadataService
.
tagQuery
(
isActive
);
TagQueryResponseVO
responseVO
=
metadataService
.
tagQuery
(
requestVO
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
...
...
@@ -39,6 +40,7 @@ public class MetadataController {
/**
* 前端显示标签合集查询
* @param requestVO
* @return TagViewQueryResponseVO
* @date 2021年06月21日 17:14
*/
...
...
yd-api/src/main/java/com/yd/api/metadata/service/MetadataService.java
View file @
bee321e6
package
com
.
yd
.
api
.
metadata
.
service
;
import
com.yd.api.metadata.vo.TagQueryRequestVO
;
import
com.yd.api.metadata.vo.TagQueryResponseVO
;
import
com.yd.api.metadata.vo.TagViewQueryRequestVO
;
import
com.yd.api.metadata.vo.TagViewQueryResponseVO
;
...
...
@@ -7,10 +8,10 @@ import com.yd.api.metadata.vo.TagViewQueryResponseVO;
public
interface
MetadataService
{
/**
* 标签合集查询
* @param
isActive 是否启用
* @return
* @param
requestVO
* @return
TagQueryResponseVO
*/
TagQueryResponseVO
tagQuery
(
Long
isActive
);
TagQueryResponseVO
tagQuery
(
TagQueryRequestVO
requestVO
);
/**
* 前端显示标签合集查询
...
...
yd-api/src/main/java/com/yd/api/metadata/service/impl/MetadataServiceImpl.java
View file @
bee321e6
package
com
.
yd
.
api
.
metadata
.
service
.
impl
;
import
com.yd.api.agms.vo.tag.TagViewUpdateRequestVO
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.beanutils.BeanPropertyValueEqualsPredicate
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.yd.api.metadata.service.MetadataService
;
import
com.yd.api.metadata.vo.TagQueryInfo
;
import
com.yd.api.metadata.vo.TagQueryRequestVO
;
import
com.yd.api.metadata.vo.TagQueryResponseVO
;
import
com.yd.api.metadata.vo.TagViewQueryInfo
;
import
com.yd.api.metadata.vo.TagViewQueryRequestVO
;
...
...
@@ -15,15 +25,6 @@ import com.yd.dal.service.meta.MdTagViewDALService;
import
com.yd.dal.service.metadata.MetadataDALService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.apache.commons.beanutils.BeanPropertyValueEqualsPredicate
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author xxy
...
...
@@ -44,25 +45,79 @@ public class MetadataServiceImpl implements MetadataService {
@Override
@SuppressWarnings
(
"unchecked"
)
public
TagQueryResponseVO
tagQuery
(
Long
isActive
)
{
public
TagQueryResponseVO
tagQuery
(
TagQueryRequestVO
requestVO
)
{
TagQueryResponseVO
responseVO
=
new
TagQueryResponseVO
();
CommonResult
commonResult
=
new
CommonResult
();
tagQueryCheck
(
requestVO
,
commonResult
);
if
(!
commonResult
.
isSuccess
()){
responseVO
.
setCommonResult
(
commonResult
);
return
responseVO
;
}
List
<
MdTagNew
>
mdTagNewList
=
mdTagNewDalService
.
selectByIsActive
(
isActive
);
Long
isActive
=
null
,
configLevel
=
null
,
upperTagId
=
null
;
String
tagName
=
null
;
if
(
requestVO
.
getIsActive
()
!=
null
){
isActive
=
requestVO
.
getIsActive
().
longValue
();
}
if
(
requestVO
.
getConfigLevel
()
!=
null
){
configLevel
=
requestVO
.
getConfigLevel
();
}
if
(
requestVO
.
getUpperTagId
()
!=
null
){
upperTagId
=
requestVO
.
getUpperTagId
();
}
if
(!
CommonUtil
.
isNullOrBlank
(
requestVO
.
getTagName
())){
if
(
requestVO
.
getConfigLevel
()
==
null
){
commonResult
.
setSuccess
(
false
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"830036"
));
responseVO
.
setCommonResult
(
commonResult
);
return
responseVO
;
}
tagName
=
requestVO
.
getTagName
()+
"%"
;
}
List
<
MdTagNew
>
mdTagNewList
=
mdTagNewDalService
.
selectByIsActive
(
isActive
,
configLevel
,
upperTagId
,
tagName
);
List
<
TagQueryInfo
>
tagQueryInfos
=
new
ArrayList
<>(
16
);
List
<
MdTagNew
>
mdTagNewAddList
=
new
ArrayList
<>(
16
);
BeanPropertyValueEqualsPredicate
predicateClause
=
new
BeanPropertyValueEqualsPredicate
(
"configLevel"
,
1L
);
List
<
MdTagNew
>
objectListSelect
=
(
List
<
MdTagNew
>)
CollectionUtils
.
select
(
mdTagNewList
,
predicateClause
);
mdTagNewAddList
.
addAll
(
objectListSelect
);
classificationBuildUpMdTag
(
mdTagNewList
,
mdTagNewAddList
,
objectListSelect
,
tagQueryInfos
);
mdTagNewList
.
removeAll
(
mdTagNewAddList
);
uncategorizedMdTag
(
mdTagNewList
,
tagQueryInfos
);
if
(
configLevel
==
null
){
if
((
requestVO
.
getUpperTagId
()
!=
null
||
!
CommonUtil
.
isNullOrBlank
(
requestVO
.
getTagName
()))){
if
(
mdTagNewList
!=
null
&&
mdTagNewList
.
size
()
>
0
&&
mdTagNewList
.
get
(
0
)
!=
null
)
configLevel
=
((
MdTagNew
)
mdTagNewList
.
get
(
0
)).
getConfigLevel
();
}
else
{
configLevel
=
1L
;
}
}
if
(
isActive
==
null
||
isActive
==
1L
||
(
configLevel
!=
null
||
upperTagId
!=
null
||
!
CommonUtil
.
isNullOrBlank
(
requestVO
.
getTagName
()))){
List
<
MdTagNew
>
mdTagNewAddList
=
new
ArrayList
<>(
16
);
BeanPropertyValueEqualsPredicate
predicateClause
=
new
BeanPropertyValueEqualsPredicate
(
"configLevel"
,
configLevel
);
List
<
MdTagNew
>
objectListSelect
=
(
List
<
MdTagNew
>)
CollectionUtils
.
select
(
mdTagNewList
,
predicateClause
);
mdTagNewAddList
.
addAll
(
objectListSelect
);
classificationBuildUpMdTag
(
mdTagNewList
,
mdTagNewAddList
,
objectListSelect
,
tagQueryInfos
);
mdTagNewList
.
removeAll
(
mdTagNewAddList
);
// uncategorizedMdTag(mdTagNewList,tagQueryInfos);
}
else
{
for
(
MdTagNew
mdTagNew
:
mdTagNewList
)
{
TagQueryInfo
tagQueryInfo
=
new
TagQueryInfo
();
BeanUtils
.
copyProperties
(
mdTagNew
,
tagQueryInfo
);
tagQueryInfo
.
setCreatedAt
(
CommonUtil
.
dateParseString
(
mdTagNew
.
getCreatedAt
(),
"yyyy-MM-dd HH:mm:ss"
));
tagQueryInfo
.
setUpdatedAt
(
CommonUtil
.
dateParseString
(
mdTagNew
.
getUpdatedAt
(),
"yyyy-MM-dd HH:mm:ss"
));
tagQueryInfos
.
add
(
tagQueryInfo
);
}
}
responseVO
.
setTagQueryInfos
(
tagQueryInfos
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
private
void
tagQueryCheck
(
TagQueryRequestVO
requestVO
,
CommonResult
commonResult
)
{
// if (requestVO.getIsActive() == null){
// commonResult.setSuccess(false);
// commonResult.setMessage(ZHBErrorConfig.getErrorInfo("830031"));
// return;
// }
commonResult
.
setSuccess
(
true
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"800000"
));
}
@SuppressWarnings
(
"unchecked"
)
private
void
classificationBuildUpMdTag
(
List
<
MdTagNew
>
mdTagNewList
,
...
...
yd-api/src/main/java/com/yd/api/metadata/vo/TagQueryRequestVO.java
0 → 100644
View file @
bee321e6
package
com
.
yd
.
api
.
metadata
.
vo
;
/**
* @author ywenYang
* @date 2021年06月30日 23:41
*/
public
class
TagQueryRequestVO
{
private
Long
configLevel
;
//标签级别(1=一级; 2=二级; 3=三级)
private
Long
upperTagId
;
//上级标签
private
String
tagName
;
//标签名称
private
Integer
isActive
;
//
/**
* @return the configLevel
*/
public
Long
getConfigLevel
()
{
return
configLevel
;
}
/**
* @param configLevel the configLevel to set
*/
public
void
setConfigLevel
(
Long
configLevel
)
{
this
.
configLevel
=
configLevel
;
}
/**
* @return the upperTagId
*/
public
Long
getUpperTagId
()
{
return
upperTagId
;
}
/**
* @param upperTagId the upperTagId to set
*/
public
void
setUpperTagId
(
Long
upperTagId
)
{
this
.
upperTagId
=
upperTagId
;
}
/**
* @return the tagName
*/
public
String
getTagName
()
{
return
tagName
;
}
/**
* @param tagName the tagName to set
*/
public
void
setTagName
(
String
tagName
)
{
this
.
tagName
=
tagName
;
}
/**
* @return the isActive
*/
public
Integer
getIsActive
()
{
return
isActive
;
}
/**
* @param isActive the isActive to set
*/
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
@Override
public
String
toString
()
{
return
"MdTagNew{"
+
", configLevel='"
+
configLevel
+
'\''
+
", upperTagId='"
+
upperTagId
+
'\''
+
", tagName='"
+
tagName
+
'\''
+
", isActive="
+
isActive
+
'}'
;
}
}
yd-api/src/main/java/com/yd/dal/mapper/meta/MdTagNewMapper.java
View file @
bee321e6
...
...
@@ -23,5 +23,5 @@ public interface MdTagNewMapper {
int
batchInsert
(
@Param
(
"list"
)
List
<
MdTagNew
>
list
);
List
<
MdTagNew
>
selectByIsActive
(
@Param
(
"isActive"
)
Long
isActive
);
List
<
MdTagNew
>
selectByIsActive
(
@Param
(
"isActive"
)
Long
isActive
,
@Param
(
"configLevel"
)
Long
configLevel
,
@Param
(
"upperTagId"
)
Long
upperTagId
,
@Param
(
"tagName"
)
String
tagName
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/meta/MdTagNewDALService.java
View file @
bee321e6
...
...
@@ -8,7 +8,7 @@ import java.util.List;
* @author xxy
*/
public
interface
MdTagNewDALService
{
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
);
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
,
Long
configLevel
,
Long
upperTagId
,
String
tagName
);
void
insert
(
MdTagNew
mdTagNew
);
...
...
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdTagNewDALServiceImpl.java
View file @
bee321e6
...
...
@@ -3,6 +3,8 @@ package com.yd.dal.service.meta.impl;
import
com.yd.dal.entity.meta.MdTagNew
;
import
com.yd.dal.mapper.meta.MdTagNewMapper
;
import
com.yd.dal.service.meta.MdTagNewDALService
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -18,8 +20,8 @@ public class MdTagNewDALServiceImpl implements MdTagNewDALService {
public
MdTagNewMapper
mapper
;
@Override
public
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
)
{
return
mapper
.
selectByIsActive
(
isActive
);
public
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
,
Long
configLevel
,
Long
upperTagId
,
String
tagName
)
{
return
mapper
.
selectByIsActive
(
isActive
,
configLevel
,
upperTagId
,
tagName
);
}
@Override
...
...
yd-api/src/main/resources/i18n/messages_zh_CN.properties
View file @
bee321e6
...
...
@@ -49,4 +49,5 @@
830032
=
上级显示标签不存在!
830033
=
上级显示标签的标签显示类别与保存标签的显示类别不一致!
830034
=
保存标签的标签级别与上级显示标签的标签级别不能相隔多级!
830035
=
根据基础标签ID查找不到有效的基础标签!
\ No newline at end of file
830035
=
根据基础标签ID查找不到有效的基础标签!
830036
=
标签名称有值时标签级别不能为空!
\ No newline at end of file
yd-api/src/main/resources/mapper/meta/MdTagNewMapper.xml
View file @
bee321e6
...
...
@@ -274,8 +274,18 @@
<include
refid=
"Base_Column_List"
/>
from ag_md_tag_new
<where>
1 = 1
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=BIGINT}
and is_active = #{isActive,jdbcType=BIGINT}
</if>
<if
test=
"configLevel != null"
>
and config_level = #{configLevel,jdbcType=BIGINT}
</if>
<if
test=
"upperTagId != null"
>
and upper_tag_id = #{upperTagId,jdbcType=BIGINT}
</if>
<if
test=
"tagName != null"
>
and tag_name like #{tagName,jdbcType=VARCHAR}
</if>
</where>
</select>
...
...
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