记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
90f263c2
Commit
90f263c2
authored
Feb 14, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~ADMIN:标签库:列表属性'关联商品数量'处理;
parent
60b7ad19
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
2 deletions
+43
-2
GoblinSelfTagAdminController.java
...troller/zhengzai/goblin/GoblinSelfTagAdminController.java
+17
-1
IGoblinSelfTagService.java
.../admin/zhengzai/goblin/service/IGoblinSelfTagService.java
+4
-1
GoblinSelfGoodsTagServiceImpl.java
...ai/goblin/service/impl/GoblinSelfGoodsTagServiceImpl.java
+9
-0
GoblinSelfTagMapper.java
.../liquidnet/service/goblin/mapper/GoblinSelfTagMapper.java
+4
-0
GoblinSelfTagMapper.xml
...m.liquidnet.service.goblin.mapper/GoblinSelfTagMapper.xml
+9
-0
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinSelfTagAdminController.java
View file @
90f263c2
...
@@ -19,9 +19,11 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -19,9 +19,11 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Api
(
tags
=
"标签库"
)
@Api
(
tags
=
"标签库"
)
@Controller
@Controller
...
@@ -63,7 +65,21 @@ public class GoblinSelfTagAdminController extends BaseController {
...
@@ -63,7 +65,21 @@ public class GoblinSelfTagAdminController extends BaseController {
GoblinSelfTag:
:
getTagType
,
GoblinSelfTag:
:
getTagType
,
GoblinSelfTag:
:
getCounts
GoblinSelfTag:
:
getCounts
);
);
return
goblinSelfTagService
.
list
(
lambdaQueryWrapper
);
List
<
GoblinSelfTag
>
list
=
goblinSelfTagService
.
list
(
lambdaQueryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
GoblinSelfTag
>
cts
=
goblinSelfTagService
.
countsForList
(
list
.
stream
().
map
(
GoblinSelfTag:
:
getTagId
).
collect
(
Collectors
.
toList
()));
if
(!
CollectionUtils
.
isEmpty
(
cts
))
{
cts
.
forEach
(
ct
->
list
.
forEach
(
t
->
{
if
(
t
.
getTagId
().
equals
(
ct
.
getTagId
()))
{
t
.
setCounts
(
ct
.
getCounts
());
}
}));
}
}
return
list
;
}
}
// @RequiresPermissions("goblin:tag:export")
// @RequiresPermissions("goblin:tag:export")
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/IGoblinSelfTagService.java
View file @
90f263c2
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
;
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.liquidnet.service.goblin.entity.GoblinSelfGoodsCategory
;
import
com.liquidnet.service.goblin.entity.GoblinSelfTag
;
import
com.liquidnet.service.goblin.entity.GoblinSelfTag
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 平台商品标签 服务类
* 平台商品标签 服务类
...
@@ -19,4 +20,6 @@ public interface IGoblinSelfTagService extends IService<GoblinSelfTag> {
...
@@ -19,4 +20,6 @@ public interface IGoblinSelfTagService extends IService<GoblinSelfTag> {
boolean
editSave
(
GoblinSelfTag
selfTag
);
boolean
editSave
(
GoblinSelfTag
selfTag
);
boolean
remove
(
String
[]
tagIdArr
,
String
tagBelong
);
boolean
remove
(
String
[]
tagIdArr
,
String
tagBelong
);
List
<
GoblinSelfTag
>
countsForList
(
List
<
String
>
tagIds
);
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinSelfGoodsTagServiceImpl.java
View file @
90f263c2
...
@@ -18,6 +18,8 @@ import org.springframework.data.mongodb.core.query.Update;
...
@@ -18,6 +18,8 @@ import org.springframework.data.mongodb.core.query.Update;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 平台商品标签 服务实现类
* 平台商品标签 服务实现类
...
@@ -31,6 +33,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -31,6 +33,8 @@ import org.springframework.transaction.annotation.Transactional;
public
class
GoblinSelfGoodsTagServiceImpl
extends
ServiceImpl
<
GoblinSelfTagMapper
,
GoblinSelfTag
>
implements
IGoblinSelfTagService
{
public
class
GoblinSelfGoodsTagServiceImpl
extends
ServiceImpl
<
GoblinSelfTagMapper
,
GoblinSelfTag
>
implements
IGoblinSelfTagService
{
@Autowired
@Autowired
private
MongoTemplate
mongoTemplate
;
private
MongoTemplate
mongoTemplate
;
@Autowired
private
GoblinSelfTagMapper
goblinSelfTagMapper
;
@Transactional
@Transactional
@Override
@Override
...
@@ -86,4 +90,9 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
...
@@ -86,4 +90,9 @@ public class GoblinSelfGoodsTagServiceImpl extends ServiceImpl<GoblinSelfTagMapp
}
}
return
rmvResultFlg
;
return
rmvResultFlg
;
}
}
@Override
public
List
<
GoblinSelfTag
>
countsForList
(
List
<
String
>
tagIds
)
{
return
goblinSelfTagMapper
.
countsForList
(
tagIds
);
}
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinSelfTagMapper.java
View file @
90f263c2
...
@@ -2,6 +2,9 @@ package com.liquidnet.service.goblin.mapper;
...
@@ -2,6 +2,9 @@ package com.liquidnet.service.goblin.mapper;
import
com.liquidnet.service.goblin.entity.GoblinSelfTag
;
import
com.liquidnet.service.goblin.entity.GoblinSelfTag
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
GoblinSelfTagMapper
extends
BaseMapper
<
GoblinSelfTag
>
{
public
interface
GoblinSelfTagMapper
extends
BaseMapper
<
GoblinSelfTag
>
{
List
<
GoblinSelfTag
>
countsForList
(
@Param
(
"tagIds"
)
List
<
String
>
tagIds
);
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinSelfTagMapper.xml
View file @
90f263c2
...
@@ -2,4 +2,13 @@
...
@@ -2,4 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinSelfTagMapper"
>
<mapper
namespace=
"com.liquidnet.service.goblin.mapper.GoblinSelfTagMapper"
>
<select
id=
"countsForList"
resultType=
"com.liquidnet.service.goblin.entity.GoblinSelfTag"
>
SELECT tag_id tagId, count(1) counts FROM goblin_goods_tag
WHERE tag_id IN
<foreach
item=
"tagId"
collection=
"tagIds"
open=
"("
separator=
","
close=
")"
>
#{tagId}
</foreach>
AND del_flg='0' AND tag_belong='0'
GROUP BY tag_id
</select>
</mapper>
</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