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
ee2f9e08
Commit
ee2f9e08
authored
Jul 27, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!25
parents
63c101ac
77d012d0
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
625 additions
and
101 deletions
+625
-101
EnterpriseLicenseDTO.java
...ain/java/com/gic/enterprise/dto/EnterpriseLicenseDTO.java
+27
-8
EnterpriseListDTO.java
...c/main/java/com/gic/enterprise/dto/EnterpriseListDTO.java
+1
-38
LicenseDTO.java
...c/main/java/com/gic/enterprise/dto/market/LicenseDTO.java
+11
-0
ServeLicenseDTO.java
...n/java/com/gic/enterprise/dto/market/ServeLicenseDTO.java
+467
-0
LicenseUtils.java
.../src/main/java/com/gic/enterprise/utils/LicenseUtils.java
+7
-7
CustomUdeskFieldApiServiceImpl.java
...se/service/outer/impl/CustomUdeskFieldApiServiceImpl.java
+2
-12
EnterpriseApiServiceImpl.java
...terprise/service/outer/impl/EnterpriseApiServiceImpl.java
+40
-20
dubbo-gic-platform-enterprise-service.xml
.../main/resources/dubbo-gic-platform-enterprise-service.xml
+2
-0
TabAppletCustomPageMapper.xml
...e/src/main/resources/mapper/TabAppletCustomPageMapper.xml
+12
-3
TabCustomUdeskFieldMapper.xml
...e/src/main/resources/mapper/TabCustomUdeskFieldMapper.xml
+1
-1
TabEnterpriseMapper.xml
...service/src/main/resources/mapper/TabEnterpriseMapper.xml
+0
-2
CustomChatController.java
...m/gic/enterprise/web/controller/CustomChatController.java
+6
-1
EnterpriseController.java
...om/gic/operation/web/controller/EnterpriseController.java
+47
-9
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/dto/EnterpriseLicenseDTO.java
View file @
ee2f9e08
...
...
@@ -53,67 +53,86 @@ public class EnterpriseLicenseDTO implements Serializable{
*/
private
String
licenseName
;
private
String
licenseCode
;
public
Integer
getEnterpriseLicenseId
()
{
return
enterpriseLicenseId
;
}
public
void
setEnterpriseLicenseId
(
Integer
enterpriseLicenseId
)
{
public
EnterpriseLicenseDTO
setEnterpriseLicenseId
(
Integer
enterpriseLicenseId
)
{
this
.
enterpriseLicenseId
=
enterpriseLicenseId
;
return
this
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
public
EnterpriseLicenseDTO
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
return
this
;
}
public
Long
getLicenseId
()
{
return
licenseId
;
}
public
void
setLicenseId
(
Long
licenseId
)
{
public
EnterpriseLicenseDTO
setLicenseId
(
Long
licenseId
)
{
this
.
licenseId
=
licenseId
;
return
this
;
}
public
Integer
getLowerLimit
()
{
return
lowerLimit
;
}
public
void
setLowerLimit
(
Integer
lowerLimit
)
{
public
EnterpriseLicenseDTO
setLowerLimit
(
Integer
lowerLimit
)
{
this
.
lowerLimit
=
lowerLimit
;
return
this
;
}
public
Integer
getUpperLimit
()
{
return
upperLimit
;
}
public
void
setUpperLimit
(
Integer
upperLimit
)
{
public
EnterpriseLicenseDTO
setUpperLimit
(
Integer
upperLimit
)
{
this
.
upperLimit
=
upperLimit
;
return
this
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
public
EnterpriseLicenseDTO
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
return
this
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
public
EnterpriseLicenseDTO
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
return
this
;
}
public
String
getLicenseName
()
{
return
licenseName
;
}
public
void
setLicenseName
(
String
licenseName
)
{
public
EnterpriseLicenseDTO
setLicenseName
(
String
licenseName
)
{
this
.
licenseName
=
licenseName
;
return
this
;
}
public
String
getLicenseCode
()
{
return
licenseCode
;
}
public
EnterpriseLicenseDTO
setLicenseCode
(
String
licenseCode
)
{
this
.
licenseCode
=
licenseCode
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/EnterpriseListDTO.java
View file @
ee2f9e08
package
com
.
gic
.
enterprise
.
dto
;
import
com.gic.enterprise.constant.LicenseTypeEnum
;
import
com.gic.enterprise.utils.LicenseUtils
;
import
java.io.Serializable
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author guojx
...
...
@@ -25,8 +18,6 @@ public class EnterpriseListDTO implements Serializable{
private
String
logo
;
private
String
licenseUpperLimitStr
;
/**
* 自左向右显示会员卡、服务号、小程序、门店、商品5大业务对象的license授权额度。
* 受显示宽度限制,区间型license仅显示区间峰值。
...
...
@@ -103,14 +94,6 @@ public class EnterpriseListDTO implements Serializable{
this
.
logo
=
logo
;
}
public
String
getLicenseUpperLimitStr
()
{
return
licenseUpperLimitStr
;
}
public
void
setLicenseUpperLimitStr
(
String
licenseUpperLimitStr
)
{
this
.
licenseUpperLimitStr
=
licenseUpperLimitStr
;
}
public
String
getVersionCode
()
{
return
versionCode
;
}
...
...
@@ -160,27 +143,7 @@ public class EnterpriseListDTO implements Serializable{
}
public
String
getServiceInfo
()
{
if
(
licenseUpperLimitStr
==
null
||
licenseUpperLimitStr
==
""
)
{
return
"--"
;
}
else
{
//按照会员卡、服务号、小程序、门店分别展示
//数据格式 名称:数值-名称2:数值2
Map
<
String
,
Object
>
map
=
Arrays
.
stream
(
licenseUpperLimitStr
.
split
(
"-"
))
.
map
(
e
->
e
.
split
(
":"
))
.
collect
(
Collectors
.
toMap
(
e
->
e
[
0
],
e
->
e
[
1
]));
Object
memberCard
=
map
.
get
(
LicenseUtils
.
MEMBER_CARD_LICENSE_NAME
);
Object
serviceCard
=
map
.
get
(
LicenseUtils
.
SERVICE_CARD_LICENSE_NAME
);
Object
weChat
=
map
.
get
(
LicenseUtils
.
WECHAT_LICENSE_NAME
);
Object
store
=
map
.
get
(
LicenseUtils
.
STORE_LICENSE_NAME
);
//商品license,用于前端license扩容的时候判断:商品数量不变,不提交商品license数据给接口
Object
goods
=
map
.
get
(
LicenseUtils
.
GOODS_LICENSE_NAME
);
setGoodsCount
(
goods
==
null
?
0
:
Integer
.
parseInt
(
goods
.
toString
()));
return
(
memberCard
==
null
?
"0"
:
memberCard
.
toString
())
+
"-"
+
(
serviceCard
==
null
?
"0"
:
serviceCard
.
toString
())
+
"-"
+
(
weChat
==
null
?
"0"
:
weChat
.
toString
())
+
"-"
+
(
store
==
null
?
"0"
:
store
.
toString
());
}
return
serviceInfo
;
}
public
void
setServiceInfo
(
String
serviceInfo
)
{
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/market/LicenseDTO.java
View file @
ee2f9e08
...
...
@@ -63,6 +63,8 @@ public class LicenseDTO implements Serializable{
*/
private
Integer
alreadyBuyQuantity
;
private
ServeLicenseDTO
licenseDetail
;
private
boolean
licenseEditFlag
;
public
String
getServeId
()
{
...
...
@@ -201,4 +203,13 @@ public class LicenseDTO implements Serializable{
this
.
licenseEditFlag
=
licenseEditFlag
;
return
this
;
}
public
ServeLicenseDTO
getLicenseDetail
()
{
return
licenseDetail
;
}
public
LicenseDTO
setLicenseDetail
(
ServeLicenseDTO
licenseDetail
)
{
this
.
licenseDetail
=
licenseDetail
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/market/ServeLicenseDTO.java
0 → 100644
View file @
ee2f9e08
package
com
.
gic
.
enterprise
.
dto
.
market
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* license 详情
* @ClassName: ServeLicenseDTO
* @Description:
* @author guojuxing
* @date 2020/7/23 1:54 PM
*/
public
class
ServeLicenseDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8500185445615084852L
;
/**
* 主键
*/
private
Long
licenseId
;
/**
* 名称
*/
private
String
licenseName
;
/**
* 单位
*/
private
String
licenseUnit
;
/**
* 服务商
*/
private
Long
isvId
;
/**
* 图片
*/
private
String
imageUrl
;
/**
* 图片ID(用于删除)
*/
private
String
imageFileId
;
/**
* 应用ID
*/
private
Long
applicationId
;
/**
* 服务ID
*/
private
Long
serveId
;
/**
* 审核状态(-1: 未审核; 0:审核失败;1:已审核)
*/
private
Integer
auditStatus
;
/**
* 审核拒绝原因
*/
private
String
refuseReason
;
/**
* 服务状态(0:未上架; 1: 已上架)
*/
private
Integer
licenseStatus
;
/**
* 简介
*/
private
String
licenseIntro
;
/**
* 适用版本 1通用 2部分版本
*/
private
Integer
versionType
;
/**
* 最小数量
*/
private
Integer
minQuantity
;
/**
* 最大数量
*/
private
Integer
maxQuantity
;
/**
* 计价方式1单价 2区间价 3阶梯价
*/
private
Integer
priceType
;
/**
* 单价
*/
private
BigDecimal
unitPrice
;
/**
* 价格详情[{min:1,max:100,price:100}...]
*/
private
String
priceDetail
;
/**
* 0gic 1好办
*/
private
Integer
appType
;
private
Integer
deleteFlag
;
private
Date
createTime
;
private
Date
updateTime
;
private
String
licenseCode
;
/**
* 应用名称
*/
private
String
serveName
;
/**
* 应用名称
*/
private
String
applicationName
;
/**
* 应用分类名称
*/
private
String
appCategoryName
;
/**
* 应用图片
*/
private
String
applicationUrl
;
/**
* 服务商账号
*/
private
String
isvAccount
;
/**
* 服务商名称
*/
private
String
isvName
;
/**
* 服务图片
*/
private
String
serveImageUrl
;
//购买数量
private
Integer
buyQuantity
;
//购买价格
private
BigDecimal
buyPrice
;
// 是否已购买
private
boolean
isBuy
=
false
;
// 已购数量
private
Integer
validQuantity
=
0
;
public
Long
getLicenseId
()
{
return
licenseId
;
}
public
ServeLicenseDTO
setLicenseId
(
Long
licenseId
)
{
this
.
licenseId
=
licenseId
;
return
this
;
}
public
String
getLicenseName
()
{
return
licenseName
;
}
public
ServeLicenseDTO
setLicenseName
(
String
licenseName
)
{
this
.
licenseName
=
licenseName
;
return
this
;
}
public
String
getLicenseUnit
()
{
return
licenseUnit
;
}
public
ServeLicenseDTO
setLicenseUnit
(
String
licenseUnit
)
{
this
.
licenseUnit
=
licenseUnit
;
return
this
;
}
public
Long
getIsvId
()
{
return
isvId
;
}
public
ServeLicenseDTO
setIsvId
(
Long
isvId
)
{
this
.
isvId
=
isvId
;
return
this
;
}
public
String
getImageUrl
()
{
return
imageUrl
;
}
public
ServeLicenseDTO
setImageUrl
(
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
return
this
;
}
public
String
getImageFileId
()
{
return
imageFileId
;
}
public
ServeLicenseDTO
setImageFileId
(
String
imageFileId
)
{
this
.
imageFileId
=
imageFileId
;
return
this
;
}
public
Long
getApplicationId
()
{
return
applicationId
;
}
public
ServeLicenseDTO
setApplicationId
(
Long
applicationId
)
{
this
.
applicationId
=
applicationId
;
return
this
;
}
public
Long
getServeId
()
{
return
serveId
;
}
public
ServeLicenseDTO
setServeId
(
Long
serveId
)
{
this
.
serveId
=
serveId
;
return
this
;
}
public
Integer
getAuditStatus
()
{
return
auditStatus
;
}
public
ServeLicenseDTO
setAuditStatus
(
Integer
auditStatus
)
{
this
.
auditStatus
=
auditStatus
;
return
this
;
}
public
String
getRefuseReason
()
{
return
refuseReason
;
}
public
ServeLicenseDTO
setRefuseReason
(
String
refuseReason
)
{
this
.
refuseReason
=
refuseReason
;
return
this
;
}
public
Integer
getLicenseStatus
()
{
return
licenseStatus
;
}
public
ServeLicenseDTO
setLicenseStatus
(
Integer
licenseStatus
)
{
this
.
licenseStatus
=
licenseStatus
;
return
this
;
}
public
String
getLicenseIntro
()
{
return
licenseIntro
;
}
public
ServeLicenseDTO
setLicenseIntro
(
String
licenseIntro
)
{
this
.
licenseIntro
=
licenseIntro
;
return
this
;
}
public
Integer
getVersionType
()
{
return
versionType
;
}
public
ServeLicenseDTO
setVersionType
(
Integer
versionType
)
{
this
.
versionType
=
versionType
;
return
this
;
}
public
Integer
getMinQuantity
()
{
return
minQuantity
;
}
public
ServeLicenseDTO
setMinQuantity
(
Integer
minQuantity
)
{
this
.
minQuantity
=
minQuantity
;
return
this
;
}
public
Integer
getMaxQuantity
()
{
return
maxQuantity
;
}
public
ServeLicenseDTO
setMaxQuantity
(
Integer
maxQuantity
)
{
this
.
maxQuantity
=
maxQuantity
;
return
this
;
}
public
Integer
getPriceType
()
{
return
priceType
;
}
public
ServeLicenseDTO
setPriceType
(
Integer
priceType
)
{
this
.
priceType
=
priceType
;
return
this
;
}
public
BigDecimal
getUnitPrice
()
{
return
unitPrice
;
}
public
ServeLicenseDTO
setUnitPrice
(
BigDecimal
unitPrice
)
{
this
.
unitPrice
=
unitPrice
;
return
this
;
}
public
String
getPriceDetail
()
{
return
priceDetail
;
}
public
ServeLicenseDTO
setPriceDetail
(
String
priceDetail
)
{
this
.
priceDetail
=
priceDetail
;
return
this
;
}
public
Integer
getAppType
()
{
return
appType
;
}
public
ServeLicenseDTO
setAppType
(
Integer
appType
)
{
this
.
appType
=
appType
;
return
this
;
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
ServeLicenseDTO
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
return
this
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
ServeLicenseDTO
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
return
this
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
ServeLicenseDTO
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
return
this
;
}
public
String
getLicenseCode
()
{
return
licenseCode
;
}
public
ServeLicenseDTO
setLicenseCode
(
String
licenseCode
)
{
this
.
licenseCode
=
licenseCode
;
return
this
;
}
public
String
getServeName
()
{
return
serveName
;
}
public
ServeLicenseDTO
setServeName
(
String
serveName
)
{
this
.
serveName
=
serveName
;
return
this
;
}
public
String
getApplicationName
()
{
return
applicationName
;
}
public
ServeLicenseDTO
setApplicationName
(
String
applicationName
)
{
this
.
applicationName
=
applicationName
;
return
this
;
}
public
String
getAppCategoryName
()
{
return
appCategoryName
;
}
public
ServeLicenseDTO
setAppCategoryName
(
String
appCategoryName
)
{
this
.
appCategoryName
=
appCategoryName
;
return
this
;
}
public
String
getApplicationUrl
()
{
return
applicationUrl
;
}
public
ServeLicenseDTO
setApplicationUrl
(
String
applicationUrl
)
{
this
.
applicationUrl
=
applicationUrl
;
return
this
;
}
public
String
getIsvAccount
()
{
return
isvAccount
;
}
public
ServeLicenseDTO
setIsvAccount
(
String
isvAccount
)
{
this
.
isvAccount
=
isvAccount
;
return
this
;
}
public
String
getIsvName
()
{
return
isvName
;
}
public
ServeLicenseDTO
setIsvName
(
String
isvName
)
{
this
.
isvName
=
isvName
;
return
this
;
}
public
String
getServeImageUrl
()
{
return
serveImageUrl
;
}
public
ServeLicenseDTO
setServeImageUrl
(
String
serveImageUrl
)
{
this
.
serveImageUrl
=
serveImageUrl
;
return
this
;
}
public
Integer
getBuyQuantity
()
{
return
buyQuantity
;
}
public
ServeLicenseDTO
setBuyQuantity
(
Integer
buyQuantity
)
{
this
.
buyQuantity
=
buyQuantity
;
return
this
;
}
public
BigDecimal
getBuyPrice
()
{
return
buyPrice
;
}
public
ServeLicenseDTO
setBuyPrice
(
BigDecimal
buyPrice
)
{
this
.
buyPrice
=
buyPrice
;
return
this
;
}
public
boolean
isBuy
()
{
return
isBuy
;
}
public
ServeLicenseDTO
setBuy
(
boolean
buy
)
{
isBuy
=
buy
;
return
this
;
}
public
Integer
getValidQuantity
()
{
return
validQuantity
;
}
public
ServeLicenseDTO
setValidQuantity
(
Integer
validQuantity
)
{
this
.
validQuantity
=
validQuantity
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/utils/LicenseUtils.java
View file @
ee2f9e08
...
...
@@ -2,13 +2,13 @@ package com.gic.enterprise.utils;
public
class
LicenseUtils
{
public
static
final
String
GOODS_LICENSE_
NAME
=
"商品数量
"
;
public
static
final
String
MEMBER_CARD_LICENSE_
NAME
=
"会员卡
"
;
public
static
final
String
SERVICE_CARD_LICENSE_
NAME
=
"服务号
"
;
public
static
final
String
WECHAT_LICENSE_
NAME
=
"小程序
"
;
public
static
final
String
STORE_LICENSE_
NAME
=
"门店
"
;
public
static
final
String
GOODS_LICENSE_
CODE
=
"Item_Number
"
;
public
static
final
String
MEMBER_CARD_LICENSE_
CODE
=
"member_card
"
;
public
static
final
String
SERVICE_CARD_LICENSE_
CODE
=
"wxfwh
"
;
public
static
final
String
WECHAT_LICENSE_
CODE
=
"wxapp
"
;
public
static
final
String
STORE_LICENSE_
CODE
=
"165165
"
;
public
static
boolean
isGoodsLicense
(
String
license
Nam
e
)
{
return
GOODS_LICENSE_
NAME
.
equals
(
licenseNam
e
);
public
static
boolean
isGoodsLicense
(
String
license
Cod
e
)
{
return
GOODS_LICENSE_
CODE
.
equals
(
licenseCod
e
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/CustomUdeskFieldApiServiceImpl.java
View file @
ee2f9e08
...
...
@@ -22,18 +22,8 @@ public class CustomUdeskFieldApiServiceImpl implements CustomUdeskFieldApiServic
@Override
public
ServiceResponse
<
List
<
CustomChatFiledDTO
>>
listAllField
()
{
String
key
=
"custom:chat:field"
;
Object
cache
=
RedisUtil
.
getCache
(
key
);
if
(
cache
!=
null
){
List
<
CustomChatFiledDTO
>
list
=
(
List
<
CustomChatFiledDTO
>)
cache
;
return
ServiceResponse
.
success
(
list
);
}
List
<
CustomChatFiledDTO
>
list
=
new
ArrayList
<>();
for
(
WechatServiceFieldEnum
fieldEnum
:
WechatServiceFieldEnum
.
values
())
{
list
.
add
(
new
CustomChatFiledDTO
(
fieldEnum
.
getMessage
(),
String
.
valueOf
(
fieldEnum
.
getCode
()),
fieldEnum
.
getFieldType
()));
}
RedisUtil
.
setCache
(
key
,
list
);
return
ServiceResponse
.
success
(
list
);
return
ServiceResponse
.
success
();
}
@Override
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/EnterpriseApiServiceImpl.java
View file @
ee2f9e08
...
...
@@ -2,10 +2,14 @@ package com.gic.enterprise.service.outer.impl;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.gic.commons.util.CollectionUtil
;
import
com.gic.enterprise.constant.BillingAuditStatusEnum
;
import
com.gic.enterprise.dto.market.ServeLicenseDTO
;
import
com.gic.enterprise.utils.LicenseUtils
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
com.gic.open.api.service.EnterpriseLicenseApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -90,6 +94,8 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
private
DataConfigApiService
dataConfigApiService
;
@Autowired
private
SmsSendApiService
smsSendApiService
;
@Autowired
private
EnterpriseLicenseApiService
enterpriseLicenseApiService
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -438,24 +444,24 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
List
<
com
.
gic
.
enterprise
.
dto
.
market
.
OrderBuyLicenseDTO
>
orderBuyLicenseDTOList
=
basicParams
.
getLicenseList
();
List
<
OrderBuyLicenseDTO
>
licenseListParams
=
EntityUtil
.
changeEntityListNew
(
OrderBuyLicenseDTO
.
class
,
orderBuyLicenseDTOList
);
if
(
basicParams
.
getOrderType
()
!=
null
&&
basicParams
.
getOrderType
().
intValue
()
==
4
&&
CollectionUtils
.
isEmpty
(
licenseListParams
))
{
//扩容
if
(!
basicParams
.
isCommitFlag
())
{
//获取基本数据信息
List
<
EnterpriseLicenseDTO
>
gicLicenseList
=
enterpriseLicenseService
.
listByEnterpriseId
(
basicParams
.
getEnterpriseId
().
intValue
());
if
(
CollectionUtils
.
isNotEmpty
(
gicLicenseList
))
{
licenseListParams
=
new
ArrayList
<>();
for
(
EnterpriseLicenseDTO
licenseDTO
:
gicLicenseList
)
{
OrderBuyLicenseDTO
temp
=
new
OrderBuyLicenseDTO
();
temp
.
setLicenseId
(
licenseDTO
.
getLicenseId
());
temp
.
setNum
(
licenseDTO
.
getUpperLimit
());
licenseListParams
.
add
(
temp
);
}
}
}
}
//
if (basicParams.getOrderType() != null && basicParams.getOrderType().intValue() == 4
//
&& CollectionUtils.isEmpty(licenseListParams)) {
//
//扩容
//
if (!basicParams.isCommitFlag()) {
//
//获取基本数据信息
//
List<EnterpriseLicenseDTO> gicLicenseList = enterpriseLicenseService
//
.listByEnterpriseId(basicParams.getEnterpriseId().intValue());
//
if (CollectionUtils.isNotEmpty(gicLicenseList)) {
//
licenseListParams = new ArrayList<>();
//
for (EnterpriseLicenseDTO licenseDTO : gicLicenseList) {
//
OrderBuyLicenseDTO temp = new OrderBuyLicenseDTO();
//
temp.setLicenseId(licenseDTO.getLicenseId());
//
temp.setNum(licenseDTO.getUpperLimit());
//
licenseListParams.add(temp);
//
}
//
}
//
}
//
}
ServiceResponse
<
OrderCheckDTO
>
result
=
orderPurchaseApiService
.
buyForGic
(
basicParams
.
getEnterpriseId
(),
basicParams
.
getName
(),
basicParams
.
getSkuId
(),
basicParams
.
getCouponLogId
(),
basicParams
.
getOrderType
(),
...
...
@@ -486,9 +492,10 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
}
else
if
(
serviceType
==
2
)
{
//license
LicenseDTO
license
=
EntityUtil
.
changeEntityNew
(
LicenseDTO
.
class
,
orderItem
);
license
.
setLicenseDetail
(
EntityUtil
.
changeEntityNew
(
ServeLicenseDTO
.
class
,
orderItem
.
getLicenseDetail
()));
//没有商品权限
if
(!
hasGoodsAuth
)
{
if
(
LicenseUtils
.
GOODS_LICENSE_NAME
.
equals
(
orderItem
.
getServeNam
e
()))
{
if
(
LicenseUtils
.
isGoodsLicense
(
orderItem
.
getLicenseDetail
().
getLicenseCod
e
()))
{
continue
;
}
}
...
...
@@ -517,7 +524,20 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
@Override
public
ServiceResponse
<
List
<
EnterpriseLicenseDTO
>>
listEnterpriseLicense
(
Integer
enterpriseId
)
{
return
ServiceResponse
.
success
(
enterpriseLicenseService
.
listByEnterpriseId
(
enterpriseId
));
ServiceResponse
<
List
<
ApplicationLicenseDTO
>>
hasBuyLicense
=
enterpriseLicenseApiService
.
listEnterpriseBuyLicense
(
Arrays
.
asList
(
enterpriseId
));
if
(
hasBuyLicense
.
isSuccess
())
{
List
<
ApplicationLicenseDTO
>
licenseList
=
hasBuyLicense
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
licenseList
))
{
return
ServiceResponse
.
success
(
licenseList
.
stream
()
.
map
(
e
->
new
EnterpriseLicenseDTO
()
.
setLicenseId
(
e
.
getLicenseId
())
.
setUpperLimit
(
e
.
getQuantity
())
.
setLicenseName
(
e
.
getLicenseName
())
.
setLicenseCode
(
e
.
getLicenseCode
())
).
collect
(
Collectors
.
toList
()));
}
}
return
ServiceResponse
.
success
(
Collections
.
emptyList
());
}
@Override
...
...
gic-platform-enterprise-service/src/main/resources/dubbo-gic-platform-enterprise-service.xml
View file @
ee2f9e08
...
...
@@ -143,4 +143,6 @@
<dubbo:reference
interface=
"com.gic.wechat.business.api.service.wxa.WeixinWxaFunService"
id=
"weixinWxaFunService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.weimob.api.service.WeimobMerchantService"
id=
"weimobMerchantService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.open.api.service.EnterpriseLicenseApiService"
id=
"enterpriseLicenseApiService"
timeout=
"6000"
/>
</beans>
gic-platform-enterprise-service/src/main/resources/mapper/TabAppletCustomPageMapper.xml
View file @
ee2f9e08
...
...
@@ -196,7 +196,10 @@
</update>
<select
id=
"listByParams"
resultMap=
"BaseResultMap"
parameterType=
"com.gic.enterprise.qo.AppletPageQO"
>
select
<include
refid=
"Base_Column_List"
></include>
select
<include
refid=
"Base_Column_List"
></include>
,
<include
refid=
"Blob_Column_List"
/>
from tab_applet_custom_page
where status between 1 and 2
<if
test=
"search != null and search != '' "
>
...
...
@@ -233,7 +236,10 @@
</update>
<select
id=
"listEnablePage"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
select
<include
refid=
"Base_Column_List"
></include>
,
<include
refid=
"Blob_Column_List"
/>
from tab_applet_custom_page
where status = 1
and enterprise_id = #{enterpriseId}
...
...
@@ -252,7 +258,10 @@
</select>
<select
id=
"getDefault"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
select
<include
refid=
"Base_Column_List"
></include>
,
<include
refid=
"Blob_Column_List"
/>
from tab_applet_custom_page
where status = 1
and enterprise_id = -1
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabCustomUdeskFieldMapper.xml
View file @
ee2f9e08
...
...
@@ -89,7 +89,7 @@
#{appId,jdbcType=VARCHAR},
</if>
<if
test=
"fieldType != null"
>
#{field
_t
ype,jdbcType=INTEGER},
#{field
T
ype,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=INTEGER},
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabEnterpriseMapper.xml
View file @
ee2f9e08
...
...
@@ -283,7 +283,6 @@
a.company_name companyName,
a.create_time createTime,
a.is_init_complete isInitComplete,
GROUP_CONCAT(concat(b.license_name,':',b.upper_limit) separator '-') licenseUpperLimitStr,
a.version_code versionCode,
a.version_name versionName,
a.audit_time expirationTime,
...
...
@@ -291,7 +290,6 @@
if(a.audit_time is not null, DATEDIFF(a.audit_time, now()), 0) aboutToExpireDay
FROM
tab_enterprise a
LEFT JOIN tab_enterprise_license b ON a.enterprise_id = b.enterprise_id
where status = 1
<if
test=
"search != null and search != '' "
>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/CustomChatController.java
View file @
ee2f9e08
...
...
@@ -8,6 +8,7 @@ import com.gic.enterprise.constant.applet.AppletPageTypeEnum;
import
com.gic.enterprise.dto.AppletCustomPageDTO
;
import
com.gic.enterprise.dto.CustomChatFiledDTO
;
import
com.gic.enterprise.dto.CustomUdeskFieldDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.qo.AppletPageQO
;
import
com.gic.enterprise.service.AppletCustomPageApiService
;
import
com.gic.enterprise.service.CustomUdeskFieldApiService
;
...
...
@@ -15,6 +16,7 @@ import com.gic.enterprise.utils.ResultControllerUtils;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.apache.catalina.User
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -64,6 +66,9 @@ public class CustomChatController {
@RequestMapping
(
"list-enterprise-field"
)
public
RestResponse
listEnterpriseField
(
String
appId
)
{
if
(
StringUtils
.
isBlank
(
appId
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"appId不能为空"
);
}
//初始化
for
(
WechatServiceFieldEnum
fieldEnum
:
WechatServiceFieldEnum
.
values
())
{
customUdeskFieldApiService
.
saveEnterpriseField
(
new
CustomUdeskFieldDTO
()
...
...
@@ -71,7 +76,7 @@ public class CustomChatController {
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
())
.
setGicFieldId
(
fieldEnum
.
getCode
())
.
setGicFieldName
(
fieldEnum
.
getMessage
())
.
setStatus
(
0
)
.
setStatus
(
2
)
.
setFieldType
(
fieldEnum
.
getFieldType
()));
}
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/EnterpriseController.java
View file @
ee2f9e08
...
...
@@ -7,9 +7,12 @@ import java.util.stream.Collectors;
import
com.gic.authcenter.security.core.constant.DataResourceEnum
;
import
com.gic.authcenter.security.core.dto.AuthcenterUserDetails
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.dto.*
;
import
com.gic.marketing.api.service.sms.SmsOuterApiService
;
import
com.gic.member.config.api.dto.OwnerMemberCardDTO
;
import
com.gic.member.config.api.service.MemberCardApiService
;
import
com.gic.open.api.dto.ApplicationLicenseDTO
;
import
com.gic.open.api.service.*
;
import
com.gic.operation.web.vo.MemberCardVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -36,10 +39,6 @@ import com.gic.commons.webapi.reponse.RestResponse;
import
com.gic.enterprise.constant.EnterpriseInitCodeEnum
;
import
com.gic.enterprise.constant.EnterpriseListOrderByEnum
;
import
com.gic.enterprise.constant.EnterpriseVersionStatusEnum
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.EnterpriseInitDTO
;
import
com.gic.enterprise.dto.EnterpriseLicenseDTO
;
import
com.gic.enterprise.dto.EnterpriseResourceRelDTO
;
import
com.gic.enterprise.dto.market.OrderBuyLicenseDTO
;
import
com.gic.enterprise.dto.market.OrderGicDTO
;
import
com.gic.enterprise.error.ErrorCode
;
...
...
@@ -60,10 +59,6 @@ import com.gic.open.api.dto.ApplicationTokenDTO;
import
com.gic.open.api.dto.OrderDTO
;
import
com.gic.open.api.dto.OrderItemDTO
;
import
com.gic.open.api.dto.market.MarketUserDTO
;
import
com.gic.open.api.service.AppTokenApiService
;
import
com.gic.open.api.service.CouponApiService
;
import
com.gic.open.api.service.OrderApiService
;
import
com.gic.open.api.service.ServeApiService
;
import
com.gic.open.api.service.market.MarketAppCategoryApiService
;
import
com.gic.open.api.service.market.MarketUserApiService
;
import
com.gic.operation.web.qo.PageQO
;
...
...
@@ -112,6 +107,8 @@ public class EnterpriseController {
private
MemberCardApiService
memberCardApiService
;
@Autowired
private
SmsOuterApiService
smsOuterApiService
;
@Autowired
private
EnterpriseLicenseApiService
enterpriseLicenseApiService
;
@RequestMapping
(
"/save-enterprise"
)
public
RestResponse
saveEnterprise
(
...
...
@@ -186,7 +183,48 @@ public class EnterpriseController {
if
(
permissionAll
)
{
params
.
setListAll
(
1
);
}
return
ResultControllerUtils
.
commonResult
(
enterpriseApiService
.
listEnterprise
(
params
));
ServiceResponse
<
Page
<
EnterpriseListDTO
>>
response
=
enterpriseApiService
.
listEnterprise
(
params
);
if
(
response
.
isSuccess
())
{
Page
<
EnterpriseListDTO
>
pageResult
=
response
.
getResult
();
if
(
pageResult
!=
null
)
{
List
<
EnterpriseListDTO
>
listResult
=
pageResult
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
listResult
))
{
List
<
Integer
>
tempEnterpriseIdList
=
listResult
.
stream
()
.
filter
(
e
->
e
.
getServiceStatus
().
intValue
()
!=
0
)
.
map
(
e
->
e
.
getEnterpriseId
())
.
collect
(
Collectors
.
toList
());
//实时查询license数据
ServiceResponse
<
List
<
ApplicationLicenseDTO
>>
hasBuyLicense
=
enterpriseLicenseApiService
.
listEnterpriseBuyLicense
(
tempEnterpriseIdList
);
if
(
hasBuyLicense
.
isSuccess
())
{
List
<
ApplicationLicenseDTO
>
licenseList
=
hasBuyLicense
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
licenseList
))
{
Map
<
String
,
List
<
ApplicationLicenseDTO
>>
licenseMap
=
CollectionUtil
.
group
(
licenseList
,
"enterpriseId"
);
listResult
.
forEach
(
e
->
{
List
<
ApplicationLicenseDTO
>
tempLicense
=
licenseMap
.
get
(
Long
.
valueOf
(
e
.
getEnterpriseId
()));
if
(
CollectionUtils
.
isNotEmpty
(
tempLicense
))
{
Set
<
String
>
licenseCodeSet
=
new
HashSet
<>(
Arrays
.
asList
(
"165165"
,
"member_card"
,
"wxapp"
,
"wxfwh"
));
Map
<
String
,
Integer
>
showLicenseMap
=
new
HashMap
<>(
8
);
tempLicense
.
forEach
(
license
->
{
if
(
licenseCodeSet
.
contains
(
license
.
getLicenseCode
()))
{
showLicenseMap
.
put
(
license
.
getLicenseCode
(),
license
.
getQuantity
());
}
});
Integer
memberCardNum
=
showLicenseMap
.
get
(
"member_card"
)
==
null
?
0
:
showLicenseMap
.
get
(
"member_card"
);
Integer
wxfwhNum
=
showLicenseMap
.
get
(
"wxfwh"
)
==
null
?
0
:
showLicenseMap
.
get
(
"wxfwh"
);
Integer
wxappNum
=
showLicenseMap
.
get
(
"wxapp"
)
==
null
?
0
:
showLicenseMap
.
get
(
"wxapp"
);
Integer
storeNum
=
showLicenseMap
.
get
(
"165165"
)
==
null
?
0
:
showLicenseMap
.
get
(
"165165"
);
e
.
setServiceInfo
(
memberCardNum
+
"-"
+
wxfwhNum
+
"-"
+
wxappNum
+
"-"
+
storeNum
);
}
});
}
}
}
return
RestResponse
.
success
(
pageResult
);
}
}
return
ResultControllerUtils
.
commonResult
(
response
);
}
/**
...
...
gic-platform-operation-web/src/main/resources/dubbo-gic-platform-operation-web.xml
View file @
ee2f9e08
...
...
@@ -92,4 +92,5 @@
<dubbo:reference
interface=
"com.gic.authcenter.api.service.GicDepartmentService"
id=
"gicDepartmentService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.member.config.api.service.MemberCardApiService"
id=
"memberCardApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.open.api.service.EnterpriseLicenseApiService"
id=
"enterpriseLicenseApiService"
timeout=
"6000"
/>
</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