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
44f5018c
Commit
44f5018c
authored
Jul 18, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品列表查询
parent
9ee999fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
EnterpriseListDTO.java
...c/main/java/com/gic/enterprise/dto/EnterpriseListDTO.java
+2
-2
TabEnterpriseMapper.xml
...service/src/main/resources/mapper/TabEnterpriseMapper.xml
+1
-1
EnterpriseController.java
...om/gic/operation/web/controller/EnterpriseController.java
+17
-1
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/EnterpriseListDTO.java
View file @
44f5018c
...
...
@@ -142,14 +142,14 @@ public class EnterpriseListDTO implements Serializable{
Map
<
Integer
,
Integer
>
licenseMap
=
new
HashMap
<>(
16
);
for
(
String
str
:
licenseArr
)
{
Integer
licenseType
=
Integer
.
parseInt
(
str
.
substring
(
0
,
1
));
Integer
licenseValue
=
Integer
.
parseInt
(
str
.
substring
(
1
,
str
.
length
()
-
1
));
Integer
licenseValue
=
Integer
.
parseInt
(
str
.
substring
(
1
,
str
.
length
()));
licenseMap
.
put
(
licenseType
,
licenseValue
);
}
StringBuilder
serviceInfo
=
new
StringBuilder
();
for
(
LicenseTypeEnum
licenseTypeEnum
:
LicenseTypeEnum
.
values
())
{
serviceInfo
.
append
(
licenseMap
.
get
(
licenseTypeEnum
.
getCode
())).
append
(
"-"
);
}
return
serviceInfo
.
toString
().
substring
(
0
,
serviceInfo
.
toString
().
length
()
-
2
);
return
serviceInfo
.
toString
().
substring
(
0
,
serviceInfo
.
toString
().
length
()
-
1
);
}
}
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabEnterpriseMapper.xml
View file @
44f5018c
...
...
@@ -171,7 +171,7 @@
c.service_version serviceVersion,
c.expiration_time expirationTime,
c.`status` serviceStatus,
if(c.expiration_time
!=
null, DATEDIFF(c.expiration_time, now()), 0) aboutToExpireDay
if(c.expiration_time
is not
null, DATEDIFF(c.expiration_time, now()), 0) aboutToExpireDay
FROM
tab_enterprise a
LEFT JOIN tab_enterprise_license b ON a.enterprise_id = b.enterprise_id
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/EnterpriseController.java
View file @
44f5018c
...
...
@@ -6,6 +6,7 @@ import com.gic.auth.dto.UserDTO;
import
com.gic.auth.service.UserApiService
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.constant.EnterpriseListOrderByEnum
;
import
com.gic.enterprise.constant.EnterpriseVersionStatusEnum
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
...
...
@@ -20,6 +21,9 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author guojx
* @date 2019/7/17 10:32 AM
...
...
@@ -61,15 +65,27 @@ public class EnterpriseController {
@RequestMapping
(
"/list-enterprise"
)
public
RestResponse
listEnterprise
(
String
search
,
Integer
serviceVersion
,
Integer
serviceStatus
,
Integer
orderBy
,
PageQO
pageQO
)
{
if
(
orderBy
==
null
)
{
orderBy
=
0
;
}
ServiceResponse
enterpriseResult
=
enterpriseApiService
.
listEnterprise
(
search
,
serviceVersion
,
serviceStatus
,
EnterpriseListOrderByEnum
.
getOrderBy
(
orderBy
),
pageQO
.
getCurrentPage
(),
pageQO
.
getPageSize
());
if
(
enterpriseResult
.
isSuccess
())
{
return
RestResponse
.
success
();
return
RestResponse
.
success
(
enterpriseResult
.
getResult
()
);
}
else
{
return
EnterpriseRestResponse
.
failure
(
enterpriseResult
);
}
}
@RequestMapping
(
"/list-enterprise-version-status"
)
public
RestResponse
listEnterpriseVersionStatus
()
{
Map
<
Integer
,
String
>
resultMap
=
new
HashMap
<>(
16
);
for
(
EnterpriseVersionStatusEnum
statusEnum
:
EnterpriseVersionStatusEnum
.
values
())
{
resultMap
.
put
(
statusEnum
.
getCode
(),
statusEnum
.
getMessage
());
}
return
RestResponse
.
success
(
resultMap
);
}
@RequestMapping
(
"/edit-enterprise"
)
public
RestResponse
editEnterprise
(
@Validated
({
EnterpriseDTO
.
EditEnterpriseValid
.
class
,
EnterpriseDTO
.
SaveEnterpriseValid
.
class
})
...
...
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