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
cb2c594e
Commit
cb2c594e
authored
May 27, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!10
parents
b3a84565
b996a239
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
136 additions
and
12 deletions
+136
-12
Constants.java
.../src/main/java/com/gic/enterprise/constant/Constants.java
+2
-0
WmStoreSyncLogDTO.java
...ain/java/com/gic/enterprise/dto/wm/WmStoreSyncLogDTO.java
+8
-8
WmStoreSyncLogApiService.java
.../com/gic/enterprise/service/WmStoreSyncLogApiService.java
+2
-0
TabWmStoreSyncLogMapper.java
...om/gic/enterprise/dao/mapper/TabWmStoreSyncLogMapper.java
+3
-0
WmStoreSyncLogService.java
...ava/com/gic/enterprise/service/WmStoreSyncLogService.java
+2
-0
AuditLogServiceImpl.java
.../com/gic/enterprise/service/impl/AuditLogServiceImpl.java
+1
-1
WmStoreSyncLogServiceImpl.java
...ic/enterprise/service/impl/WmStoreSyncLogServiceImpl.java
+5
-0
AuditLogApiServiceImpl.java
...enterprise/service/outer/impl/AuditLogApiServiceImpl.java
+6
-0
WmStoreSyncLogApiServiceImpl.java
...rise/service/outer/impl/WmStoreSyncLogApiServiceImpl.java
+9
-0
WxPayStrategy.java
.../gic/enterprise/service/outer/impl/pay/WxPayStrategy.java
+47
-0
TabAuditLogMapper.xml
...e-service/src/main/resources/mapper/TabAuditLogMapper.xml
+2
-1
TabWmStoreSyncLogMapper.xml
...ice/src/main/resources/mapper/TabWmStoreSyncLogMapper.xml
+12
-0
PackageController.java
.../com/gic/enterprise/web/controller/PackageController.java
+1
-1
WmStoreSyncController.java
...c/enterprise/web/controller/wm/WmStoreSyncController.java
+36
-1
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/Constants.java
View file @
cb2c594e
...
...
@@ -34,6 +34,8 @@ public interface Constants {
String
PROJECT_ITEM_STOREFIELD_APPLY
=
"relevanceStorefield"
;
String
PROJECT_ITEM_SAVE_STATUS_TYPE_APPLY
=
"saveStoreStatusType"
;
/**
* 待办事项的redis key
*/
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/wm/WmStoreSyncLogDTO.java
View file @
cb2c594e
...
...
@@ -30,12 +30,12 @@ public class WmStoreSyncLogDTO implements Serializable{
/**
*
*/
private
String
storeId
;
private
Integer
storeId
;
/**
* 1:总店 2:门店同步(实体)
*/
private
Integer
t
ype
;
private
Integer
storeT
ype
;
/**
* 门店名称
...
...
@@ -89,21 +89,21 @@ public class WmStoreSyncLogDTO implements Serializable{
return
this
;
}
public
String
getStoreId
()
{
public
Integer
getStoreId
()
{
return
storeId
;
}
public
WmStoreSyncLogDTO
setStoreId
(
String
storeId
)
{
public
WmStoreSyncLogDTO
setStoreId
(
Integer
storeId
)
{
this
.
storeId
=
storeId
;
return
this
;
}
public
Integer
getType
()
{
return
t
ype
;
public
Integer
get
Store
Type
()
{
return
storeT
ype
;
}
public
WmStoreSyncLogDTO
set
Type
(
Integer
t
ype
)
{
this
.
type
=
t
ype
;
public
WmStoreSyncLogDTO
set
StoreType
(
Integer
storeT
ype
)
{
this
.
storeType
=
storeT
ype
;
return
this
;
}
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/WmStoreSyncLogApiService.java
View file @
cb2c594e
...
...
@@ -69,4 +69,6 @@ public interface WmStoreSyncLogApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.enterprise.dto.wm.WmStoreSyncLogDTO>>
*/
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
listByStoreId
(
Integer
storeId
,
Integer
enterpriseId
);
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabWmStoreSyncLogMapper.java
View file @
cb2c594e
...
...
@@ -62,4 +62,6 @@ public interface TabWmStoreSyncLogMapper {
int
deleteLogic
(
@Param
(
"storeId"
)
Integer
storeId
,
@Param
(
"wmMallStoreId"
)
Integer
wmMallStoreId
);
List
<
TabWmStoreSyncLog
>
listByStoreId
(
@Param
(
"storeId"
)
Integer
storeId
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
List
<
TabWmStoreSyncLog
>
listByStoreIdList
(
@Param
(
"storeIdList"
)
List
<
Integer
>
storeIdList
,
@Param
(
"wmMallStoreId"
)
Integer
wmMallStoreId
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/WmStoreSyncLogService.java
View file @
cb2c594e
...
...
@@ -19,4 +19,6 @@ public interface WmStoreSyncLogService {
int
deleteLogic
(
Integer
storeId
,
Integer
wmMallStoreId
);
List
<
TabWmStoreSyncLog
>
listByStoreId
(
Integer
storeId
,
Integer
enterpriseId
);
List
<
TabWmStoreSyncLog
>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/AuditLogServiceImpl.java
View file @
cb2c594e
...
...
@@ -32,7 +32,7 @@ public class AuditLogServiceImpl implements AuditLogService {
auditLogDTO
.
setEnterpriseId
(
enterpriseId
);
auditLogDTO
.
setApplyUserId
(
applyUserId
);
auditLogDTO
.
setProjectItemId
(
projectItemId
);
auditLogDTO
.
setAuditExpireTime
(
new
Date
());
//
auditLogDTO.setAuditExpireTime(new Date());
return
tabAuditLogMapper
.
getLastWaitAuditByApplyUser
(
auditLogDTO
);
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/WmStoreSyncLogServiceImpl.java
View file @
cb2c594e
...
...
@@ -56,4 +56,9 @@ public class WmStoreSyncLogServiceImpl implements WmStoreSyncLogService {
public
List
<
TabWmStoreSyncLog
>
listByStoreId
(
Integer
storeId
,
Integer
enterpriseId
)
{
return
tabWmStoreSyncLogMapper
.
listByStoreId
(
storeId
,
enterpriseId
);
}
@Override
public
List
<
TabWmStoreSyncLog
>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
)
{
return
tabWmStoreSyncLogMapper
.
listByStoreIdList
(
storeIdList
,
wmMallStoreId
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AuditLogApiServiceImpl.java
View file @
cb2c594e
...
...
@@ -114,6 +114,12 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
return
EnterpriseServiceResponse
.
success
();
}
if
(
Constants
.
NORMAL_STATUS
.
equals
(
projectItem
.
getIsPlatform
()))
{
// todo 如果是平台审批项, 同一个平台审批项 如果24小时内有审核成功的,就拒绝提交
// sendWxMessage();
}
// 判断有没有审核员, 没有审核员就返回错误
ServiceResponse
<
List
<
AuditorDTO
>>
auditorResponse
=
auditorApiService
.
listAuditorByProject
(
auditLogDTO
.
getProjectItemId
(),
auditLogDTO
.
getApplyUserId
(),
auditLogDTO
.
getEnterpriseId
());
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/WmStoreSyncLogApiServiceImpl.java
View file @
cb2c594e
...
...
@@ -80,4 +80,13 @@ public class WmStoreSyncLogApiServiceImpl implements WmStoreSyncLogApiService {
}
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
WmStoreSyncLogDTO
.
class
,
list
));
}
@Override
public
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
)
{
List
<
TabWmStoreSyncLog
>
list
=
wmStoreSyncLogService
.
listByStoreId
(
storeIdList
,
wmMallStoreId
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
ServiceResponse
.
success
(
Collections
.
emptyList
());
}
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
WmStoreSyncLogDTO
.
class
,
list
));
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/pay/WxPayStrategy.java
View file @
cb2c594e
...
...
@@ -14,9 +14,12 @@ import com.gic.enterprise.dto.BillingPayInfoDTO;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.OutPayDTO
;
import
com.gic.enterprise.entity.TabBillingPayInfo
;
import
com.gic.enterprise.entity.TabBillingRechargeRecord
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.*
;
import
com.gic.enterprise.utils.CreateRandomUtils
;
import
com.gic.log.api.dto.SystemSetLogDTO
;
import
com.gic.log.api.service.LogApiService
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
com.gic.thirdparty.api.dto.ScanPayReqDataDTO
;
import
com.gic.thirdparty.api.service.Pay4WXService
;
...
...
@@ -55,6 +58,9 @@ public class WxPayStrategy implements PayStrategy {
private
EnterpriseApiService
enterpriseApiService
;
@Autowired
SmsSendApiService
smsSendApiService
;
@Autowired
private
LogApiService
logApiService
;
@Override
public
ServiceResponse
<
BillingPayInfoDTO
>
savePrePayInfo
(
OutPayDTO
outPayDTO
)
{
...
...
@@ -121,10 +127,16 @@ public class WxPayStrategy implements PayStrategy {
billingRechargeRecordService
.
updateBySerialNumber
(
resData
.
getEnterpriseId
(),
billingPayInfo
.
getOrderSerialNumber
(),
resData
.
getTotalFeePaid
(),
resData
.
getTotalFeePaid
(),
BillingAuditStatusEnum
.
PASS
.
getCode
(),
resData
.
getTimeEnd
(),
resData
.
getOnlineSerialNumber
());
this
.
pushMessageApiService
.
pushMessage
(
resData
.
getEnterpriseId
(),
"系统通知"
,
"余额充值"
,
"您的商户成功充值"
+
resData
.
getTotalFeePaid
()+
"元!感谢您的支持和使用!"
);
sendRechargeSuccessSms
(
resData
,
billingPayInfo
.
getEnterpriseId
());
TabBillingRechargeRecord
rechargeRecord
=
billingRechargeRecordService
.
getRechargeRecordBySerialNumber
(
billingPayInfo
.
getOrderSerialNumber
());
UserDTO
userDTO
=
userApiService
.
getUserById
(
rechargeRecord
.
getInitiatorUser
()).
getResult
();
createLog
(
"充值"
,
"账户余额"
,
userDTO
);
break
;
case
2
:
// 短信套餐包购买
this
.
billingOrderService
.
updateBySerialNumber
(
billingPayInfo
.
getOrderSerialNumber
(),
resData
.
getTotalFeePaid
(),
BillingAuditStatusEnum
.
PASS
.
getCode
(),
resData
.
getTimeEnd
());
TabBillingRechargeRecord
rechargeRecord2
=
billingRechargeRecordService
.
getRechargeRecordBySerialNumber
(
billingPayInfo
.
getOrderSerialNumber
());
UserDTO
userDTO2
=
userApiService
.
getUserById
(
rechargeRecord2
.
getInitiatorUser
()).
getResult
();
createLog
(
"支付"
,
"订单内容"
,
userDTO2
);
break
;
default
:
break
;
...
...
@@ -198,4 +210,39 @@ public class WxPayStrategy implements PayStrategy {
}
}
public
void
createLog
(
String
content
,
String
operationObject
,
UserDTO
userDTO
)
{
doLog
(
content
,
operationObject
,
userDTO
);
}
private
void
doLog
(
String
content
,
String
operationObject
,
UserDTO
userDTO
)
{
final
SystemSetLogDTO
logDTO
=
new
SystemSetLogDTO
();
//操作时间
logDTO
.
setLogTime
(
new
Date
());
logDTO
.
setCreateTime
(
new
Date
());
//操作人
logDTO
.
setUserId
(
Long
.
valueOf
(
userDTO
.
getUserId
()));
logDTO
.
setUserName
(
userDTO
.
getUserName
());
//操作内容
logDTO
.
setContent
(
content
);
//为了search查询,暂时用这个字段存
logDTO
.
setInterfaceName
(
content
);
////操作对象
logDTO
.
setBusinessName
(
operationObject
);
//操作模块
// String moduleMenuName = (String) RequestContext.getContext().getRequest().getAttribute("moduleMenuName");
// Integer moduleMenuId = (Integer) RequestContext.getContext().getRequest().getAttribute("moduleMenuId");
// if (moduleMenuId != null) {
logDTO
.
setRelationId
(
45000L
);
logDTO
.
setProject
(
"企业-计费中心"
);
// }
//账号(手机号)
logDTO
.
setRemark1
(
userDTO
.
getPhoneAreaCode
());
logDTO
.
setRemark2
(
userDTO
.
getPhoneNumber
());
logDTO
.
setEnterpriseId
(
userDTO
.
getEnterpriseId
().
longValue
());
EnterpriseDTO
enterpriseDTO
=
enterpriseApiService
.
getEnterpriseById
(
userDTO
.
getEnterpriseId
()).
getResult
();
logDTO
.
setEnterpriseName
(
enterpriseDTO
.
getEnterpriseName
());
logApiService
.
saveSystemSetLog
(
logDTO
);
}
}
gic-platform-enterprise-service/src/main/resources/mapper/TabAuditLogMapper.xml
View file @
cb2c594e
...
...
@@ -264,7 +264,8 @@
<include
refid=
"Base_Column_List"
/>
from tab_audit_log
where status = 1
and audit_expire_time
<
#{auditExpireTime}
and audit_result = 0
-- and audit_expire_time
<
#{auditExpireTime}
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabWmStoreSyncLogMapper.xml
View file @
cb2c594e
...
...
@@ -193,4 +193,15 @@
and enterprise_id = #{enterpriseId}
group by wm_mall_store_id
</select>
<select
id=
"listByStoreIdList"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_wm_store_sync_log
where status = 1
and store_id in
<foreach
collection=
"storeIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
and wm_mall_store_id = #{wmMallStoreId}
</select>
</mapper>
\ No newline at end of file
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/PackageController.java
View file @
cb2c594e
...
...
@@ -95,7 +95,7 @@ public class PackageController {
}
ServiceResponse
<
Integer
>
response
=
this
.
billingOrderApiService
.
saveSmsOrderBuyNow
(
orderDTO
,
itemDTO
);
if
(
response
.
isSuccess
()){
LogUtils
.
createLog
(
"
套餐包购买"
,
qo
.
getSmsPackageName
()
);
LogUtils
.
createLog
(
"
购买短信套餐包"
,
"短信套餐包"
);
return
RestResponse
.
success
(
response
.
getResult
());
}
return
EnterpriseRestResponse
.
failure
(
response
);
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/wm/WmStoreSyncController.java
View file @
cb2c594e
...
...
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.dto.wm.WmStoreSyncLogDTO
;
import
com.gic.enterprise.web.vo.wm.WmBranchVO
;
import
com.gic.weimob.api.dto.WeimobGuiderSynDTO
;
import
com.gic.weimob.api.dto.WeimobStoreGicInfoDTO
;
...
...
@@ -205,7 +206,7 @@ public class WmStoreSyncController {
wmStoreSyncLogApiService
.
saveWmStoreSyncLog
(
Arrays
.
asList
(
headStoreId
),
wmMallStoreId
,
1
,
enterpriseId
);
//同步导购
List
<
Integer
>
storeIdList
=
new
ArrayList
<>();
if
(
isBranch
)
{
if
(
!
isBranch
)
{
storeIdList
.
add
(
headStoreId
);
}
storeIdList
.
addAll
(
getListByStr
(
storeIds
));
...
...
@@ -289,6 +290,40 @@ public class WmStoreSyncController {
}
/**
* 批量重新同步门店
* @param storeInfoIds
* @param wmMallStoreId
* @return
*/
@RequestMapping
(
"/sync-store-to-wm-again"
)
public
RestResponse
syncStoreToWmAgain
(
String
storeInfoIds
,
Integer
wmMallStoreId
)
{
//区分是一对一还是总店
List
<
StoreDTO
>
storeList
=
getStoreList
(
storeInfoIds
,
true
);
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
List
<
Integer
>
storeIdList
=
storeList
.
stream
().
map
(
e
->
e
.
getStoreId
()).
collect
(
Collectors
.
toList
());
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
wmStoreLogResult
=
wmStoreSyncLogApiService
.
listByStoreId
(
storeIdList
,
wmMallStoreId
);
if
(
wmStoreLogResult
.
isSuccess
())
{
List
<
WmStoreSyncLogDTO
>
wmStoreLogList
=
wmStoreLogResult
.
getResult
();
List
<
Integer
>
headStoreIdList
=
wmStoreLogList
.
stream
()
.
filter
(
e
->
e
.
getStoreType
().
intValue
()
==
1
)
.
map
(
e
->
e
.
getStoreId
())
.
collect
(
Collectors
.
toList
());
//同步总店
headStoreIdList
.
forEach
(
head
->
{
LOGGER
.
info
(
"批量重新同步门店(总店):{}"
,
JSON
.
toJSONString
(
syncHeadStore
(
wmMallStoreId
,
head
,
null
,
false
)));
});
StringBuilder
storeIds
=
new
StringBuilder
();
wmStoreLogList
.
stream
().
filter
(
e
->
e
.
getStoreType
().
intValue
()
==
2
)
.
map
(
e
->
e
.
getStoreId
())
.
forEach
(
storeId
->
storeIds
.
append
(
storeId
).
append
(
","
));
LOGGER
.
info
(
"批量重新同步门店(一对一):{}"
,
JSON
.
toJSONString
(
weimobInitStore
(
wmMallStoreId
,
storeIds
.
toString
())));
}
}
return
RestResponse
.
success
();
}
/**
* 门店错误日志-不处理
* @Title: deleteStoreClerkErrorLog
* @Description:
...
...
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