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
e539ccbd
Commit
e539ccbd
authored
Jun 28, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!16
parents
4a964aa5
de8c8f37
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
273 additions
and
41 deletions
+273
-41
EnterpriseInitCodeEnum.java
...a/com/gic/enterprise/constant/EnterpriseInitCodeEnum.java
+13
-11
DownloadReportQO.java
...src/main/java/com/gic/enterprise/qo/DownloadReportQO.java
+10
-1
BillingOrderApiService.java
...va/com/gic/enterprise/service/BillingOrderApiService.java
+1
-1
EnterpriseInitApiService.java
.../com/gic/enterprise/service/EnterpriseInitApiService.java
+30
-0
WmStoreApiService.java
...in/java/com/gic/enterprise/service/WmStoreApiService.java
+10
-0
TabEnterpriseWhiteListMapper.java
...c/enterprise/dao/mapper/TabEnterpriseWhiteListMapper.java
+3
-1
TabWmStoreCouponConfigMapper.java
...c/enterprise/dao/mapper/TabWmStoreCouponConfigMapper.java
+4
-0
TabBillingOrder.java
.../main/java/com/gic/enterprise/entity/TabBillingOrder.java
+29
-3
WmStoreCouponConfigService.java
...om/gic/enterprise/service/WmStoreCouponConfigService.java
+2
-0
BillingOrderServiceImpl.java
.../gic/enterprise/service/impl/BillingOrderServiceImpl.java
+1
-0
DownloadReportServiceImpl.java
...ic/enterprise/service/impl/DownloadReportServiceImpl.java
+1
-0
WmStoreCouponConfigServiceImpl.java
...terprise/service/impl/WmStoreCouponConfigServiceImpl.java
+5
-0
BillingAccountApiServiceImpl.java
...rise/service/outer/impl/BillingAccountApiServiceImpl.java
+1
-1
BillingOrderApiServcImpl.java
...terprise/service/outer/impl/BillingOrderApiServcImpl.java
+2
-1
EnterpriseInitApiServiceImpl.java
...rise/service/outer/impl/EnterpriseInitApiServiceImpl.java
+19
-0
WmStoreApiServiceImpl.java
.../enterprise/service/outer/impl/WmStoreApiServiceImpl.java
+16
-0
OfflineStrategy.java
...ic/enterprise/service/outer/impl/pay/OfflineStrategy.java
+12
-1
TabBillingOrderMapper.xml
...rvice/src/main/resources/mapper/TabBillingOrderMapper.xml
+31
-9
TabDownloadReportMapper.xml
...ice/src/main/resources/mapper/TabDownloadReportMapper.xml
+3
-0
TabWmStoreCouponConfigMapper.xml
...rc/main/resources/mapper/TabWmStoreCouponConfigMapper.xml
+11
-1
AppletDecorationConfigController.java
...rise/web/controller/AppletDecorationConfigController.java
+10
-1
BillingOrderController.java
...gic/enterprise/web/controller/BillingOrderController.java
+1
-1
PackageController.java
.../com/gic/enterprise/web/controller/PackageController.java
+4
-1
EnterpriseController.java
...om/gic/operation/web/controller/EnterpriseController.java
+54
-8
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/EnterpriseInitCodeEnum.java
View file @
e539ccbd
...
...
@@ -8,16 +8,6 @@ import java.util.List;
* @date 2019/7/18 11:22 AM
*/
public
enum
EnterpriseInitCodeEnum
{
CREATE_MEMBER_CARD
(
"createMemberCard"
,
"至少新建一张会员卡"
,
3
),
CREATE_MEMBER_GRADE
(
"createMemberGrade"
,
"至少新建一个会员等级"
,
3
),
CREATE_BELONG_STRATEGY
(
"createBelongStrategy"
,
"至少新建一个归属策略"
,
3
),
CREATE_INTEGRAL_STRATEGY
(
"createIntegralStrategy"
,
"至少新建一个积分策略"
,
3
),
CONFIG_USER_MERGE_STRATEGY
(
"configUserMergeStrategy"
,
"配置并保存用户合并策略"
,
3
),
BIND_SERVICE_NUMBER
(
"bindServiceNumber"
,
"至少绑定一个服务号"
,
5
),
PERFECT_AUTO_REPLY_CONFIG
(
"perfectAutoReplyConfig"
,
"完善自动回复配置"
,
5
),
PERFECT_MENU_CONFIG
(
"perfectMenuConfig"
,
"完善自定义菜单配置"
,
5
),
BIND_WECHAT
(
"bindWeChat"
,
"至少绑定一个小程序"
,
4
),
PERFECT_WECHAT_PAGE
(
"perfectWeChatPage"
,
"完善小程序页面装修"
,
4
),
SHORT_MESSAGE_SERVICE_CONFIG
(
"shortMessageServiceConfig"
,
"完成短信业务配置"
,
1
),
COMPLETE_STORE_CONFIG
(
"completeStoreConfig"
,
"完成门店基础配置"
,
2
),
CREATE_STORE_REGION
(
"createStoreRegion"
,
"至少新建一个门店域"
,
2
),
...
...
@@ -25,8 +15,20 @@ public enum EnterpriseInitCodeEnum {
CREATE_STORE_BRAND
(
"createStoreBrand"
,
"至少新建一个店招品牌"
,
2
),
CREATE_STORE_STATUS_STRATEGY
(
"createStoreStatusStrategy"
,
"至少新建一个门店启用状态策略"
,
2
),
COMPLETE_MEMBER_CARD_CONFIG
(
"completeMemberCardConfig"
,
"完成会员卡配置"
,
3
),
COMPLETE_SERVICE_NUMBER_CONFIG
(
"completeServiceNumberConfig"
,
"完成服务号配置"
,
5
),
CREATE_MEMBER_CARD
(
"createMemberCard"
,
"至少新建一张会员卡"
,
3
),
ENABLE_MEMBER_CARD_FIELD
(
"enableMemberCardField"
,
"至少启用一个会员卡字段"
,
3
),
CREATE_MEMBER_GRADE
(
"createMemberGrade"
,
"至少新建一个会员等级"
,
3
),
CREATE_BELONG_STRATEGY
(
"createBelongStrategy"
,
"至少新建一个归属策略"
,
3
),
CREATE_INTEGRAL_STRATEGY
(
"createIntegralStrategy"
,
"至少新建一个积分策略"
,
3
),
CONFIG_USER_MERGE_STRATEGY
(
"configUserMergeStrategy"
,
"配置并保存用户合并策略"
,
3
),
COMPLETE_WECHAT_CONFIG
(
"completeWeChatConfig"
,
"完成小程序配置"
,
4
),
BIND_WECHAT
(
"bindWeChat"
,
"至少绑定一个小程序"
,
4
),
COMPLETE_MANAGER_CARD_CONFIG
(
"completeManagerCardConfig"
,
"完善小程序进入管理卡的配置"
,
4
),
PERFECT_WECHAT_PAGE
(
"perfectWeChatPage"
,
"完善小程序页面装修"
,
4
),
COMPLETE_SERVICE_NUMBER_CONFIG
(
"completeServiceNumberConfig"
,
"完成服务号配置"
,
5
),
BIND_SERVICE_NUMBER
(
"bindServiceNumber"
,
"至少绑定一个服务号"
,
5
),
PERFECT_AUTO_REPLY_CONFIG
(
"perfectAutoReplyConfig"
,
"完善自动回复配置"
,
5
),
PERFECT_MENU_CONFIG
(
"perfectMenuConfig"
,
"完善自定义菜单配置"
,
5
),
COMPLETE_DATA_COUNT_CONFIG
(
"completeDataCountConfig"
,
"完成数据统计配置"
,
6
),
CONFIG_EFFECTIVE_ORDER
(
"configEffectiveOrder"
,
"完成有效订单的配置"
,
6
),
CONFIG_PAY
(
"configPay"
,
"完成实付的配置"
,
6
),
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/qo/DownloadReportQO.java
View file @
e539ccbd
...
...
@@ -12,7 +12,6 @@ import java.util.Date;
*/
public
class
DownloadReportQO
extends
PageQO
{
private
static
final
long
serialVersionUID
=
-
5251611329415430980L
;
public
interface
SelectValidView
{
}
...
...
@@ -35,6 +34,8 @@ public class DownloadReportQO extends PageQO {
// private String searchName;
private
Integer
auditResult
;
private
Date
auditExpireTime
;
private
Date
ltAuditExpireTime
;
private
Boolean
hasDownloadUrl
;
private
String
projectCode
;
...
...
@@ -118,4 +119,12 @@ public class DownloadReportQO extends PageQO {
public
void
setProjectCode
(
String
projectCode
)
{
this
.
projectCode
=
projectCode
;
}
public
Date
getLtAuditExpireTime
()
{
return
ltAuditExpireTime
;
}
public
void
setLtAuditExpireTime
(
Date
ltAuditExpireTime
)
{
this
.
ltAuditExpireTime
=
ltAuditExpireTime
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/BillingOrderApiService.java
View file @
e539ccbd
...
...
@@ -26,7 +26,7 @@ public interface BillingOrderApiService {
*/
ServiceResponse
<
Integer
>
saveSmsOrderBuyNow
(
BillingOrderDTO
billingOrderDTO
,
SmsPackageOrderItemDTO
smsPackageOrderItemDTO
);
ServiceResponse
<
BillingPayInfoDTO
>
paySmsPackageOrder
(
Integer
enterpriseId
,
Integer
orderId
,
Integer
payType
,
String
authCode
,
String
userName
);
ServiceResponse
<
BillingPayInfoDTO
>
paySmsPackageOrder
(
Integer
enterpriseId
,
Integer
orderId
,
Integer
payType
,
String
authCode
,
String
userName
,
Integer
userId
);
/**
* 条件分页查询订单状态
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/EnterpriseInitApiService.java
View file @
e539ccbd
...
...
@@ -169,6 +169,16 @@ public interface EnterpriseInitApiService {
ServiceResponse
<
Void
>
shortMessageServiceConfig
(
Integer
enterpriseId
);
/**
* 至少启用一个会员卡字段
* @Title: enableMemberCardField
* @Description:
* @author guojuxing
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
enableMemberCardField
(
Integer
enterpriseId
);
/**
* 初始化会员卡的短信模板
* @param enterpriseId
* @return
...
...
@@ -176,6 +186,16 @@ public interface EnterpriseInitApiService {
ServiceResponse
<
Void
>
initMemberCardSmsTemplate
(
Integer
enterpriseId
);
/**
* 完善小程序进入管理卡的配置
* @Title: completeManagerCardConfig
* @Description:
* @author guojuxing
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
completeManagerCardConfig
(
Integer
enterpriseId
);
/**
* 状态改为未初始化状态
* @Title: unInitByConfigCode
* @Description:
...
...
@@ -207,4 +227,14 @@ public interface EnterpriseInitApiService {
*/
ServiceResponse
<
List
<
EnterpriseInitDTO
>>
listByEnterpriseId
(
Integer
enterpriseId
);
/**
* 本来应该是新建商户的时候初始化数据。但是因为会调整,所以进行手工初始化
* @Title: initEnterpriseData
* @Description:
* @author guojuxing
* @param enterpriseIdList
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
initEnterpriseData
(
List
<
Integer
>
enterpriseIdList
);
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/WmStoreApiService.java
View file @
e539ccbd
...
...
@@ -164,4 +164,14 @@ public interface WmStoreApiService {
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.enterprise.dto.wm.WmStoreCouponConfigDTO>>
*/
ServiceResponse
<
Page
<
WmStoreCouponConfigDTO
>>
pageCouponConfig
(
CouponConfigQO
params
);
/**
* 卡券删除消息通知,gic卡券删除
* @Title: deleteWmGicCoupon
* @Description:
* @author guojuxing
* @param gicCouponId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
deleteWmGicCoupon
(
Long
gicCouponId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabEnterpriseWhiteListMapper.java
View file @
e539ccbd
package
com
.
gic
.
enterprise
.
dao
.
mapper
;
import
com.gic.enterprise.entity.TabEnterpriseWhiteList
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -55,5 +56,5 @@ public interface TabEnterpriseWhiteListMapper {
TabEnterpriseWhiteList
getEnterpriseWhiteList
(
Integer
enterpriseId
);
List
<
TabEnterpriseWhiteList
>
listEnterpriseWhiteList
(
String
search
);
List
<
TabEnterpriseWhiteList
>
listEnterpriseWhiteList
(
@Param
(
"search"
)
String
search
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabWmStoreCouponConfigMapper.java
View file @
e539ccbd
...
...
@@ -2,6 +2,7 @@ package com.gic.enterprise.dao.mapper;
import
com.gic.enterprise.entity.TabWmStoreCouponConfig
;
import
com.gic.enterprise.qo.wm.CouponConfigQO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -55,4 +56,6 @@ public interface TabWmStoreCouponConfigMapper {
int
updateByPrimaryKey
(
TabWmStoreCouponConfig
record
);
List
<
TabWmStoreCouponConfig
>
getCouponConfig
(
CouponConfigQO
params
);
int
deleteWmGicCoupon
(
@Param
(
"gicCouponId"
)
String
gicCouponId
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabBillingOrder.java
View file @
e539ccbd
...
...
@@ -22,7 +22,7 @@ public class TabBillingOrder {
private
String
serialNumber
;
/**
* 订单状态
* 订单状态
1:审核中 2:已取消 3:审核失败 4:审核通过(已完成) 0:待支付
*/
private
Integer
orderStatus
;
...
...
@@ -34,7 +34,7 @@ public class TabBillingOrder {
/**
* 支付方式 1微信 2支付宝 3.线下支付 4余额支付
*/
private
Integer
payType
=
0
;
private
Integer
payType
;
/**
* 应付金额
...
...
@@ -56,7 +56,6 @@ public class TabBillingOrder {
*/
private
Integer
couponCardId
;
/**
* 审批结果id
*/
...
...
@@ -82,6 +81,16 @@ public class TabBillingOrder {
*/
private
String
itemJson
;
/**
* 1:短信套餐包
*/
private
Integer
orderType
;
/**
* 发起人
*/
private
Integer
initiatorUser
;
public
Integer
getOrderId
()
{
return
orderId
;
}
...
...
@@ -201,4 +210,20 @@ public class TabBillingOrder {
public
void
setItemJson
(
String
itemJson
)
{
this
.
itemJson
=
itemJson
;
}
public
Integer
getOrderType
()
{
return
orderType
;
}
public
void
setOrderType
(
Integer
orderType
)
{
this
.
orderType
=
orderType
;
}
public
Integer
getInitiatorUser
()
{
return
initiatorUser
;
}
public
void
setInitiatorUser
(
Integer
initiatorUser
)
{
this
.
initiatorUser
=
initiatorUser
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/WmStoreCouponConfigService.java
View file @
e539ccbd
...
...
@@ -30,4 +30,6 @@ public interface WmStoreCouponConfigService {
List
<
TabWmStoreCouponConfig
>
getCouponConfig
(
CouponConfigQO
params
);
Page
<
TabWmStoreCouponConfig
>
pageCouponConfig
(
CouponConfigQO
params
);
int
deleteWmGicCoupon
(
String
gicCouponId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/BillingOrderServiceImpl.java
View file @
e539ccbd
...
...
@@ -46,6 +46,7 @@ public class BillingOrderServiceImpl implements BillingOrderService {
billingOrder
.
setItemJson
(
billingOrderDTO
.
getItemJson
());
billingOrder
.
setPayType
(
billingOrderDTO
.
getPayType
());
billingOrder
.
setOrderContent
(
billingOrderDTO
.
getOrderContent
());
billingOrder
.
setInitiatorUser
(
billingOrderDTO
.
getInitiatorUser
());
tabBillingOrderMapper
.
insertSelective
(
billingOrder
);
return
billingOrder
.
getOrderId
();
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/DownloadReportServiceImpl.java
View file @
e539ccbd
...
...
@@ -63,6 +63,7 @@ public class DownloadReportServiceImpl implements DownloadReportService {
switch
(
downloadReportQO
.
getDownloadReportStatus
())
{
case
0
:
downloadReportQO
.
setAuditResult
(
DataSecurityAuditEnum
.
WAIT
.
getCode
());
downloadReportQO
.
setLtAuditExpireTime
(
new
Date
());
downloadReportQO
.
setHasDownloadUrl
(
null
);
break
;
case
2
:
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/WmStoreCouponConfigServiceImpl.java
View file @
e539ccbd
...
...
@@ -40,4 +40,9 @@ public class WmStoreCouponConfigServiceImpl implements WmStoreCouponConfigServic
List
<
TabWmStoreCouponConfig
>
list
=
tabWmStoreCouponConfigMapper
.
getCouponConfig
(
params
);
return
(
Page
<
TabWmStoreCouponConfig
>)
list
;
}
@Override
public
int
deleteWmGicCoupon
(
String
gicCouponId
)
{
return
tabWmStoreCouponConfigMapper
.
deleteWmGicCoupon
(
gicCouponId
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingAccountApiServiceImpl.java
View file @
e539ccbd
...
...
@@ -193,7 +193,7 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
ServiceResponse
<
Integer
>
orderResponse
=
billingOrderApiService
.
saveSmsOrderBuyNow
(
orderDTO
,
itemDTO
);
//订购短信套餐包
billingOrderApiService
.
paySmsPackageOrder
(
enterpriseId
,
orderResponse
.
getResult
(),
PayTypeEnum
.
BALANCE_PAY
.
getCode
(),
null
,
null
);
paySmsPackageOrder
(
enterpriseId
,
orderResponse
.
getResult
(),
PayTypeEnum
.
BALANCE_PAY
.
getCode
(),
null
,
null
,
null
);
}
}
}
else
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingOrderApiServcImpl.java
View file @
e539ccbd
...
...
@@ -98,7 +98,7 @@ public class BillingOrderApiServcImpl implements BillingOrderApiService {
@Override
@Transactional
public
ServiceResponse
<
BillingPayInfoDTO
>
paySmsPackageOrder
(
Integer
enterpriseId
,
Integer
orderId
,
Integer
payType
,
String
authCode
,
String
userName
){
String
authCode
,
String
userName
,
Integer
userId
){
TabBillingOrder
order
=
this
.
billingOrderService
.
getOrderById
(
orderId
);
OutPayDTO
outPayDTO
=
new
OutPayDTO
();
outPayDTO
.
setEnterpriseId
(
enterpriseId
);
...
...
@@ -118,6 +118,7 @@ public class BillingOrderApiServcImpl implements BillingOrderApiService {
outPayDTO
.
setPayType
(
payType
);
outPayDTO
.
setAuthCode
(
authCode
);
outPayDTO
.
setInitiatorName
(
userName
);
outPayDTO
.
setInitiatorUser
(
userId
);
ServiceResponse
<
BillingPayInfoDTO
>
response
=
this
.
billingPayInfoApiService
.
savePrePayInfo
(
outPayDTO
);
if
(
response
.
isSuccess
()){
Integer
payInfoId
=
response
.
getResult
().
getPayInfoId
();
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/EnterpriseInitApiServiceImpl.java
View file @
e539ccbd
...
...
@@ -12,6 +12,7 @@ import com.gic.enterprise.service.EnterpriseInitApiService;
import
com.gic.enterprise.service.EnterpriseInitService
;
import
com.gic.enterprise.service.EnterpriseService
;
import
com.gic.member.api.service.MemberInitApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -169,11 +170,21 @@ public class EnterpriseInitApiServiceImpl implements EnterpriseInitApiService{
}
@Override
public
ServiceResponse
<
Void
>
enableMemberCardField
(
Integer
enterpriseId
)
{
return
initByConfigCode
(
EnterpriseInitCodeEnum
.
ENABLE_MEMBER_CARD_FIELD
.
getCode
(),
enterpriseId
);
}
@Override
public
ServiceResponse
<
Void
>
initMemberCardSmsTemplate
(
Integer
enterpriseId
)
{
return
initByConfigCode
(
EnterpriseInitCodeEnum
.
INTI_MEMBER_CARD_SMS
.
getCode
(),
enterpriseId
);
}
@Override
public
ServiceResponse
<
Void
>
completeManagerCardConfig
(
Integer
enterpriseId
)
{
return
initByConfigCode
(
EnterpriseInitCodeEnum
.
COMPLETE_MANAGER_CARD_CONFIG
.
getCode
(),
enterpriseId
);
}
@Override
public
ServiceResponse
<
Void
>
unInitByConfigCode
(
String
configCode
,
Integer
enterpriseId
)
{
if
(!
EnterpriseInitCodeEnum
.
isRightCode
(
configCode
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"初始化配置代码参数有误"
);
...
...
@@ -210,5 +221,13 @@ public class EnterpriseInitApiServiceImpl implements EnterpriseInitApiService{
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
EnterpriseInitDTO
.
class
,
listByParentId
));
}
@Override
public
ServiceResponse
<
Void
>
initEnterpriseData
(
List
<
Integer
>
enterpriseIdList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
enterpriseIdList
))
{
enterpriseIdList
.
forEach
(
e
->
enterpriseInitService
.
initEnterpriseConfigInfo
(
e
));
}
return
ServiceResponse
.
success
();
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/WmStoreApiServiceImpl.java
View file @
e539ccbd
...
...
@@ -10,6 +10,8 @@ import com.gic.enterprise.service.*;
import
com.gic.weimob.api.service.WeimobMerchantService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -32,6 +34,7 @@ import com.gic.enterprise.qo.wm.CouponConfigQO;
@Service
(
"wmStoreApiService"
)
public
class
WmStoreApiServiceImpl
implements
WmStoreApiService
{
private
final
static
Logger
LOGGER
=
LogManager
.
getLogger
(
WmStoreApiServiceImpl
.
class
);
@Autowired
private
WmStoreService
wmStoreService
;
@Autowired
...
...
@@ -318,6 +321,19 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
return
ServiceResponse
.
success
(
resultPage
);
}
@Override
public
ServiceResponse
<
Void
>
deleteWmGicCoupon
(
Long
gicCouponId
)
{
LOGGER
.
info
(
"删除gic卡券参数:{}"
,
gicCouponId
);
if
(
gicCouponId
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"卡券ID为空"
);
}
int
count
=
wmStoreCouponConfigService
.
deleteWmGicCoupon
(
gicCouponId
.
toString
());
if
(
count
<
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"卡券ID有误,无数据删除"
);
}
return
ServiceResponse
.
success
();
}
private
ServiceResponse
validWmMemberCardConfig
(
WmMemberCardConfigDTO
dto
)
{
if
(
dto
.
getEnterpriseId
()
==
null
)
{
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/pay/OfflineStrategy.java
View file @
e539ccbd
...
...
@@ -12,6 +12,7 @@ import com.gic.enterprise.dto.ApprovalCallBackDTO;
import
com.gic.enterprise.dto.BillingPayInfoDTO
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.OutPayDTO
;
import
com.gic.enterprise.entity.TabBillingOrder
;
import
com.gic.enterprise.entity.TabBillingPayInfo
;
import
com.gic.enterprise.entity.TabBillingRechargeRecord
;
import
com.gic.enterprise.entity.TabEnterprise
;
...
...
@@ -161,7 +162,7 @@ public class OfflineStrategy implements PayStrategy {
case
2
:
// 短信套餐包购买
this
.
billingOrderService
.
updateBySerialNumber
(
resData
.
getOrderSerialNumber
(),
resData
.
getTotalFeePaid
(),
resData
.
getAuditStatus
(),
resData
.
getTimeEnd
());
sendApprovalSms
(
resData
,
"GICJFZX008"
);
send
Order
ApprovalSms
(
resData
,
"GICJFZX008"
);
break
;
default
:
break
;
...
...
@@ -184,6 +185,16 @@ public class OfflineStrategy implements PayStrategy {
sendSms
(
resData
,
userDTO
,
code
);
}
private
void
sendOrderApprovalSms
(
ApprovalCallBackDTO
resData
,
String
code
)
{
// TabBillingRechargeRecord rechargeRecord = billingRechargeRecordService.getRechargeRecordBySerialNumber(resData.getOrderSerialNumber());
TabBillingOrder
order
=
billingOrderService
.
getOrderBySerialNumber
(
resData
.
getOrderSerialNumber
());
Integer
initiator
=
order
.
getInitiatorUser
();
if
(
initiator
!=
null
)
{
UserDTO
userDTO
=
userApiService
.
getUserById
(
initiator
).
getResult
();
sendSms
(
resData
,
userDTO
,
code
);
}
}
private
void
sendSms
(
ApprovalCallBackDTO
resData
,
UserDTO
userDTO
,
String
code
)
{
try
{
if
(
StringUtils
.
isBlank
(
userDTO
.
getPhoneAreaCode
()))
{
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabBillingOrderMapper.xml
View file @
e539ccbd
...
...
@@ -17,11 +17,13 @@
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"item_json"
jdbcType=
"VARCHAR"
property=
"itemJson"
/>
<result
column=
"order_type"
jdbcType=
"INTEGER"
property=
"orderType"
/>
<result
column=
"initiator_user"
jdbcType=
"INTEGER"
property=
"initiatorUser"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
order_id, enterprise_id, serial_number, order_status, order_content, pay_type, total_fee,
total_fee_paid, pay_info_id, coupon_card_id, audit_result_id, status,
create_time, update_time, item_json
total_fee_paid, pay_info_id, coupon_card_id, audit_result_id, status,
create_time,
update_time, item_json, order_type, initiator_user
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -37,15 +39,15 @@
insert into tab_billing_order (order_id, enterprise_id, serial_number,
order_status, order_content, pay_type,
total_fee, total_fee_paid, pay_info_id,
coupon_card_id, audit_result_id,
status, create_time, update_time
,
item_json
)
coupon_card_id, audit_result_id,
status,
create_time, update_time, item_json
,
order_type, initiator_user
)
values (#{orderId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{orderStatus,jdbcType=INTEGER}, #{orderContent,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER},
#{totalFee,jdbcType=DOUBLE}, #{totalFeePaid,jdbcType=DOUBLE}, #{payInfoId,jdbcType=INTEGER},
#{couponCardId,jdbcType=INTEGER}, #{auditResultId,jdbcType=INTEGER},
#{
status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP
},
#{
itemJson,jdbcType=VARCHA
R})
#{couponCardId,jdbcType=INTEGER}, #{auditResultId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER},
#{
createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{itemJson,jdbcType=VARCHAR
},
#{
orderType,jdbcType=INTEGER}, #{initiatorUser,jdbcType=INTEGE
R})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.enterprise.entity.TabBillingOrder"
>
<selectKey
keyProperty=
"orderId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
...
...
@@ -98,6 +100,12 @@
<if
test=
"itemJson != null"
>
item_json,
</if>
<if
test=
"orderType != null"
>
order_type,
</if>
<if
test=
"initiatorUser != null"
>
initiator_user,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderId != null"
>
...
...
@@ -145,6 +153,12 @@
<if
test=
"itemJson != null"
>
#{itemJson,jdbcType=VARCHAR},
</if>
<if
test=
"orderType != null"
>
#{orderType,jdbcType=INTEGER},
</if>
<if
test=
"initiatorUser != null"
>
#{initiatorUser,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.enterprise.entity.TabBillingOrder"
>
...
...
@@ -192,6 +206,12 @@
<if
test=
"itemJson != null"
>
item_json = #{itemJson,jdbcType=VARCHAR},
</if>
<if
test=
"orderType != null"
>
order_type = #{orderType,jdbcType=INTEGER},
</if>
<if
test=
"initiatorUser != null"
>
initiator_user = #{initiatorUser,jdbcType=INTEGER},
</if>
</set>
where order_id = #{orderId,jdbcType=INTEGER}
</update>
...
...
@@ -210,7 +230,9 @@
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
item_json = #{itemJson,jdbcType=VARCHAR}
item_json = #{itemJson,jdbcType=VARCHAR},
order_type = #{orderType,jdbcType=INTEGER},
initiator_user = #{initiatorUser,jdbcType=INTEGER}
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<select
id=
"getOrderByPayInfoId"
resultMap=
"BaseResultMap"
>
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabDownloadReportMapper.xml
View file @
e539ccbd
...
...
@@ -342,6 +342,9 @@
<if
test=
"auditExpireTime != null "
>
and audit_expire_time
<
#{auditExpireTime}
</if>
<if
test=
"ltAuditExpireTime != null "
>
and audit_expire_time
>
#{ltAuditExpireTime}
</if>
<if
test=
"hasDownloadUrl != null "
>
<if
test=
"hasDownloadUrl"
>
and download_url is not null
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabWmStoreCouponConfigMapper.xml
View file @
e539ccbd
...
...
@@ -167,7 +167,7 @@
select
<include
refid=
"Base_Column_List"
></include>
from tab_wm_store_coupon_config
where
status
= 1
where
1
= 1
<if
test=
"wmMallStoreId != null and wmMallStoreId != '' "
>
and wm_mall_store_id = #{wmMallStoreId}
</if>
...
...
@@ -185,6 +185,7 @@
</if>
<if
test=
"onlyShowEffective != null and onlyShowEffective == 1"
>
and (gic_coupon_expire is null or TIMESTAMPDIFF(DAY, now(), gic_coupon_expire) >= 0)
and status = 1
</if>
<if
test=
"couponName != null and couponName != '' "
>
and (gic_coupon_name like concat('%', #{couponName}, '%') or wm_coupon_name like concat('%', #{couponName}, '%'))
...
...
@@ -196,4 +197,12 @@
order by create_time desc
</if>
</select>
<update
id=
"deleteWmGicCoupon"
>
update tab_wm_store_coupon_config set status = 0
where gic_coupon_id = #{gicCouponId}
and status = 1
</update>
</mapper>
\ No newline at end of file
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/AppletDecorationConfigController.java
View file @
e539ccbd
package
com
.
gic
.
enterprise
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.AppletDataAssetAreaDTO
;
import
com.gic.enterprise.dto.AppletDecorationConfigDTO
;
import
com.gic.enterprise.service.AppletDecorationConfigApiService
;
import
com.gic.enterprise.service.EnterpriseInitApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.enterprise.web.vo.AppletCardRealtionVO
;
...
...
@@ -19,13 +21,20 @@ public class AppletDecorationConfigController {
@Autowired
private
AppletDecorationConfigApiService
appletDecorationConfigApiService
;
@Autowired
private
EnterpriseInitApiService
enterpriseInitApiService
;
@RequestMapping
(
"/save"
)
public
RestResponse
save
(
AppletDecorationConfigDTO
dto
,
String
dataAreaJson
)
{
AppletDataAssetAreaDTO
dataAssetAreaDTO
=
JSON
.
parseObject
(
dataAreaJson
,
AppletDataAssetAreaDTO
.
class
);
dto
.
setAppletDataAssetArea
(
dataAssetAreaDTO
);
dto
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
return
ResultControllerUtils
.
commonResult
(
appletDecorationConfigApiService
.
save
(
dto
));
ServiceResponse
<
Integer
>
result
=
appletDecorationConfigApiService
.
save
(
dto
);
if
(
result
.
isSuccess
())
{
//初始化
enterpriseInitApiService
.
completeManagerCardConfig
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
}
return
ResultControllerUtils
.
commonResult
(
result
);
}
@RequestMapping
(
"/edit"
)
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/BillingOrderController.java
View file @
e539ccbd
...
...
@@ -84,7 +84,7 @@ public class BillingOrderController {
vo
.
setCouponCardVO
(
EntityUtil
.
changeEntityByJSON
(
BillingCouponCardVO
.
class
,
couponCardDTO
));
}
}
if
(
dto
.
getPayType
()
.
intValu
e
()
==
PayTypeEnum
.
OFFLINE_PAY
.
getCode
()){
if
(
dto
.
getPayType
()
!=
null
&&
dto
.
getPayTyp
e
()
==
PayTypeEnum
.
OFFLINE_PAY
.
getCode
()){
ServiceResponse
<
TransferAccountsApprovalDTO
>
byOrderNumber
=
this
.
transferAccountsApprovalApiService
.
getByOrderNumber
(
dto
.
getSerialNumber
());
if
(
byOrderNumber
.
isSuccess
()){
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/PackageController.java
View file @
e539ccbd
...
...
@@ -7,6 +7,7 @@ import com.gic.auth.service.AuthCodeApiService;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.base.UserInfo
;
import
com.gic.enterprise.constant.PackageHoursEnum
;
import
com.gic.enterprise.dto.*
;
import
com.gic.enterprise.qo.PageQO
;
...
...
@@ -82,6 +83,7 @@ public class PackageController {
orderDTO
.
setOrderContent
(
qo
.
getSmsPackageName
());
orderDTO
.
setTotalFee
(
qo
.
getTotalFee
());
orderDTO
.
setTotalFeePaid
(
qo
.
getTotalFeePaid
());
orderDTO
.
setInitiatorUser
(
UserDetailUtils
.
getUserDetail
().
getUserId
());
SmsPackageOrderItemDTO
itemDTO
=
new
SmsPackageOrderItemDTO
();
itemDTO
.
setBuyCount
(
qo
.
getNum
());
itemDTO
.
setCode
(
qo
.
getSmsPackageCode
());
...
...
@@ -109,8 +111,9 @@ public class PackageController {
}
this
.
authCodeApiService
.
expireAuthCode
(
authCodeId
);
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
UserInfo
userInfo
=
UserDetailUtils
.
getUserDetail
().
getUserInfo
();
ServiceResponse
<
BillingPayInfoDTO
>
serviceResponse
=
this
.
billingOrderApiService
.
paySmsPackageOrder
(
enterpriseId
,
orderId
,
payType
,
authCode
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getUserName
());
paySmsPackageOrder
(
enterpriseId
,
orderId
,
payType
,
authCode
,
userInfo
.
getUserName
(),
userInfo
.
getUserId
());
if
(
serviceResponse
.
isSuccess
()){
BillingOrderDTO
orderDTO
=
this
.
billingOrderApiService
.
getOrderById
(
orderId
).
getResult
();
LogUtils
.
createLog
(
"套餐包支付"
,
orderDTO
.
getOrderContent
());
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/EnterpriseController.java
View file @
e539ccbd
...
...
@@ -2,10 +2,13 @@ package com.gic.operation.web.controller;
import
java.math.BigDecimal
;
import
java.util.*
;
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.marketing.api.service.sms.SmsOuterApiService
;
import
com.gic.member.config.api.dto.OwnerMemberCardDTO
;
import
com.gic.member.config.api.service.MemberCardApiService
;
import
com.gic.operation.web.vo.MemberCardVO
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -107,6 +110,8 @@ public class EnterpriseController {
private
MarketAppCategoryApiService
marketAppCategoryApiService
;
@Autowired
private
MemberCardApiService
memberCardApiService
;
@Autowired
private
SmsOuterApiService
smsOuterApiService
;
@RequestMapping
(
"/save-enterprise"
)
public
RestResponse
saveEnterprise
(
...
...
@@ -243,7 +248,13 @@ public class EnterpriseController {
@RequestMapping
(
"/list-all-member-card"
)
public
RestResponse
listAllMemberCard
(
Integer
enterpriseId
)
{
return
ResultControllerUtils
.
commonResult
(
memberCardApiService
.
getAll
(
enterpriseId
),
MemberCardVO
.
class
);
ServiceResponse
<
List
<
OwnerMemberCardDTO
>>
result
=
memberCardApiService
.
getAll
(
enterpriseId
);
if
(
result
.
isSuccess
())
{
if
(
CollectionUtils
.
isEmpty
(
result
.
getResult
()))
{
return
RestResponse
.
failure
(
ErrorCode
.
NOTEXISTS
.
getCode
(),
"请先创建至少一张会员卡"
);
}
}
return
ResultControllerUtils
.
commonResult
(
result
,
MemberCardVO
.
class
);
}
/**
...
...
@@ -252,16 +263,36 @@ public class EnterpriseController {
* @Description:
* @author guojuxing
* @param enterpriseId
* @param memberCardIds
* @return com.gic.commons.webapi.reponse.RestResponse
*/
@RequestMapping
(
"/init-member-card-sms-template"
)
public
RestResponse
initMemberCardSmsTemplate
(
Integer
enterpriseId
)
{
//todo
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"初始化会员模板还未开发完毕"
);
// ServiceResponse<Void> initMemberCardSmsTemplateResult = enterpriseInitApiService
// .initMemberCardSmsTemplate(enterpriseId);
// return ResultControllerUtils.commonResult(initMemberCardSmsTemplateResult);
public
RestResponse
initMemberCardSmsTemplate
(
Integer
enterpriseId
,
String
memberCardIds
)
{
if
(
StringUtils
.
isBlank
(
memberCardIds
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"会员卡参数为空"
);
}
ServiceResponse
<
EnterpriseInitDTO
>
memberCardInitResult
=
enterpriseInitApiService
.
getByConfigCode
(
EnterpriseInitCodeEnum
.
CREATE_MEMBER_CARD
.
getCode
(),
enterpriseId
);
if
(
memberCardInitResult
.
isSuccess
())
{
EnterpriseInitDTO
memberCardInit
=
memberCardInitResult
.
getResult
();
if
(
memberCardInit
.
getIsInitConfig
().
intValue
()
==
1
)
{
//
ServiceResponse
<
Void
>
smsResult
=
smsOuterApiService
.
initEnterpriseNoticeSmsTemplate
(
enterpriseId
,
Arrays
.
stream
(
memberCardIds
.
split
(
","
))
.
filter
(
e
->
StringUtils
.
isNumeric
(
e
))
.
mapToLong
(
e
->
Long
.
valueOf
(
e
))
.
boxed
()
.
collect
(
Collectors
.
toList
()));
if
(
smsResult
.
isSuccess
())
{
ServiceResponse
<
Void
>
initMemberCardSmsTemplateResult
=
enterpriseInitApiService
.
initMemberCardSmsTemplate
(
enterpriseId
);
return
ResultControllerUtils
.
commonResult
(
initMemberCardSmsTemplateResult
);
}
return
RestResponse
.
failure
(
smsResult
.
getCode
(),
smsResult
.
getMessage
());
}
}
return
RestResponse
.
failure
(
ErrorCode
.
NOTEXISTS
.
getCode
(),
"请先创建至少一张会员卡"
);
}
@RequestMapping
(
"/edit-enterprise"
)
...
...
@@ -566,6 +597,21 @@ public class EnterpriseController {
return
ResultControllerUtils
.
commonResult
(
enterpriseApiService
.
editEnterpriseInfo
(
enterpriseDTO
));
}
@RequestMapping
(
"/init-enterprise-data"
)
public
RestResponse
initEnterpriseDAta
(
String
enterpriseIds
)
{
if
(
StringUtils
.
isBlank
(
enterpriseIds
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"参数为空"
);
}
return
ResultControllerUtils
.
commonResult
(
enterpriseInitApiService
.
initEnterpriseData
(
Arrays
.
asList
(
enterpriseIds
.
split
(
","
))
.
stream
()
.
filter
(
e
->
StringUtils
.
isNumeric
(
e
))
.
mapToInt
(
e
->
Integer
.
parseInt
(
e
))
.
boxed
()
.
collect
(
Collectors
.
toList
())));
}
@RequestMapping
(
"/list-coupon"
)
public
RestResponse
listCoupon
(
BigDecimal
price
,
Long
isvId
,
Long
enterpriseId
,
Long
serveId
,
Long
skuId
)
{
return
ResultControllerUtils
.
commonResult
(
...
...
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