Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
935cd4c1
Commit
935cd4c1
authored
Aug 09, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
94702cd2
b522b881
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
5 deletions
+64
-5
PlatformBrandApiService.java
...a/com/gic/enterprise/service/PlatformBrandApiService.java
+14
-1
pom.xml
gic-platform-enterprise-service/pom.xml
+5
-0
TabPlatformBrandRefMapper.java
.../gic/enterprise/dao/mapper/TabPlatformBrandRefMapper.java
+2
-0
PlatformBrandRefService.java
...a/com/gic/enterprise/service/PlatformBrandRefService.java
+2
-0
PlatformBrandRefServiceImpl.java
.../enterprise/service/impl/PlatformBrandRefServiceImpl.java
+5
-0
PlatformBrandApiServiceImpl.java
...enterprise/service/outer/PlatformBrandApiServiceImpl.java
+6
-0
TabPlatformBrandRefMapper.xml
...e/src/main/resources/mapper/TabPlatformBrandRefMapper.xml
+13
-4
PlatformBrandController.java
...gic/operation/web/controller/PlatformBrandController.java
+15
-0
dubbo-gic-platform-operation-web.xml
...b/src/main/resources/dubbo-gic-platform-operation-web.xml
+2
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/PlatformBrandApiService.java
View file @
935cd4c1
...
...
@@ -5,6 +5,8 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.enterprise.dto.PlatformBrandDTO
;
import
com.gic.enterprise.dto.PlatformBrandRefDTO
;
import
java.util.List
;
/**
* 平台品牌
* @ClassName: PlatformBrandApiService
...
...
@@ -80,7 +82,18 @@ public interface PlatformBrandApiService {
* @throws
*/
ServiceResponse
<
Integer
>
delRef
(
Integer
enterpriseId
,
Integer
enterpriseBrandId
);
/**
* 删除一个关联关系
* @Title: delRef
* @Description: 删除一个关联关系
* @author zhiwj
* @param enterpriseBrandId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse
<
Integer
>
delRef
(
Integer
enterpriseId
,
List
<
Integer
>
enterpriseBrandIds
);
/**
* 更新一个关联关系
* @Title: updateRef
...
...
gic-platform-enterprise-service/pom.xml
View file @
935cd4c1
...
...
@@ -113,6 +113,11 @@
<artifactId>
gic-platform-enterprise-api
</artifactId>
<version>
${gic-platform-enterprise-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-job-sdk
</artifactId>
<version>
${gic-job-sdk}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabPlatformBrandRefMapper.java
View file @
935cd4c1
...
...
@@ -62,6 +62,8 @@ public interface TabPlatformBrandRefMapper {
Integer
delRef
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"enterpriseBrandId"
)
Integer
enterpriseBrandId
);
Integer
delRefs
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"ids"
)
List
<
Integer
>
enterpriseBrandIds
);
Page
<
TabPlatformBrandRef
>
listByPlatformBrandRef
(
TabPlatformBrandRef
brandRef
);
Integer
updateRef
(
@Param
(
"fromBrandId"
)
Integer
fromBrandId
,
@Param
(
"toBrandId"
)
Integer
toBrandId
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/PlatformBrandRefService.java
View file @
935cd4c1
...
...
@@ -16,6 +16,8 @@ public interface PlatformBrandRefService {
Integer
delRef
(
Integer
enterpriseId
,
Integer
enterpriseBrandId
);
Integer
delRef
(
Integer
enterpriseId
,
List
<
Integer
>
enterpriseBrandIds
);
Page
<
TabPlatformBrandRef
>
listByPlatformBrandRef
(
String
brandName
);
Integer
updateRef
(
Integer
fromBrandId
,
Integer
toBrandId
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/PlatformBrandRefServiceImpl.java
View file @
935cd4c1
...
...
@@ -58,6 +58,11 @@ public class PlatformBrandRefServiceImpl implements PlatformBrandRefService {
}
@Override
public
Integer
delRef
(
Integer
enterpriseId
,
List
<
Integer
>
enterpriseBrandIds
)
{
return
tabPlatformBrandRefMapper
.
delRefs
(
enterpriseId
,
enterpriseBrandIds
);
}
@Override
public
Page
<
TabPlatformBrandRef
>
listByPlatformBrandRef
(
String
brandName
)
{
TabPlatformBrandRef
brandRef
=
new
TabPlatformBrandRef
();
brandRef
.
setEnterpriseBrandName
(
brandName
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/PlatformBrandApiServiceImpl.java
View file @
935cd4c1
...
...
@@ -136,6 +136,12 @@ public class PlatformBrandApiServiceImpl implements PlatformBrandApiService {
}
@Override
public
ServiceResponse
<
Integer
>
delRef
(
Integer
enterpriseId
,
List
<
Integer
>
enterpriseBrandIds
)
{
Integer
line
=
platformBrandRefService
.
delRef
(
enterpriseId
,
enterpriseBrandIds
);
return
ServiceResponse
.
success
(
line
);
}
@Override
public
ServiceResponse
<
Integer
>
updateRef
(
Integer
enterpriseId
,
Integer
enterpriseBrandId
,
String
enterpriseBrandName
,
String
enterpriseBrandCode
,
Integer
categoryId
)
{
// 先删除原来的
platformBrandRefService
.
delRef
(
enterpriseId
,
enterpriseBrandId
);
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabPlatformBrandRefMapper.xml
View file @
935cd4c1
...
...
@@ -155,9 +155,9 @@
</foreach>
</if>
</select>
<
select
id=
"delRef"
resultType=
"java.lang.Integer
"
>
<
update
id=
"delRef
"
>
update tab_platform_brand_ref set status = 0 where enterprise_id = #{enterpriseId} and enterprise_brand_id = #{enterpriseBrandId}
</
select
>
</
update
>
<select
id=
"listByPlatformBrandRef"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
@@ -170,7 +170,16 @@
and brand_name = #{brandName}
</if>
</select>
<select
id=
"updateRef"
resultType=
"java.lang.Integer"
>
<update
id=
"delRefs"
>
update tab_platform_brand_ref set status = 0 where enterprise_id = #{enterpriseId} and status = 1
<if
test=
"null != ids"
>
and enterprise_brand_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</update>
<update
id=
"updateRef"
>
update tab_platform_brand_ref set platform_brand_id = #{toBrandId} where status = 1 and platform_brand_id = #{fromBrandId}
</
select
>
</
update
>
</mapper>
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/PlatformBrandController.java
View file @
935cd4c1
...
...
@@ -6,9 +6,11 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.PlatformBrandDTO
;
import
com.gic.enterprise.dto.PlatformBrandRefDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.PlatformBrandApiService
;
import
com.gic.operation.web.qo.PageQO
;
import
com.gic.operation.web.qo.PlatformBrandQO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -66,5 +68,18 @@ public class PlatformBrandController {
}
}
@RequestMapping
(
"/brand-merge"
)
public
RestResponse
mergeBrand
(
Integer
fromBrandId
,
String
toBrandName
)
{
if
(
fromBrandId
==
null
||
StringUtils
.
isBlank
(
toBrandName
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
}
ServiceResponse
<
Integer
>
serviceResponse
=
platformBrandApiService
.
mergeBrandRef
(
fromBrandId
,
toBrandName
);
if
(
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
success
(
serviceResponse
.
getResult
());
}
else
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
}
}
gic-platform-operation-web/src/main/resources/dubbo-gic-platform-operation-web.xml
View file @
935cd4c1
...
...
@@ -43,5 +43,6 @@
<dubbo:reference
interface=
"com.gic.enterprise.service.EnterpriseInitApiService"
id=
"enterpriseInitApiService"
timeout=
"60000"
/>
<!--转账审批-->
<dubbo:reference
interface=
"com.gic.enterprise.service.TransferAccountsApprovalApiService"
id=
"transferAccountsApprovalApiService"
timeout=
"60000"
/>
<!-- 平台品牌库 -->
<dubbo:reference
interface=
"com.gic.enterprise.service.PlatformBrandApiService"
id=
"platformBrandApiService"
timeout=
"60000"
/>
</beans>
\ 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