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
8312c6d9
Commit
8312c6d9
authored
May 14, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!5
parents
f7c2c05e
557c7cfb
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
344 additions
and
26 deletions
+344
-26
AppletPageTypeEnum.java
...om/gic/enterprise/constant/applet/AppletPageTypeEnum.java
+18
-0
AppletCustomPageDTO.java
...main/java/com/gic/enterprise/dto/AppletCustomPageDTO.java
+14
-0
AppletQrcodePathDTO.java
...main/java/com/gic/enterprise/dto/AppletQrcodePathDTO.java
+42
-0
CouponConfigQO.java
...rc/main/java/com/gic/enterprise/qo/wm/CouponConfigQO.java
+28
-0
AppletQrcodeApiService.java
...va/com/gic/enterprise/service/AppletQrcodeApiService.java
+2
-2
BillingAccountApiService.java
.../com/gic/enterprise/service/BillingAccountApiService.java
+10
-0
EnterpriseApiService.java
...java/com/gic/enterprise/service/EnterpriseApiService.java
+10
-0
TabAppletCustomPage.java
...n/java/com/gic/enterprise/entity/TabAppletCustomPage.java
+15
-0
AppletCustomPageApiServiceImpl.java
...se/service/outer/impl/AppletCustomPageApiServiceImpl.java
+11
-0
AppletQrcodeApiServiceImpl.java
...rprise/service/outer/impl/AppletQrcodeApiServiceImpl.java
+12
-9
BillingAccountApiServiceImpl.java
...rise/service/outer/impl/BillingAccountApiServiceImpl.java
+24
-0
EnterpriseApiServiceImpl.java
...terprise/service/outer/impl/EnterpriseApiServiceImpl.java
+39
-0
ProjectApiServiceImpl.java
.../enterprise/service/outer/impl/ProjectApiServiceImpl.java
+10
-3
TabAppletCustomPageMapper.xml
...e/src/main/resources/mapper/TabAppletCustomPageMapper.xml
+15
-3
TabWmStoreCouponConfigMapper.xml
...rc/main/resources/mapper/TabWmStoreCouponConfigMapper.xml
+6
-0
AuditLogController.java
...com/gic/enterprise/web/controller/AuditLogController.java
+2
-1
BillingPayInfoController.java
...c/enterprise/web/controller/BillingPayInfoController.java
+1
-0
PackageController.java
.../com/gic/enterprise/web/controller/PackageController.java
+2
-1
WmStoreSyncController.java
...c/enterprise/web/controller/wm/WmStoreSyncController.java
+61
-0
AppletPageDetailVO.java
...in/java/com/gic/enterprise/web/vo/AppletPageDetailVO.java
+14
-0
wm_store_import_template.xls
...main/resources/exceltemplate/wm_store_import_template.xls
+0
-0
EnterpriseController.java
...om/gic/operation/web/controller/EnterpriseController.java
+7
-6
PlatformBrandQO.java
...c/main/java/com/gic/operation/web/qo/PlatformBrandQO.java
+1
-1
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/applet/AppletPageTypeEnum.java
View file @
8312c6d9
...
...
@@ -79,6 +79,24 @@ public enum AppletPageTypeEnum {
return
false
;
}
/**
* 是否需要设置页面背景字段的页面
* @param code
* @return
*/
public
static
boolean
hasBackgroundColor
(
Integer
code
)
{
if
(
code
==
null
)
{
return
false
;
}
if
(
MEMBER_CENTER
.
getCode
()
==
code
.
intValue
()
||
CUSTOM
.
getCode
()
==
code
.
intValue
()
||
INTEGRAL_SERVICE
.
getCode
()
==
code
.
intValue
()
||
MALL_HOME_PAGE
.
getCode
()
==
code
.
intValue
())
{
return
true
;
}
return
false
;
}
private
AppletPageTypeEnum
(
int
code
,
String
message
,
int
type
,
int
hasDefault
)
{
this
.
code
=
code
;
this
.
message
=
message
;
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/AppletCustomPageDTO.java
View file @
8312c6d9
...
...
@@ -34,6 +34,11 @@ public class AppletCustomPageDTO implements Serializable{
private
Integer
entryCondition
;
/**
* 背景颜色 1:灰色 2:白色 ,默认灰色(会员中心页面、积分服务页面、自定义页面、商城装首页 有该设置)
*/
private
String
backgroundColor
;
/**
* 1:自定义 2:会员中心,3:客服页面
*/
private
Integer
pageType
;
...
...
@@ -167,4 +172,13 @@ public class AppletCustomPageDTO implements Serializable{
public
void
setComponentStr
(
String
componentStr
)
{
this
.
componentStr
=
componentStr
;
}
public
String
getBackgroundColor
()
{
return
backgroundColor
;
}
public
AppletCustomPageDTO
setBackgroundColor
(
String
backgroundColor
)
{
this
.
backgroundColor
=
backgroundColor
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/AppletQrcodePathDTO.java
0 → 100644
View file @
8312c6d9
package
com
.
gic
.
enterprise
.
dto
;
import
java.io.Serializable
;
public
class
AppletQrcodePathDTO
implements
Serializable
{
private
String
fileId
;
private
String
url
;
private
String
downloadUrl
;
private
String
path
;
public
String
getFileId
()
{
return
fileId
;
}
public
void
setFileId
(
String
fileId
)
{
this
.
fileId
=
fileId
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getDownloadUrl
()
{
return
downloadUrl
;
}
public
void
setDownloadUrl
(
String
downloadUrl
)
{
this
.
downloadUrl
=
downloadUrl
;
}
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/qo/wm/CouponConfigQO.java
View file @
8312c6d9
...
...
@@ -43,6 +43,16 @@ public class CouponConfigQO extends PageQO implements Serializable{
*/
private
Integer
orderByCode
;
/**
* 绑定开始时间 2020-05-12
*/
private
String
startTime
;
/**
* 绑定时间
*/
private
String
endTime
;
public
Integer
getWmMallStoreId
()
{
return
wmMallStoreId
;
}
...
...
@@ -96,4 +106,22 @@ public class CouponConfigQO extends PageQO implements Serializable{
this
.
orderByCode
=
orderByCode
;
return
this
;
}
public
String
getStartTime
()
{
return
startTime
;
}
public
CouponConfigQO
setStartTime
(
String
startTime
)
{
this
.
startTime
=
startTime
;
return
this
;
}
public
String
getEndTime
()
{
return
endTime
;
}
public
CouponConfigQO
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/AppletQrcodeApiService.java
View file @
8312c6d9
...
...
@@ -2,11 +2,11 @@ package com.gic.enterprise.service;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.dto.AppletQrcodeDTO
;
import
com.gic.enterprise.dto.AppletQrcodePathDTO
;
import
java.util.Map
;
public
interface
AppletQrcodeApiService
{
ServiceResponse
<
Map
<
String
,
Object
>
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
);
ServiceResponse
<
AppletQrcodePathDTO
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
);
ServiceResponse
<
AppletQrcodeDTO
>
getAppletQrcode
(
Integer
id
);
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/BillingAccountApiService.java
View file @
8312c6d9
...
...
@@ -86,4 +86,14 @@ public interface BillingAccountApiService {
* @throws
*/
ServiceResponse
<
Integer
>
deductAccount
(
double
totalFee
,
Integer
enterpriseId
);
/**
* 余额欠费提醒发短信
* @Title: balanceTask
* @Description:
* @author guojuxing
* @param param
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
balanceTask
(
String
param
);
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/EnterpriseApiService.java
View file @
8312c6d9
...
...
@@ -230,4 +230,14 @@ public interface EnterpriseApiService {
* @return
*/
ServiceResponse
<
Void
>
overdueReminder
(
String
param
);
/**
* 商户基础服务到期提醒
* @Title: expireReminder
* @Description:
* @author guojuxing
* @param param
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
expireReminder
(
String
param
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabAppletCustomPage.java
View file @
8312c6d9
...
...
@@ -27,6 +27,11 @@ public class TabAppletCustomPage {
private
Integer
entryCondition
;
/**
* 背景颜色 灰色 白色 ,默认灰色(会员中心页面、积分服务页面、自定义页面、商城装首页 有该设置)
*/
private
String
backgroundColor
;
/**
* 1:自定义 2:会员卡 3:积分 4:特权 5:集团 6:会员中心,7:客服页面,8:积分服务页
*/
private
Integer
pageType
;
...
...
@@ -148,4 +153,13 @@ public class TabAppletCustomPage {
public
void
setSetting
(
String
setting
)
{
this
.
setting
=
setting
;
}
public
String
getBackgroundColor
()
{
return
backgroundColor
;
}
public
TabAppletCustomPage
setBackgroundColor
(
String
backgroundColor
)
{
this
.
backgroundColor
=
backgroundColor
;
return
this
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletCustomPageApiServiceImpl.java
View file @
8312c6d9
...
...
@@ -91,6 +91,16 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面类型错误"
);
}
String
backgroundColor
=
jsonObject
.
getString
(
"backgroundColor"
);
if
(
AppletPageTypeEnum
.
hasBackgroundColor
(
pageType
))
{
if
(
backgroundColor
==
null
)
{
backgroundColor
=
"#f6f6f6"
;
}
}
else
{
//其他页面默认设置null
backgroundColor
=
null
;
}
//填充实体类
TabAppletCustomPage
record
=
new
TabAppletCustomPage
();
record
.
setEnterpriseId
(
enterpriseId
);
...
...
@@ -103,6 +113,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
record
.
setEntryCondition
(
entryCondition
);
record
.
setSetting
(
jsonObject
.
getString
(
"setting"
));
record
.
setPageType
(
pageType
);
record
.
setBackgroundColor
(
backgroundColor
);
//如果是有默认数据的类型(会员中心),第一条记录,即使saveType = 2,也自动变成1
if
(
AppletPageTypeEnum
.
hasDefault
(
pageType
))
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletQrcodeApiServiceImpl.java
View file @
8312c6d9
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.dto.AppletQrcodeDTO
;
import
com.gic.enterprise.dto.AppletQrcodePathDTO
;
import
com.gic.enterprise.entity.TabAppletQrcode
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.AppletQrcodeApiService
;
...
...
@@ -23,30 +25,31 @@ public class AppletQrcodeApiServiceImpl implements AppletQrcodeApiService {
private
WeixinWxaFunService
weixinWxaFunService
;
@Override
public
ServiceResponse
<
Map
<
String
,
Object
>
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
)
{
public
ServiceResponse
<
AppletQrcodePathDTO
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
)
{
TabAppletQrcode
tabAppletQrcode
=
new
TabAppletQrcode
();
tabAppletQrcode
.
setAppid
(
appid
);
tabAppletQrcode
.
setEnterpriseId
(
enterpriseId
);
tabAppletQrcode
.
setPath
(
path
);
tabAppletQrcode
.
setParams
(
params
);
int
i
=
this
.
appletQrcodeService
.
saveQrcode
(
tabAppletQrcode
);
ServiceResponse
<
Map
<
String
,
Object
>>
wxaQrcode
=
this
.
weixinWxaFunService
.
createWxaQrcode
(
appid
,
path
,
1280
);
ServiceResponse
<
Map
<
String
,
Object
>>
wxaQrcode
=
this
.
weixinWxaFunService
.
getWxaCodeUnlimit
(
appid
,
"pages/transfer-station/transfer-station"
,
i
+
""
);
if
(
wxaQrcode
.
isSuccess
()){
Map
<
String
,
Object
>
result
=
wxaQrcode
.
getResult
();
byte
[]
contents
=
(
byte
[])
result
.
get
(
"content"
);
UploadResult
uploadResult
=
QQCloudPicUtils
.
uploadLocalPicStream
(
"pic01"
,
""
,
contents
);
Map
<
String
,
Object
>
pic
=
new
HashMap
<>
();
pic
.
put
(
"fileId"
,
uploadResult
.
getFileId
());
pic
.
put
(
"url"
,
uploadResult
.
getUrl
());
pic
.
put
(
"downloadUrl"
,
uploadResult
.
getDownloadUrl
());
pic
.
put
(
"path"
,
path
+
"?pageId="
+
i
);
ServiceResponse
.
success
(
pic
);
AppletQrcodePathDTO
qrcodePathDTO
=
new
AppletQrcodePathDTO
();
qrcodePathDTO
.
setFileId
(
uploadResult
.
getFileId
());
qrcodePathDTO
.
setUrl
(
uploadResult
.
getUrl
());
qrcodePathDTO
.
setDownloadUrl
(
uploadResult
.
getDownloadUrl
());
qrcodePathDTO
.
setPath
(
path
+
"?pageId="
+
i
);
ServiceResponse
.
success
(
qrcodePathDTO
);
}
return
ServiceResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"生成小程序二维码异常"
);
}
@Override
public
ServiceResponse
<
AppletQrcodeDTO
>
getAppletQrcode
(
Integer
id
)
{
return
null
;
TabAppletQrcode
qrcode
=
this
.
appletQrcodeService
.
getQrcode
(
id
);
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityByJSON
(
AppletQrcodeDTO
.
class
,
qrcode
));
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingAccountApiServiceImpl.java
View file @
8312c6d9
...
...
@@ -16,6 +16,7 @@ import com.gic.enterprise.entity.TabEnterprise;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.enterprise.service.*
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -52,6 +53,8 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
private
BillingOrderApiService
billingOrderApiService
;
@Autowired
private
Config
config
;
@Autowired
private
SmsSendApiService
smsSendApiService
;
@Override
public
ServiceResponse
<
BillingAccountDTO
>
getByEnterpriseId
(
Integer
enterpriseId
)
{
...
...
@@ -248,6 +251,27 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
}
}
@Override
public
ServiceResponse
<
Void
>
balanceTask
(
String
param
)
{
//查询所有的商户
List
<
EnterpriseDTO
>
enterpriseDTOList
=
enterpriseService
.
listEnterprise
();
for
(
EnterpriseDTO
enterpriseDTO
:
enterpriseDTOList
)
{
Integer
enterpriseId
=
enterpriseDTO
.
getEnterpriseId
();
TabBillingAccount
account
=
this
.
billingAccountService
.
getByEnterpriseId
(
enterpriseId
);
if
(
account
.
getAccountBalance
()
<=
0
)
{
String
[]
smsArr
=
new
String
[]{
enterpriseDTO
.
getEnterpriseName
(),
String
.
valueOf
(-
account
.
getAccountBalance
())};
ServiceResponse
<
UserDTO
>
userResult
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
);
UserDTO
userDTO
=
userResult
.
getResult
();
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GICJFZX001"
,
enterpriseId
,
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
return
ServiceResponse
.
success
();
}
private
void
sendTotoItem
(
Integer
enterpriseId
)
{
TodoItemDTO
todoItemDTO
=
new
TodoItemDTO
();
UserDTO
userDTO
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
).
getResult
();
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/EnterpriseApiServiceImpl.java
View file @
8312c6d9
...
...
@@ -3,6 +3,8 @@ package com.gic.enterprise.service.outer.impl;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
com.gic.enterprise.constant.BillingAuditStatusEnum
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -85,6 +87,8 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
private
PushMessageApiService
pushMessageApiService
;
@Autowired
private
DataConfigApiService
dataConfigApiService
;
@Autowired
private
SmsSendApiService
smsSendApiService
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -582,6 +586,16 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
if
(
days
<=
7
){
this
.
pushMessageApiService
.
pushMessage
(
enterpriseDTO
.
getEnterpriseId
(),
"系统消息"
,
"GIC版本即将过期"
,
"您的GIC版本即将在"
+
days
+
"天到期,为了不影响业务的开展,请及时续费"
);
//发送超级管理员短信通知
String
[]
smsArr
=
new
String
[]{
enterpriseDTO
.
getEnterpriseName
()};
ServiceResponse
<
UserDTO
>
userResult
=
userApiService
.
getUserByEnterpriseId
(
enterpriseDTO
.
getEnterpriseId
());
UserDTO
userDTO
=
userResult
.
getResult
();
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GICJFZX002"
,
userDTO
.
getEnterpriseId
(),
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
@@ -590,6 +604,31 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
return
null
;
}
@Override
public
ServiceResponse
<
Void
>
expireReminder
(
String
param
)
{
List
<
EnterpriseDTO
>
list
=
this
.
enterpriseService
.
listEnterprise
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
today
=
sdf
.
format
(
new
Date
());
for
(
EnterpriseDTO
enterpriseDTO
:
list
)
{
if
(
StringUtils
.
isNotBlank
(
enterpriseDTO
.
getVersionCode
()))
{
Date
expireDate
=
enterpriseDTO
.
getAuditTime
();
if
(
today
.
compareTo
(
sdf
.
format
(
expireDate
))
>=
0
)
{
//过期时间小于等于今天,发短信
//发送超级管理员短信通知
String
[]
smsArr
=
new
String
[]{
enterpriseDTO
.
getEnterpriseName
()};
ServiceResponse
<
UserDTO
>
userResult
=
userApiService
.
getUserByEnterpriseId
(
enterpriseDTO
.
getEnterpriseId
());
UserDTO
userDTO
=
userResult
.
getResult
();
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GICJFZX003"
,
userDTO
.
getEnterpriseId
(),
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
}
return
ServiceResponse
.
success
();
}
private
String
getVersionNameFromJson
(
String
jsonStr
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonStr
);
JSONObject
version
=
jsonObject
.
getJSONObject
(
"version"
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/ProjectApiServiceImpl.java
View file @
8312c6d9
...
...
@@ -2,7 +2,6 @@ package com.gic.enterprise.service.outer.impl;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.CollectionUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.PageHelperUtils
;
...
...
@@ -21,8 +20,10 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -98,13 +99,19 @@ public class ProjectApiServiceImpl implements ProjectApiService{
public
ServiceResponse
<
List
<
ProjectDTO
>>
listAllProject
()
{
List
<
TabProject
>
tabProjectList
=
projectService
.
listAllProject
();
List
<
ProjectDTO
>
projectList
=
EntityUtil
.
changeEntityListByJSON
(
ProjectDTO
.
class
,
tabProjectList
);
if
(
CollectionUtils
.
isEmpty
(
projectList
))
{
return
ServiceResponse
.
success
(
Collections
.
emptyList
());
}
List
<
TabProjectItem
>
tabItemList
=
projectItemService
.
listAllProjectItem
();
List
<
ProjectItemDTO
>
itemList
=
EntityUtil
.
changeEntityListByJSON
(
ProjectItemDTO
.
class
,
tabItemList
);
Map
<
Integer
,
List
<
ProjectItemDTO
>>
group
=
CollectionUtil
.
group
(
itemList
,
"projectId"
);
Map
<
Integer
,
List
<
ProjectItemDTO
>>
group
=
Optional
.
ofNullable
(
itemList
).
orElse
(
Collections
.
emptyList
()).
stream
()
.
filter
(
e
->
e
.
getUseStatus
()
==
1
).
collect
(
Collectors
.
groupingBy
(
ProjectItemDTO:
:
getProjectId
,
Collectors
.
mapping
(
e
->
e
,
Collectors
.
toList
())));
// Map<Integer, List<ProjectItemDTO>> group = CollectionUtil.group(itemList, "projectId");
for
(
ProjectDTO
projectDTO
:
projectList
)
{
projectDTO
.
setItemList
(
group
.
get
(
projectDTO
.
getProjectId
()));
}
return
ServiceResponse
.
success
(
projectList
);
List
<
ProjectDTO
>
result
=
projectList
.
stream
().
filter
(
e
->
CollectionUtils
.
isNotEmpty
(
e
.
getItemList
())).
collect
(
Collectors
.
toList
());
return
ServiceResponse
.
success
(
result
);
}
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabAppletCustomPageMapper.xml
View file @
8312c6d9
...
...
@@ -6,6 +6,7 @@
<result
column=
"enterprise_id"
jdbcType=
"INTEGER"
property=
"enterpriseId"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"entry_condition"
jdbcType=
"INTEGER"
property=
"entryCondition"
/>
<result
column=
"background_color"
jdbcType=
"VARCHAR"
property=
"backgroundColor"
/>
<result
column=
"page_type"
jdbcType=
"INTEGER"
property=
"pageType"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"app_type"
jdbcType=
"INTEGER"
property=
"appType"
/>
...
...
@@ -17,7 +18,7 @@
<result
column=
"setting"
jdbcType=
"LONGVARCHAR"
property=
"setting"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
page_id, enterprise_id, title, entry_condition, page_type, status,
page_id, enterprise_id, title, entry_condition,
background_color,
page_type, status,
app_type, app_id, create_time, update_time
</sql>
<sql
id=
"Blob_Column_List"
>
...
...
@@ -37,11 +38,11 @@
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.enterprise.entity.TabAppletCustomPage"
useGeneratedKeys=
"true"
keyProperty=
"pageId"
>
insert into tab_applet_custom_page (page_id, enterprise_id, title,
entry_condition, page_type, status, app_type,
entry_condition,
background_color,
page_type, status, app_type,
app_id, create_time, update_time,
setting)
values (#{pageId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
#{entryCondition,jdbcType=INTEGER}, #{pageType,jdbcType=INTEGER},
#{entryCondition,jdbcType=INTEGER}, #{
backgroundColor,jdbcType=VARCHAR}, #{
pageType,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER},
#{appId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{setting,jdbcType=LONGVARCHAR})
...
...
@@ -61,6 +62,9 @@
<if
test=
"entryCondition != null"
>
entry_condition,
</if>
<if
test=
"backgroundColor != null"
>
background_color,
</if>
<if
test=
"pageType != null"
>
page_type,
</if>
...
...
@@ -96,6 +100,9 @@
<if
test=
"entryCondition != null"
>
#{entryCondition,jdbcType=INTEGER},
</if>
<if
test=
"backgroundColor != null"
>
#{backgroundColor,jdbcType=VARCHAR},
</if>
<if
test=
"pageType != null"
>
#{pageType,jdbcType=INTEGER},
</if>
...
...
@@ -131,6 +138,9 @@
<if
test=
"entryCondition != null"
>
entry_condition = #{entryCondition,jdbcType=INTEGER},
</if>
<if
test=
"backgroundColor != null"
>
background_color = #{backgroundColor,jdbcType=VARCHAR},
</if>
<if
test=
"pageType != null"
>
page_type = #{pageType,jdbcType=INTEGER},
</if>
...
...
@@ -160,6 +170,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
background_color = #{backgroundColor,jdbcType=VARCHAR},
page_type = #{pageType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER},
...
...
@@ -174,6 +185,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
background_color = #{backgroundColor,jdbcType=VARCHAR},
page_type = #{pageType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER},
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabWmStoreCouponConfigMapper.xml
View file @
8312c6d9
...
...
@@ -174,6 +174,12 @@
<if
test=
"gicCouponId != null and gicCouponId != '' "
>
and gic_coupon_id = #{gicCouponId}
</if>
<if
test=
"startTime != null and startTime != '' "
>
and DATE_FORMAT(create_time,'%Y-%m-%d')
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != '' "
>
and DATE_FORMAT(create_time,'%Y-%m-%d')
<
= #{endTime}
</if>
<if
test=
"wmCouponId != null and wmCouponId != '' "
>
and wm_coupon_id = #{wmCouponId}
</if>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/AuditLogController.java
View file @
8312c6d9
...
...
@@ -74,7 +74,8 @@ public class AuditLogController {
private
void
createLog
(
AuditLogDTO
auditLogDTO
)
{
ServiceResponse
<
AuditLogDTO
>
auditLog
=
this
.
auditLogApiService
.
getAuditLog
(
auditLogDTO
.
getAuditLogId
());
LogUtils
.
createLog
(
"审核审批项"
,
auditLog
.
getResult
().
getProjectItemName
(),
auditLogDTO
.
getAuditorName
(),
auditLog
.
getResult
().
getEnterpriseId
(),
auditLog
.
getResult
().
getEnterpriseName
());
LogUtils
.
createLog
(
"审核审批项"
,
auditLog
.
getResult
().
getProjectItemName
(),
auditLogDTO
.
getAuditorName
(),
auditLog
.
getResult
().
getEnterpriseId
(),
auditLog
.
getResult
().
getEnterpriseName
(),
"+86"
,
auditLogDTO
.
getAuditorPhone
());
}
@RequestMapping
(
"/get-audit-log"
)
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/BillingPayInfoController.java
View file @
8312c6d9
...
...
@@ -183,6 +183,7 @@ public class BillingPayInfoController {
InvoiceManageDTO
params
=
new
InvoiceManageDTO
();
params
.
setPlatformType
(
EnterprisePlatformTypeEnum
.
GIC
.
getCode
());
params
.
setInvoiceType
(
invoiceType
);
params
.
setInitiator
(
UserDetailUtils
.
getUserDetail
().
getUserId
().
toString
());
params
.
setBillingAmount
(
billingAmount
);
params
.
setEnterpriseId
(
enterpriseId
);
params
.
setEnterpriseName
(
userDetail
.
getEnterpriseInfo
().
getEnterpriseName
());
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/PackageController.java
View file @
8312c6d9
...
...
@@ -112,7 +112,8 @@ public class PackageController {
ServiceResponse
<
BillingPayInfoDTO
>
serviceResponse
=
this
.
billingOrderApiService
.
paySmsPackageOrder
(
enterpriseId
,
orderId
,
payType
,
authCode
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getUserName
());
if
(
serviceResponse
.
isSuccess
()){
LogUtils
.
createLog
(
"套餐包支付"
,
"订单id:"
+
orderId
);
BillingOrderDTO
orderDTO
=
this
.
billingOrderApiService
.
getOrderById
(
orderId
).
getResult
();
LogUtils
.
createLog
(
"套餐包支付"
,
orderDTO
.
getOrderContent
());
return
RestResponse
.
success
(
serviceResponse
.
getResult
());
}
return
EnterpriseRestResponse
.
failure
(
serviceResponse
);
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/wm/WmStoreSyncController.java
0 → 100644
View file @
8312c6d9
package
com
.
gic
.
enterprise
.
web
.
controller
.
wm
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 同步门店to微盟
* @ClassName: WmStoreSyncController
* @Description:
* @author guojuxing
* @date 2020/5/8 11:19 AM
*/
@RestController
@RequestMapping
(
"/wm-store-sync"
)
public
class
WmStoreSyncController
{
private
static
final
Logger
LOGGER
=
LogManager
.
getLogger
(
WmStoreSyncController
.
class
);
/**
*
* @param request
* @param response
* @throws IOException
*/
@RequestMapping
(
"wm-store-import-template"
)
public
void
wmStoreImportTemplate
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
IOException
{
ClassPathResource
res
=
new
ClassPathResource
(
"exceltemplate/wm_store_import_template.xls"
);
String
userAgent
=
request
.
getHeader
(
"User-Agent"
).
toLowerCase
();
String
fileName
=
"门店同步模板.xls"
;
if
(
userAgent
.
contains
(
"firefox"
))
{
byte
[]
bytesName
=
fileName
.
getBytes
(
"UTF-8"
);
fileName
=
new
String
(
bytesName
,
"ISO-8859-1"
);
response
.
setHeader
(
"content-disposition"
,
"attachment;fileName="
+
fileName
);
}
else
{
response
.
setHeader
(
"content-disposition"
,
"attachment;fileName="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
}
InputStream
is
=
res
.
getInputStream
();
OutputStream
out
=
response
.
getOutputStream
();
int
bytes
=
0
;
byte
[]
bufferOut
=
new
byte
[
1024
];
while
((
bytes
=
is
.
read
(
bufferOut
))
!=
-
1
)
{
out
.
write
(
bufferOut
,
0
,
bytes
);
}
out
.
close
();
is
.
close
();
}
}
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/vo/AppletPageDetailVO.java
View file @
8312c6d9
...
...
@@ -26,6 +26,11 @@ public class AppletPageDetailVO implements Serializable{
private
Integer
entryCondition
;
/**
* 背景颜色 灰色 白色 ,默认灰色(会员中心页面、积分服务页面、自定义页面、商城装首页 有该设置)
*/
private
String
backgroundColor
;
/**
* 配置json
*/
private
String
setting
;
...
...
@@ -81,4 +86,13 @@ public class AppletPageDetailVO implements Serializable{
public
void
setComponentStr
(
String
componentStr
)
{
this
.
componentStr
=
componentStr
;
}
public
String
getBackgroundColor
()
{
return
backgroundColor
;
}
public
AppletPageDetailVO
setBackgroundColor
(
String
backgroundColor
)
{
this
.
backgroundColor
=
backgroundColor
;
return
this
;
}
}
gic-platform-enterprise-web/src/main/resources/exceltemplate/wm_store_import_template.xls
0 → 100644
View file @
8312c6d9
File added
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/EnterpriseController.java
View file @
8312c6d9
...
...
@@ -5,6 +5,7 @@ import java.util.*;
import
com.gic.authcenter.security.core.constant.DataResourceEnum
;
import
com.gic.authcenter.security.core.dto.AuthcenterUserDetails
;
import
com.gic.enterprise.constants.Constants
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -129,10 +130,10 @@ public class EnterpriseController {
if
(
result
.
isSuccess
()
&&
UserConstants
.
CREATE_AUTO
==
userDTO
.
getPasswordType
().
intValue
())
{
//发送短信,通知自动生成密码
if
(
StringUtils
.
isBlank
(
userDTO
.
getPhoneAreaCode
()))
{
userDTO
.
setPhoneAreaCode
(
"+86"
);
userDTO
.
setPhoneAreaCode
(
Constants
.
NATION_CODE
);
}
String
[]
smsArr
=
new
String
[]
{
enterpriseDTO
.
getEnterpriseName
(),
userDTO
.
getPhoneNumber
(),
password
};
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GIC
password001
"
,
String
[]
smsArr
=
new
String
[]
{
enterpriseDTO
.
getEnterpriseName
(),
password
};
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GIC
SHHT003
"
,
result
.
getResult
(),
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
...
...
@@ -257,7 +258,7 @@ public class EnterpriseController {
@RequestMapping
(
"/edit-user"
)
public
RestResponse
editUser
(
UserDTO
userDTO
)
{
//自动密码
boolean
isAutoPassword
=
userDTO
.
getPasswordType
()
==
UserConstants
.
CREATE_AUTO
;
boolean
isAutoPassword
=
userDTO
.
getPasswordType
()
!=
null
&&
userDTO
.
getPasswordType
()
==
UserConstants
.
CREATE_AUTO
;
String
autoPassword
=
null
;
if
(
isAutoPassword
)
{
String
password
=
UserPasswordUtil
.
createPasswordAuto
();
...
...
@@ -285,8 +286,8 @@ public class EnterpriseController {
}
else
{
LOGGER
.
warn
(
enterpriseResult
.
getMessage
());
}
String
[]
smsArr
=
new
String
[]
{
enterpriseName
,
userDTO
.
getPhoneNumber
(),
autoPassword
};
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GIC
password001
"
,
enterpriseId
,
String
[]
smsArr
=
new
String
[]
{
enterpriseName
,
autoPassword
};
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GIC
SHHT004
"
,
enterpriseId
,
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/qo/PlatformBrandQO.java
View file @
8312c6d9
...
...
@@ -14,7 +14,7 @@ public class PlatformBrandQO implements Serializable {
private
Integer
platformBrandId
;
@NotNull
(
message
=
"品牌名不能为空"
,
groups
=
{
SavePlatformBrandValid
.
class
})
private
String
platformBrandName
;
@NotNull
(
message
=
"经营类目不能为空"
,
groups
=
{
SavePlatformBrandValid
.
class
})
//
@NotNull(message = "经营类目不能为空", groups = {SavePlatformBrandValid.class})
private
String
platformBrandCategoryCode
;
private
Integer
createType
;
...
...
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