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
11922e0a
Commit
11922e0a
authored
Jun 25, 2022
by
张新旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前进前进,继续上代码
parent
c6e5b0f2
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
36 deletions
+30
-36
soss-admin/src/main/java/com/soss/web/controller/coffee/OrderController.java
+0
-4
soss-admin/src/main/java/com/soss/web/controller/coffee/SpecController.java
+1
-1
soss-framework/src/main/java/com/soss/framework/config/SecurityConfig.java
+1
-1
soss-system/src/main/java/com/soss/system/service/impl/GoodsServiceImpl.java
+2
-2
soss-system/src/main/java/com/soss/system/service/impl/OrderRefundServiceImpl.java
+2
-2
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
+3
-3
soss-system/src/main/java/com/soss/system/service/impl/SpecServiceImpl.java
+3
-4
soss-system/src/main/resources/mapper/system/OrderMapper.xml
+9
-10
soss-system/src/main/resources/mapper/system/OrderRefundMapper.xml
+9
-9
No files found.
soss-admin/src/main/java/com/soss/web/controller/coffee/OrderController.java
View file @
11922e0a
...
@@ -59,13 +59,9 @@ public class OrderController extends BaseController
...
@@ -59,13 +59,9 @@ public class OrderController extends BaseController
}
}
/**
/**
* 获取订单详细信息
* 获取订单详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:order:query')"
)
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
String
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
String
id
)
{
{
...
...
soss-admin/src/main/java/com/soss/web/controller/coffee/SpecController.java
View file @
11922e0a
...
@@ -82,7 +82,7 @@ public class SpecController extends BaseController
...
@@ -82,7 +82,7 @@ public class SpecController extends BaseController
/**
/**
* 删除规格
* 删除规格
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:spec:remove')"
)
//
@PreAuthorize("@ss.hasPermi('system:spec:remove')")
@Log
(
title
=
"规格"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"规格"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
String
id
)
public
AjaxResult
remove
(
@PathVariable
String
id
)
...
...
soss-framework/src/main/java/com/soss/framework/config/SecurityConfig.java
View file @
11922e0a
...
@@ -101,7 +101,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -101,7 +101,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
// 过滤请求
.
authorizeRequests
()
.
authorizeRequests
()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
,
"/weixin/**"
,
"/application/**"
,
"/v1/**"
,
"/tool/**"
,
"/app/getWaitTine"
).
permitAll
()
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
,
"/weixin/**"
,
"/application/**"
,
"/v1/**"
,
"/tool/**"
,
"/app/getWaitTine"
,
"/system/**"
).
permitAll
()
.
antMatchers
(
.
antMatchers
(
HttpMethod
.
GET
,
HttpMethod
.
GET
,
"/"
,
"/"
,
...
...
soss-system/src/main/java/com/soss/system/service/impl/GoodsServiceImpl.java
View file @
11922e0a
...
@@ -98,8 +98,8 @@ public class GoodsServiceImpl implements IGoodsService
...
@@ -98,8 +98,8 @@ public class GoodsServiceImpl implements IGoodsService
@Transactional
@Transactional
public
int
insertGoods
(
Goods
goods
)
public
int
insertGoods
(
Goods
goods
)
{
{
if
(
goods
.
getDiscount
().
compareTo
(
goods
.
getPrice
())>
=
0
){
if
(
goods
.
getDiscount
().
compareTo
(
goods
.
getPrice
())>
0
){
throw
new
ServiceException
(
"折扣价不能大于
等于
原价"
);
throw
new
ServiceException
(
"折扣价不能大于原价"
);
}
}
goods
.
setCode
(
GenerateCode
.
getCode
(
"G"
));
goods
.
setCode
(
GenerateCode
.
getCode
(
"G"
));
goods
.
setCreatedAt
(
new
Date
());
goods
.
setCreatedAt
(
new
Date
());
...
...
soss-system/src/main/java/com/soss/system/service/impl/OrderRefundServiceImpl.java
View file @
11922e0a
...
@@ -100,9 +100,9 @@ public class OrderRefundServiceImpl implements IOrderRefundService
...
@@ -100,9 +100,9 @@ public class OrderRefundServiceImpl implements IOrderRefundService
}
}
// 制作中、制作完成、聚餐中、已完成
// 制作中、制作完成、聚餐中、已完成
String
state
=
order
.
getState
();
String
state
=
order
.
getState
();
List
<
String
>
status
=
Arrays
.
asList
(
OrderStatusConstant
.
production
,
OrderStatusConstant
.
productionCompleted
,
OrderStatusConstant
.
Taking
,
OrderStatusConstant
.
completed
,
OrderStatusConstant
.
timeout
);
List
<
String
>
status
=
Arrays
.
asList
(
OrderStatusConstant
.
production
,
OrderStatusConstant
.
productionCompleted
,
OrderStatusConstant
.
Taking
,
OrderStatusConstant
.
completed
,
OrderStatusConstant
.
timeout
,
OrderStatusConstant
.
refundFailed
);
if
(
OrderStatusConstant
.
Paid
.
equals
(
state
)){
if
(
OrderStatusConstant
.
Paid
.
equals
(
state
)){
orderRefund
.
setRefundAmount
(
order
.
getAmount
());
//
orderRefund.setRefundAmount(order.getAmount());
// 4 支付制作中 5 制作完成未取 6 取餐中 7 取餐完成
// 4 支付制作中 5 制作完成未取 6 取餐中 7 取餐完成
}
else
if
(
status
.
contains
(
state
)){
}
else
if
(
status
.
contains
(
state
)){
String
desc
=
orderRefund
.
getDesc
();
String
desc
=
orderRefund
.
getDesc
();
...
...
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
View file @
11922e0a
...
@@ -471,7 +471,7 @@ public class OrderServiceImpl implements IOrderService
...
@@ -471,7 +471,7 @@ public class OrderServiceImpl implements IOrderService
public
List
<
JSONObject
>
getOrderInfo
(
String
machineCode
)
{
public
List
<
JSONObject
>
getOrderInfo
(
String
machineCode
)
{
Machine
machine
=
machineMapper
.
selectMachineByCode
(
machineCode
);
Machine
machine
=
machineMapper
.
selectMachineByCode
(
machineCode
);
List
<
String
>
status
=
Arrays
.
asList
(
"
3
"
,
"4"
,
"5"
);
List
<
String
>
status
=
Arrays
.
asList
(
"
2
"
,
"4"
,
"5"
);
List
<
Order
>
orders
=
orderMapper
.
selectOrder
(
status
,
machine
.
getId
());
List
<
Order
>
orders
=
orderMapper
.
selectOrder
(
status
,
machine
.
getId
());
Map
<
String
,
List
<
Order
>>
collect
=
orders
.
stream
().
collect
(
Collectors
.
groupingBy
(
Order:
:
getState
));
Map
<
String
,
List
<
Order
>>
collect
=
orders
.
stream
().
collect
(
Collectors
.
groupingBy
(
Order:
:
getState
));
List
<
JSONObject
>
objects
=
new
ArrayList
<>();
List
<
JSONObject
>
objects
=
new
ArrayList
<>();
...
@@ -486,7 +486,7 @@ public class OrderServiceImpl implements IOrderService
...
@@ -486,7 +486,7 @@ public class OrderServiceImpl implements IOrderService
JSONObject
jsonObject1
=
new
JSONObject
();
JSONObject
jsonObject1
=
new
JSONObject
();
jsonObjects
.
add
(
jsonObject1
);
jsonObjects
.
add
(
jsonObject1
);
jsonObject1
.
put
(
"orderId"
,
order
.
getId
());
jsonObject1
.
put
(
"orderId"
,
order
.
getId
());
jsonObject1
.
put
(
"orderNum"
,
order
.
getOrderNum
());
jsonObject1
.
put
(
"orderNum
ber
"
,
order
.
getOrderNum
());
jsonObject1
.
put
(
"orderNo"
,
order
.
getOrderNo
());
jsonObject1
.
put
(
"orderNo"
,
order
.
getOrderNo
());
}
}
}
}
...
@@ -508,7 +508,7 @@ public class OrderServiceImpl implements IOrderService
...
@@ -508,7 +508,7 @@ public class OrderServiceImpl implements IOrderService
}
}
public
Map
<
String
,
String
>
getMyFristOrder
(
String
openId
,
String
shopId
)
{
public
Map
<
String
,
String
>
getMyFristOrder
(
String
openId
,
String
shopId
)
{
List
<
String
>
status
=
Arrays
.
asList
(
"2"
,
"3"
,
"4"
,
"7"
);
List
<
String
>
status
=
Arrays
.
asList
(
"2"
,
"3"
,
"4"
);
Order
order
=
orderMapper
.
selectHomeByUserId
(
openId
,
status
,
shopId
);
Order
order
=
orderMapper
.
selectHomeByUserId
(
openId
,
status
,
shopId
);
if
(
order
==
null
){
if
(
order
==
null
){
return
null
;
return
null
;
...
...
soss-system/src/main/java/com/soss/system/service/impl/SpecServiceImpl.java
View file @
11922e0a
...
@@ -141,7 +141,7 @@ public class SpecServiceImpl implements ISpecService
...
@@ -141,7 +141,7 @@ public class SpecServiceImpl implements ISpecService
* rule_list like concat('%',#{query},'%')
* rule_list like concat('%',#{query},'%')
*/
*/
String
query
=
"\"specId\":
"
+
spec
.
getId
();
String
query
=
"\"specId\":"
+
spec
.
getId
();
List
<
Goods
>
goods
=
goodsMapper
.
selectSpec
(
query
);
List
<
Goods
>
goods
=
goodsMapper
.
selectSpec
(
query
);
if
(!
goods
.
isEmpty
()){
if
(!
goods
.
isEmpty
()){
throw
new
ServiceException
(
"当前还有商品使用,请先删除商品"
);
throw
new
ServiceException
(
"当前还有商品使用,请先删除商品"
);
...
@@ -206,8 +206,7 @@ public class SpecServiceImpl implements ISpecService
...
@@ -206,8 +206,7 @@ public class SpecServiceImpl implements ISpecService
@Override
@Override
public
int
deleteSpecById
(
String
id
)
public
int
deleteSpecById
(
String
id
)
{
{
String
query
=
"\"specId\": "
+
id
;
String
query
=
"\"specId\":"
+
id
;
List
<
GoodsSku
>
goodsSkus
=
goodsSkuMapper
.
selectSpec
(
query
);
List
<
Goods
>
goods
=
goodsMapper
.
selectSpec
(
query
);
List
<
Goods
>
goods
=
goodsMapper
.
selectSpec
(
query
);
if
(!
goods
.
isEmpty
()){
if
(!
goods
.
isEmpty
()){
throw
new
ServiceException
(
"当前还有商品使用,请先删除商品"
);
throw
new
ServiceException
(
"当前还有商品使用,请先删除商品"
);
...
@@ -223,7 +222,7 @@ public class SpecServiceImpl implements ISpecService
...
@@ -223,7 +222,7 @@ public class SpecServiceImpl implements ISpecService
}
}
public
void
deleteGoodsSku
(
String
specId
){
public
void
deleteGoodsSku
(
String
specId
){
String
query
=
"\"specId\":
"
+
specId
;
String
query
=
"\"specId\":"
+
specId
;
List
<
Goods
>
goods
=
goodsMapper
.
selectSpecNoState
(
query
,
"3"
);
List
<
Goods
>
goods
=
goodsMapper
.
selectSpecNoState
(
query
,
"3"
);
for
(
Goods
good
:
goods
)
{
for
(
Goods
good
:
goods
)
{
goodsMapper
.
updateGoodsSpec
(
good
.
getId
());
goodsMapper
.
updateGoodsSpec
(
good
.
getId
());
...
...
soss-system/src/main/resources/mapper/system/OrderMapper.xml
View file @
11922e0a
...
@@ -158,34 +158,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -158,34 +158,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectOrderByQuery"
resultMap=
"OrderResult"
>
<select
id=
"selectOrderByQuery"
resultMap=
"OrderResult"
>
<include
refid=
"selectOrderVo"
/>
<include
refid=
"selectOrderVo"
/>
<where>
<where>
<if
test=
"orderNo!=null "
>
<if
test=
"orderNo!=null
and orderNo != ''
"
>
and order_no =#{orderNo}
and order_no =#{orderNo}
</if>
</if>
<if
test=
"orderNum!=null "
>
<if
test=
"orderNum!=null
and orderNum != ''
"
>
and order_num =#{orderNum}
and order_num =#{orderNum}
</if>
</if>
<if
test=
"userName!=null"
>
<if
test=
"userName!=null
and userName != ''
"
>
and user_name like concat('%', #{userName}, '%')
and user_name like concat('%', #{userName}, '%')
</if>
</if>
<if
test=
"shopId!=null "
>
<if
test=
"shopId!=null
and shopId != ''
"
>
and shop_id =#{shopId}
and shop_id =#{shopId}
</if>
</if>
<if
test=
"state!=null "
>
<if
test=
"state!=null
and state != ''
"
>
and state =#{state}
and state =#{state}
</if>
</if>
<if
test=
"createAtStart!=null "
>
<if
test=
"createAtStart!=null
and createAtStart != ''
"
>
<![CDATA[ and created_at >= #{createAtStart}]]>
<![CDATA[ and created_at >= #{createAtStart}]]>
</if>
</if>
<if
test=
"createAtEnd!=null "
>
<if
test=
"createAtEnd!=null
and createAtEnd != ''
"
>
<![CDATA[ and created_at <= #{createAtEnd}]]>
<![CDATA[ and created_at <= #{createAtEnd}]]>
</if>
</if>
<if
test=
"payAtStart!=null "
>
<if
test=
"payAtStart!=null
and payAtStart != ''
"
>
<![CDATA[ and pay_time >= #{payAtStart}]]>
<![CDATA[ and pay_time >= #{payAtStart}]]>
</if>
</if>
<if
test=
"payAtEnd!=null "
>
<if
test=
"payAtEnd!=null and payAtEnd != ''"
>
<![CDATA[ and pay_time <= #{payAtEnd}]]>
<![CDATA[ and pay_time <= #{payAtEnd}]]>
</if>
</if>
</where>
</where>
...
...
soss-system/src/main/resources/mapper/system/OrderRefundMapper.xml
View file @
11922e0a
...
@@ -93,33 +93,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -93,33 +93,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectList"
resultMap=
"OrderRefundResult"
>
<select
id=
"selectList"
resultMap=
"OrderRefundResult"
>
select or2.* from `order` o ,order_refund or2 where o.id =or2.order_id
select or2.* from `order` o ,order_refund or2 where o.id =or2.order_id
<if
test=
"orderNo!=null "
>
<if
test=
"orderNo!=null
and orderNo != ''
"
>
and o.order_no =#{orderNo}
and o.order_no =#{orderNo}
</if>
</if>
<if
test=
"orderNum!=null "
>
<if
test=
"orderNum!=null
and orderNum != ''
"
>
and o.order_num =#{orderNum}
and o.order_num =#{orderNum}
</if>
</if>
<if
test=
"userName!=null"
>
<if
test=
"userName!=null
and userName != ''
"
>
and o.user_name like concat('%', #{userName}, '%')
and o.user_name like concat('%', #{userName}, '%')
</if>
</if>
<if
test=
"shopId!=null "
>
<if
test=
"shopId!=null
and shopId != ''
"
>
and o.shop_id =#{shopId}
and o.shop_id =#{shopId}
</if>
</if>
<if
test=
"state!=null "
>
<if
test=
"state!=null
and state != ''
"
>
and o.state =#{state}
and o.state =#{state}
</if>
</if>
<if
test=
"createAtStart!=null "
>
<if
test=
"createAtStart!=null
and createAtStart != ''
"
>
<![CDATA[ and o.created_at >= #{createAtStart}]]>
<![CDATA[ and o.created_at >= #{createAtStart}]]>
</if>
</if>
<if
test=
"createAtEnd!=null "
>
<if
test=
"createAtEnd!=null
and createAtEnd != ''
"
>
<![CDATA[ and o.created_at <= #{createAtEnd}]]>
<![CDATA[ and o.created_at <= #{createAtEnd}]]>
</if>
</if>
<if
test=
"payAtStart!=null "
>
<if
test=
"payAtStart!=null
and payAtStart != ''
"
>
<![CDATA[ and o.pay_time >= #{payAtStart}]]>
<![CDATA[ and o.pay_time >= #{payAtStart}]]>
</if>
</if>
<if
test=
"payAtEnd!=null "
>
<if
test=
"payAtEnd!=null
and payAtEnd != ''
"
>
<![CDATA[ and o.pay_time <= #{payAtEnd}]]>
<![CDATA[ and o.pay_time <= #{payAtEnd}]]>
</if>
</if>
...
...
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