Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
huluobin
gogirl-miniapp-backend
Commits
809a1b04
Commit
809a1b04
authored
Mar 04, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
975b520a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
31 deletions
+99
-31
StoreManage.java
src/main/java/com/gogirl/domain/store/store/StoreManage.java
+28
-26
Schedule.java
...ain/java/com/gogirl/infrastructure/schedule/Schedule.java
+1
-1
MiniappPushMsgServiceImpl.java
...tructure/service/push/impl/MiniappPushMsgServiceImpl.java
+5
-4
MiniappPushMsgServiceImplTest.java
...ture/service/push/impl/MiniappPushMsgServiceImplTest.java
+65
-0
No files found.
src/main/java/com/gogirl/domain/store/store/StoreManage.java
View file @
809a1b04
...
...
@@ -17,86 +17,88 @@ import java.util.List;
/**
* Created by yinyong on 2018/9/17.
*/
@ApiModel
(
"店铺管理"
)
@ApiModel
(
"店铺管理"
)
@Data
@TableName
(
"store_manage"
)
@TableName
(
"store_manage"
)
public
class
StoreManage
implements
Serializable
{
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"店铺编号"
)
@ApiModelProperty
(
"店铺编号"
)
private
String
storeNo
;
@ApiModelProperty
(
"logo"
)
@ApiModelProperty
(
"logo"
)
private
String
logo
;
@ApiModelProperty
(
"店铺名称"
)
@ApiModelProperty
(
"店铺名称"
)
private
String
name
;
@ApiModelProperty
(
"店铺英文名"
)
@ApiModelProperty
(
"店铺英文名"
)
private
String
enName
;
@ApiModelProperty
(
"纬度"
)
@ApiModelProperty
(
"纬度"
)
private
String
longitude
;
@ApiModelProperty
(
"精度"
)
@ApiModelProperty
(
"精度"
)
private
String
latitude
;
@ApiModelProperty
(
"地址"
)
@ApiModelProperty
(
"地址"
)
private
String
address
;
@ApiModelProperty
(
"店长"
)
@ApiModelProperty
(
"店长"
)
private
String
master
;
@ApiModelProperty
(
"员工数量"
)
@ApiModelProperty
(
"员工数量"
)
private
Integer
employeeNumber
;
@ApiModelProperty
(
"客户电话号码"
)
@ApiModelProperty
(
"客户电话号码"
)
private
String
customerServiceTelphone
;
@ApiModelProperty
(
"联系人名称"
)
@ApiModelProperty
(
"联系人名称"
)
private
String
contactName
;
@ApiModelProperty
(
"联系人电话"
)
@ApiModelProperty
(
"联系人电话"
)
private
String
contactTelphone
;
@ApiModelProperty
(
"店铺简介"
)
@ApiModelProperty
(
"店铺简介"
)
private
String
remark
;
@ApiModelProperty
(
"营业周天"
)
@ApiModelProperty
(
"营业周天"
)
private
Integer
businessDay
;
@ApiModelProperty
(
"营业开始时间"
)
@JsonFormat
(
pattern
=
"HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
"营业开始时间"
)
@JsonFormat
(
pattern
=
"HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Time
businessStartTime
;
@ApiModelProperty
(
"营业结束时间"
)
@JsonFormat
(
pattern
=
"HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
"营业结束时间"
)
@JsonFormat
(
pattern
=
"HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Time
businessEndTime
;
@TableField
(
exist
=
false
)
private
Double
distance
;
@ApiModelProperty
(
"店照"
)
@ApiModelProperty
(
"店照"
)
private
String
shopEnvironmentPhotos
;
@ApiModelProperty
(
"店铺短码"
)
@ApiModelProperty
(
"店铺短码"
)
private
String
shortCode
;
@ApiModelProperty
(
"创建时间"
)
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
"店长id"
)
@ApiModelProperty
(
"店长id"
)
private
Integer
masterUserId
;
@ApiModelProperty
(
"营业状态1.营业中;2.停止营业"
)
@ApiModelProperty
(
"营业状态1.营业中;2.停止营业"
)
private
Integer
operatingStatus
;
@ApiModelProperty
(
"运营人员id"
)
@ApiModelProperty
(
"运营人员id"
)
private
Integer
operateUserId
;
@TableField
(
exist
=
false
)
private
List
<
StoreGuide
>
storeGuideDTOList
;
private
String
shortAddress
;
}
src/main/java/com/gogirl/infrastructure/schedule/Schedule.java
View file @
809a1b04
...
...
@@ -243,7 +243,7 @@ public class Schedule {
/*用户超时提醒*/
List
<
ScheduleServe
>
scheduleServeList
=
scheduleManageMapper
.
selectByScheduleId
(
scheduleManage
.
getId
());
pushMsgService
.
sendScheduleMsg
(
customer
.
getOpenid1
(),
scheduleServeList
.
get
(
0
).
getServeName
(),
scheduleManage
.
getArriveTime
(),
storeManage
.
getName
(),
storeManage
.
getAddress
());
pushMsgService
.
sendScheduleMsg
(
customer
.
getOpenid1
(),
scheduleServeList
.
get
(
0
).
getServeName
(),
scheduleManage
.
getArriveTime
(),
storeManage
.
getName
(),
storeManage
.
get
Short
Address
());
/*美甲师超时预约提醒*/
scheduleManage
.
setIsSend
(
1
);
...
...
src/main/java/com/gogirl/infrastructure/service/push/impl/MiniappPushMsgServiceImpl.java
View file @
809a1b04
...
...
@@ -34,7 +34,9 @@ public class MiniappPushMsgServiceImpl implements PushMsgService {
private
final
AccessTokenService
accessTokenService
;
private
final
WxProperties
wxProperties
;
@Async
@Override
public
void
sendScheduleMsg
(
String
openId
,
String
scheduleName
,
Date
arriveTime
,
String
departmentName
,
String
address
)
{
log
.
info
(
"推送预约提醒订阅消息"
);
...
...
@@ -65,7 +67,6 @@ public class MiniappPushMsgServiceImpl implements PushMsgService {
.
build
());
}
@Async
@Override
public
void
sendOverScheduleMsg
(
String
openId
,
...
...
@@ -101,7 +102,7 @@ public class MiniappPushMsgServiceImpl implements PushMsgService {
}
@Async
@Override
public
void
sendPaySuccessMsg
(
Integer
orderId
,
String
openId
,
...
...
@@ -135,7 +136,7 @@ public class MiniappPushMsgServiceImpl implements PushMsgService {
}
@Async
@Override
public
void
sendOrderPayNotifyMsg
(
Integer
orderId
,
String
openId
,
...
...
src/test/java/com/gogirl/infrastructure/service/push/impl/MiniappPushMsgServiceImplTest.java
0 → 100644
View file @
809a1b04
package
com
.
gogirl
.
infrastructure
.
service
.
push
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.gogirl.domain.order.serve.ScheduleManage
;
import
com.gogirl.domain.order.serve.ScheduleServe
;
import
com.gogirl.domain.store.store.StoreManage
;
import
com.gogirl.domain.user.customer.Customer
;
import
com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper
;
import
com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper
;
import
com.gogirl.infrastructure.mapper.store.store.StoreManageMapper
;
import
com.gogirl.infrastructure.mapper.user.customer.CustomerMapper
;
import
com.gogirl.infrastructure.service.push.PushMsgService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/3/4 9:41 上午
*/
@ActiveProfiles
(
"prod"
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
@Slf4j
@EnableAsync
public
class
MiniappPushMsgServiceImplTest
{
@Resource
ScheduleManageMapper
scheduleManageMapper
;
@Resource
ScheduleServeMapper
scheduleServeMapper
;
@Resource
PushMsgService
pushMsgService
;
@Resource
CustomerMapper
customerMapper
;
@Resource
StoreManageMapper
storeManageMapper
;
@Test
public
void
sendScheduleMsg
()
{
ScheduleManage
scheduleManage
=
scheduleManageMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ScheduleManage
>().
eq
(
ScheduleManage:
:
getScheduledNo
,
"TYD2103040012"
));
List
<
ScheduleServe
>
scheduleServeList
=
scheduleServeMapper
.
selectList
(
new
LambdaQueryWrapper
<
ScheduleServe
>()
.
eq
(
ScheduleServe:
:
getSchId
,
scheduleManage
.
getId
()));
Customer
customer
=
customerMapper
.
selectById
(
scheduleManage
.
getScheduledUser
());
StoreManage
storeManage
=
storeManageMapper
.
selectById
(
scheduleManage
.
getDepartmentId
());
pushMsgService
.
sendScheduleMsg
(
customer
.
getOpenid1
(),
scheduleServeList
.
get
(
0
).
getServeName
(),
scheduleManage
.
getArriveTime
(),
scheduleManage
.
getDepartmentName
(),
storeManage
.
getShortAddress
());
}
}
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