Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
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
hooloo
ms
soss
Commits
a5cf10e1
Commit
a5cf10e1
authored
Jun 10, 2022
by
张新旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码永远在路上
parent
2ddadc35
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
3 deletions
+26
-3
soss-admin/src/main/java/com/soss/web/controller/coffee/AppController.java
+8
-0
soss-framework/src/main/java/com/soss/framework/web/service/WeixinServiceImpl.java
+4
-1
soss-system/src/main/java/com/soss/system/service/impl/AppServiceImpl.java
+4
-1
soss-system/src/main/java/com/soss/system/service/impl/WechatMessageServiceImpl.java
+9
-0
soss-system/src/main/resources/mapper/system/OrderMapper.xml
+1
-1
No files found.
soss-admin/src/main/java/com/soss/web/controller/coffee/AppController.java
View file @
a5cf10e1
...
...
@@ -12,6 +12,7 @@ import com.soss.system.domain.Order;
import
com.soss.system.domain.OrderDetail
;
import
com.soss.system.service.impl.AppServiceImpl
;
import
com.soss.system.service.impl.OrderServiceImpl
;
import
com.soss.system.service.impl.WechatMessageServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -31,6 +32,8 @@ public class AppController extends BaseController {
private
AppServiceImpl
appService
;
@Autowired
private
OrderServiceImpl
orderService
;
@Autowired
private
WechatMessageServiceImpl
wechatMessageService
;
...
...
@@ -85,5 +88,10 @@ public class AppController extends BaseController {
public
AjaxResult
getNextOrder
(
String
orderId
,
String
shopId
){
return
AjaxResult
.
success
(
orderService
.
getNextOrder
(
orderId
,
shopId
));
}
@RequestMapping
(
"/getMessageCount"
)
public
AjaxResult
getMessageCount
(
HttpServletRequest
request
){
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
request
);
return
AjaxResult
.
success
(
""
,
wechatMessageService
.
getMessageCount
(
loginUser
.
getOpenId
()));
}
}
soss-framework/src/main/java/com/soss/framework/web/service/WeixinServiceImpl.java
View file @
a5cf10e1
...
...
@@ -533,11 +533,14 @@ public class WeixinServiceImpl {
String
cityString
=
"[value='%s'][0].children[value='%s'][0].name"
;
String
zoneString
=
"[value='%s'][0].children[value='%s'][0].children[value='%s'][0].name"
;
Shop
shop
=
new
Shop
();
shop
.
setState
(
"1"
);
List
<
Shop
>
shops
=
shopMapper
.
selectShopList
(
shop
);
List
<
JSONObject
>
proviceList
=
new
ArrayList
<>();
List
<
String
>
proString
=
new
ArrayList
<>();
for
(
Shop
shop1
:
shops
)
{
if
(
"3"
.
equals
(
shop1
.
getState
())){
continue
;
}
String
aa
=
AppServiceImpl
.
GetDistance
(
Double
.
parseDouble
(
lng
),
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
shop1
.
getLng
()),
Double
.
parseDouble
(
shop1
.
getLat
()));
shop1
.
setDistance
(
aa
);
String
province
=
shop1
.
getProvince
();
...
...
soss-system/src/main/java/com/soss/system/service/impl/AppServiceImpl.java
View file @
a5cf10e1
...
...
@@ -20,8 +20,11 @@ public class AppServiceImpl {
List
<
Shop
>
shops
=
shopMapper
.
selectShopList
(
shop
);
if
(
shops
!=
null
&&!
shops
.
isEmpty
()){
Shop
shop1
=
shops
.
get
(
0
);
shop1
.
setDistance
(
"-1"
);
if
(
StringUtils
.
isNotEmpty
(
lng
)&&
StringUtils
.
isNotEmpty
(
lat
)){
shop
.
setDistance
(
AppServiceImpl
.
GetDistance
(
Double
.
parseDouble
(
lng
),
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
shop
.
getLng
()),
Double
.
parseDouble
(
shop
.
getLat
())));
//List<Shop> shopList = shopMapper.selectShopList(new Shop());
shop
.
setDistance
(
AppServiceImpl
.
GetDistance
(
Double
.
parseDouble
(
lng
),
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
shop1
.
getLng
()),
Double
.
parseDouble
(
shop1
.
getLat
())));
}
return
shop1
;
}
else
{
...
...
soss-system/src/main/java/com/soss/system/service/impl/WechatMessageServiceImpl.java
View file @
a5cf10e1
...
...
@@ -115,4 +115,13 @@ public class WechatMessageServiceImpl implements IWechatMessageService
{
return
wechatMessageMapper
.
deleteWechatMessageById
(
id
);
}
public
String
getMessageCount
(
String
openId
)
{
WechatMessage
wechatMessage
=
new
WechatMessage
();
wechatMessage
.
setUserId
(
openId
);
wechatMessage
.
setIsRead
(
"1"
);
List
<
WechatMessage
>
wechatMessages
=
wechatMessageMapper
.
selectWechatMessageList
(
wechatMessage
);
return
wechatMessages
.
size
()+
""
;
}
}
soss-system/src/main/resources/mapper/system/OrderMapper.xml
View file @
a5cf10e1
...
...
@@ -215,7 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by created_at desc limit 1
</select>
<update
id=
"updateTimeOut"
>
update `order` set state='
5
' where state =#{status} and updated_at
<
DATE_SUB(NOW() ,interval #{timeout} SECOND)
update `order` set state='
7
' where state =#{status} and updated_at
<
DATE_SUB(NOW() ,interval #{timeout} SECOND)
</update>
<select
id=
"selectOrderByUserId"
resultMap=
"OrderResult"
>
<include
refid=
"selectOrderVo"
/>
...
...
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