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
4cc47843
Commit
4cc47843
authored
Jul 09, 2021
by
jianan
Committed by
wenyang
Jul 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签库增加tagType类型,用于区分标签类别(1=产品标签;2=客户标签;3=专家标签;4=经纪人标签)
parent
3703cc73
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
126 additions
and
21 deletions
+126
-21
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsTagServiceImpl.java
+27
-0
yd-api/src/main/java/com/yd/api/agms/vo/tag/TagUpdateRequestVO.java
+17
-0
yd-api/src/main/java/com/yd/api/commission/service/impl/LifeCommissionServiceImpl.java
+1
-3
yd-api/src/main/java/com/yd/api/metadata/service/impl/MetadataServiceImpl.java
+5
-2
yd-api/src/main/java/com/yd/api/metadata/vo/TagQueryRequestVO.java
+16
-0
yd-api/src/main/java/com/yd/dal/entity/meta/MdTagNew.java
+17
-1
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
+8
-8
yd-api/src/main/resources/mapper/meta/MdTagNewMapper.xml
+32
-5
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsTagServiceImpl.java
View file @
4cc47843
...
...
@@ -82,6 +82,31 @@ public class AgmsTagServiceImpl implements AgmsTagService {
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"830027"
));
return
;
}
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getLoginId
())){
String
[]
params
=
{
"loginId"
};
commonResult
.
setSuccess
(
false
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"610001"
,
params
));
return
;
}
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getTagType
())){
String
[]
params
=
{
"tagType"
};
commonResult
.
setSuccess
(
false
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"610001"
,
params
));
return
;
}
if
(
CommonUtil
.
isNullOrBlank
(
requestVO
.
getTagName
())){
String
[]
params
=
{
"tagName"
};
commonResult
.
setSuccess
(
false
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"610001"
,
params
));
return
;
}
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getIsActive
())){
commonResult
.
setSuccess
(
false
);
String
[]
params
=
{
"isActive"
};
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"610001"
,
params
));
return
;
}
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getUpperTagId
())
&&
requestVO
.
getConfigLevel
()
!=
1L
){
commonResult
.
setSuccess
(
false
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"830028"
));
...
...
@@ -203,6 +228,7 @@ public class AgmsTagServiceImpl implements AgmsTagService {
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"830028"
));
return
;
}
else
{
if
(!
CommonUtil
.
isNullOrZero
(
requestVO
.
getUpperTagViewId
())){
MdTagView
mdTagView
=
mdTagViewDALService
.
selectByPrimaryKey
(
requestVO
.
getUpperTagViewId
());
if
(
mdTagView
!=
null
){
if
(!
requestVO
.
getTagViewType
().
equals
(
mdTagView
.
getTagViewType
())){
...
...
@@ -221,6 +247,7 @@ public class AgmsTagServiceImpl implements AgmsTagService {
return
;
}
}
}
commonResult
.
setSuccess
(
true
);
commonResult
.
setMessage
(
ZHBErrorConfig
.
getErrorInfo
(
"800000"
));
}
...
...
yd-api/src/main/java/com/yd/api/agms/vo/tag/TagUpdateRequestVO.java
View file @
4cc47843
...
...
@@ -17,6 +17,8 @@ public class TagUpdateRequestVO {
private
Long
loginId
;
private
Long
tagType
;
/**
* Gets the value of id. *
*
...
...
@@ -125,6 +127,20 @@ public class TagUpdateRequestVO {
this
.
loginId
=
loginId
;
}
/**
* @return the tagType
*/
public
Long
getTagType
()
{
return
tagType
;
}
/**
* @param tagType the tagType to set
*/
public
void
setTagType
(
Long
tagType
)
{
this
.
tagType
=
tagType
;
}
@Override
public
String
toString
()
{
return
"TagUpdateRequestVO{"
+
...
...
@@ -134,6 +150,7 @@ public class TagUpdateRequestVO {
", tagName='"
+
tagName
+
'\''
+
", isActive="
+
isActive
+
", loginId="
+
loginId
+
", tagType="
+
tagType
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/commission/service/impl/LifeCommissionServiceImpl.java
View file @
4cc47843
...
...
@@ -129,12 +129,10 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
suffix
=
str
.
substring
(
str
.
length
()-
1
)
;
// 前一期的来佣编号
String
preCommissionNo
=
prefix
+
(
Integer
.
valueOf
(
suffix
)
-
1
);
System
.
out
.
println
(
"看看commissionNo------"
+
commissionNo
);
System
.
out
.
println
(
"看看preCommissionNo------"
+
preCommissionNo
);
AgPoOrderCommission
agPoOrderCommission
=
orderCommissionMapper
.
selectByCommissionNo
(
preCommissionNo
);
if
(
agPoOrderCommission
!=
null
&&
"1"
.
equals
(
agPoOrderCommission
.
getCommissionStatus
()))
{
stringBuffer
.
append
(
c
ommissionNo
).
append
(
" "
);
stringBuffer
.
append
(
preC
ommissionNo
).
append
(
" "
);
flag
=
true
;
}
}
...
...
yd-api/src/main/java/com/yd/api/metadata/service/impl/MetadataServiceImpl.java
View file @
4cc47843
...
...
@@ -55,7 +55,7 @@ public class MetadataServiceImpl implements MetadataService {
return
responseVO
;
}
Long
isActive
=
null
,
configLevel
=
null
,
upperTagId
=
null
;
Long
isActive
=
null
,
configLevel
=
null
,
upperTagId
=
null
,
tagType
=
null
;
String
tagName
=
null
;
if
(
requestVO
.
getIsActive
()
!=
null
){
isActive
=
requestVO
.
getIsActive
().
longValue
();
...
...
@@ -66,6 +66,9 @@ public class MetadataServiceImpl implements MetadataService {
if
(
requestVO
.
getUpperTagId
()
!=
null
){
upperTagId
=
requestVO
.
getUpperTagId
();
}
if
(
requestVO
.
getTagType
()
!=
null
){
tagType
=
requestVO
.
getTagType
();
}
if
(!
CommonUtil
.
isNullOrBlank
(
requestVO
.
getTagName
())){
if
(
requestVO
.
getConfigLevel
()
==
null
){
commonResult
.
setSuccess
(
false
);
...
...
@@ -77,7 +80,7 @@ public class MetadataServiceImpl implements MetadataService {
}
PageHelper
.
clearPage
();
//偶然遇到了这个问题,同一个查询结果一会是10个(预期),一会是真实个数(刷新/重启应用就又变成真实个数) 查看日志,发现了问题:结果为10个时查询SQL自动加上了Limit 10
List
<
MdTagNew
>
mdTagNewList
=
mdTagNewDalService
.
selectByIsActive
(
isActive
,
configLevel
,
upperTagId
,
tagName
);
List
<
MdTagNew
>
mdTagNewList
=
mdTagNewDalService
.
selectByIsActive
(
isActive
,
configLevel
,
upperTagId
,
tagName
,
tagType
);
List
<
TagQueryInfo
>
tagQueryInfos
=
new
ArrayList
<>(
16
);
if
(
configLevel
==
null
){
if
((
requestVO
.
getUpperTagId
()
!=
null
||
!
CommonUtil
.
isNullOrBlank
(
requestVO
.
getTagName
()))){
...
...
yd-api/src/main/java/com/yd/api/metadata/vo/TagQueryRequestVO.java
View file @
4cc47843
...
...
@@ -8,6 +8,7 @@ public class TagQueryRequestVO {
private
Long
configLevel
;
//标签级别(1=一级; 2=二级; 3=三级)
private
Long
upperTagId
;
//上级标签
private
String
tagName
;
//标签名称
private
Long
tagType
;
//标签类别
private
Integer
isActive
;
//
/**
...
...
@@ -53,6 +54,20 @@ public class TagQueryRequestVO {
}
/**
* @return the tagType
*/
public
Long
getTagType
()
{
return
tagType
;
}
/**
* @param tagType the tagType to set
*/
public
void
setTagType
(
Long
tagType
)
{
this
.
tagType
=
tagType
;
}
/**
* @return the isActive
*/
public
Integer
getIsActive
()
{
...
...
@@ -72,6 +87,7 @@ public class TagQueryRequestVO {
", configLevel='"
+
configLevel
+
'\''
+
", upperTagId='"
+
upperTagId
+
'\''
+
", tagName='"
+
tagName
+
'\''
+
", tagType='"
+
tagType
+
'\''
+
", isActive="
+
isActive
+
'}'
;
}
...
...
yd-api/src/main/java/com/yd/dal/entity/meta/MdTagNew.java
View file @
4cc47843
package
com
.
yd
.
dal
.
entity
.
meta
;
import
java.util.Date
;
import
lombok.Data
;
/**
* @author xxy
...
...
@@ -15,6 +14,8 @@ public class MdTagNew {
private
String
tagName
;
private
Long
tagType
;
private
Integer
isActive
;
private
Date
createdAt
;
...
...
@@ -98,6 +99,20 @@ public class MdTagNew {
}
/**
* @return the tag_type
*/
public
Long
getTagType
()
{
return
tagType
;
}
/**
* @param tag_type the tag_type to set
*/
public
void
setTagType
(
Long
tagType
)
{
this
.
tagType
=
tagType
;
}
/**
* Gets the value of isActive. *
*
* @return the value of isActive
...
...
@@ -194,6 +209,7 @@ public class MdTagNew {
", configLevel="
+
configLevel
+
", upperTagId="
+
upperTagId
+
", tagName='"
+
tagName
+
'\''
+
", tagType='"
+
tagType
+
'\''
+
", isActive="
+
isActive
+
", createdAt="
+
createdAt
+
", createdBy="
+
createdBy
+
...
...
yd-api/src/main/java/com/yd/dal/mapper/meta/MdTagNewMapper.java
View file @
4cc47843
...
...
@@ -23,5 +23,5 @@ public interface MdTagNewMapper {
int
batchInsert
(
@Param
(
"list"
)
List
<
MdTagNew
>
list
);
List
<
MdTagNew
>
selectByIsActive
(
@Param
(
"isActive"
)
Long
isActive
,
@Param
(
"configLevel"
)
Long
configLevel
,
@Param
(
"upperTagId"
)
Long
upperTagId
,
@Param
(
"tagName"
)
String
tagName
);
List
<
MdTagNew
>
selectByIsActive
(
@Param
(
"isActive"
)
Long
isActive
,
@Param
(
"configLevel"
)
Long
configLevel
,
@Param
(
"upperTagId"
)
Long
upperTagId
,
@Param
(
"tagName"
)
String
tagName
,
@Param
(
"tagType"
)
Long
tagType
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/meta/MdTagNewDALService.java
View file @
4cc47843
...
...
@@ -8,7 +8,7 @@ import java.util.List;
* @author xxy
*/
public
interface
MdTagNewDALService
{
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
,
Long
configLevel
,
Long
upperTagId
,
String
tagName
);
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
,
Long
configLevel
,
Long
upperTagId
,
String
tagName
,
Long
tagType
);
void
insert
(
MdTagNew
mdTagNew
);
...
...
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdTagNewDALServiceImpl.java
View file @
4cc47843
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.MdTagNewDALServi
ce
;
import
java.util.List
;
import
javax.annotation.Resour
ce
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
com.yd.dal.entity.meta.MdTagNew
;
import
com.yd.dal.mapper.meta.MdTagNewMapper
;
import
com.yd.dal.service.meta.MdTagNewDALService
;
/**
* @author xxy
...
...
@@ -20,8 +20,8 @@ public class MdTagNewDALServiceImpl implements MdTagNewDALService {
public
MdTagNewMapper
mapper
;
@Override
public
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
,
Long
configLevel
,
Long
upperTagId
,
String
tagName
)
{
return
mapper
.
selectByIsActive
(
isActive
,
configLevel
,
upperTagId
,
tagName
);
public
List
<
MdTagNew
>
selectByIsActive
(
Long
isActive
,
Long
configLevel
,
Long
upperTagId
,
String
tagName
,
Long
tagType
)
{
return
mapper
.
selectByIsActive
(
isActive
,
configLevel
,
upperTagId
,
tagName
,
tagType
);
}
@Override
...
...
yd-api/src/main/resources/mapper/meta/MdTagNewMapper.xml
View file @
4cc47843
...
...
@@ -8,6 +8,7 @@
<result
column=
"config_level"
jdbcType=
"BIGINT"
property=
"configLevel"
/>
<result
column=
"upper_tag_id"
jdbcType=
"BIGINT"
property=
"upperTagId"
/>
<result
column=
"tag_name"
jdbcType=
"VARCHAR"
property=
"tagName"
/>
<result
column=
"tag_type"
jdbcType=
"VARCHAR"
property=
"tagType"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
...
...
@@ -16,7 +17,7 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, config_level, upper_tag_id, tag_name, is_active, created_at, created_by, updated_at,
id, config_level, upper_tag_id, tag_name,
tag_type,
is_active, created_at, created_by, updated_at,
updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
...
...
@@ -33,10 +34,10 @@
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdTagNew"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_tag_new (config_level, upper_tag_id, tag_name,
insert into ag_md_tag_new (config_level, upper_tag_id, tag_name,
tag_type,
is_active, created_at, created_by,
updated_at, updated_by)
values (#{configLevel,jdbcType=BIGINT}, #{upperTagId,jdbcType=BIGINT}, #{tagName,jdbcType=VARCHAR},
values (#{configLevel,jdbcType=BIGINT}, #{upperTagId,jdbcType=BIGINT}, #{tagName,jdbcType=VARCHAR},
#{tagType,jdbcType=BIGINT},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT})
</insert>
...
...
@@ -53,6 +54,9 @@
<if
test=
"tagName != null"
>
tag_name,
</if>
<if
test=
"tagType != null"
>
tag_type,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
...
...
@@ -79,6 +83,9 @@
<if
test=
"tagName != null"
>
#{tagName,jdbcType=VARCHAR},
</if>
<if
test=
"tagType != null"
>
#{tagType,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
...
...
@@ -109,6 +116,9 @@
<if
test=
"tagName != null"
>
tag_name = #{tagName,jdbcType=VARCHAR},
</if>
<if
test=
"tagType != null"
>
tag_type = #{tagType,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
...
...
@@ -133,6 +143,7 @@
set config_level = #{configLevel,jdbcType=BIGINT},
upper_tag_id = #{upperTagId,jdbcType=BIGINT},
tag_name = #{tagName,jdbcType=VARCHAR},
tag_type = #{tagType,jdbcType=BIGINT},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
...
...
@@ -159,6 +170,11 @@
when id = #{item.id,jdbcType=BIGINT} then #{item.tagName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"tag_type = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.tagType,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
...
...
@@ -215,6 +231,13 @@
</if>
</foreach>
</trim>
<trim
prefix=
"tag_type = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.tagType != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.tagType,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.isActive != null"
>
...
...
@@ -259,11 +282,11 @@
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_tag_new
(config_level, upper_tag_id, tag_name, is_active, created_at, created_by, updated_at,
(config_level, upper_tag_id, tag_name,
tag_type,
is_active, created_at, created_by, updated_at,
updated_by)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.configLevel,jdbcType=BIGINT}, #{item.upperTagId,jdbcType=BIGINT}, #{item.tagName,jdbcType=VARCHAR},
(#{item.configLevel,jdbcType=BIGINT}, #{item.upperTagId,jdbcType=BIGINT}, #{item.tagName,jdbcType=VARCHAR},
#{item.tagType,jdbcType=BIGINT},
#{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT},
#{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT})
</foreach>
...
...
@@ -287,6 +310,9 @@
<if
test=
"tagName != null"
>
and tag_name like #{tagName,jdbcType=VARCHAR}
</if>
<if
test=
"tagType != null"
>
and tag_type = #{tagType,jdbcType=BIGINT}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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