Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wenchuang-java
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenchuang
wenchuang-java
Commits
329ab0a6
Commit
329ab0a6
authored
Sep 19, 2025
by
肖平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
c122ea28
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
100 additions
and
13 deletions
+100
-13
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/H5MemberInterceptor.java
+5
-3
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+1
-0
ruoyi-mall/src/main/java/com/cyl/h5/controller/H5ActivityInfoController.java
+1
-0
ruoyi-mall/src/main/java/com/cyl/h5/controller/H5OrderController.java
+5
-5
ruoyi-mall/src/main/java/com/cyl/h5/controller/H5ProductController.java
+8
-3
ruoyi-mall/src/main/java/com/cyl/h5/service/H5OrderService.java
+8
-2
ruoyi-mall/src/main/java/com/cyl/manager/oms/mapper/OrderMapper.java
+2
-0
ruoyi-mall/src/main/java/com/cyl/manager/pms/service/ProductService.java
+41
-0
ruoyi-mall/src/main/resources/mapper/oms/OrderMapper.xml
+29
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/H5MemberInterceptor.java
View file @
329ab0a6
...
@@ -33,6 +33,7 @@ public class H5MemberInterceptor extends HandlerInterceptorAdapter {
...
@@ -33,6 +33,7 @@ public class H5MemberInterceptor extends HandlerInterceptorAdapter {
"/h5/file/upload"
,
"/h5/file/upload"
,
"/h5/slideshowInfo/list"
,
"/h5/slideshowInfo/list"
,
"/h5/posterInfo/list"
,
"/h5/posterInfo/list"
,
"/h5/activityInfo/**"
,
"/h5/blackImgInfo/list"
"/h5/blackImgInfo/list"
};
};
...
@@ -45,9 +46,10 @@ public class H5MemberInterceptor extends HandlerInterceptorAdapter {
...
@@ -45,9 +46,10 @@ public class H5MemberInterceptor extends HandlerInterceptorAdapter {
}
}
for
(
String
s
:
WHITE_PATHS
)
{
for
(
String
s
:
WHITE_PATHS
)
{
if
(
requestUri
.
startsWith
(
s
))
{
// 用正则匹配路径
flag
=
false
;
if
(
requestUri
.
matches
(
s
.
replace
(
"**"
,
".*"
)))
{
break
;
flag
=
false
;
// 如果匹配,则设置 flag 为 false,表示允许访问
break
;
// 跳出循环,已经匹配成功
}
}
}
}
if
(!
flag
)
{
if
(!
flag
)
{
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
View file @
329ab0a6
...
@@ -112,6 +112,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -112,6 +112,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.
antMatchers
(
"/h5/slideshowInfo/**"
).
permitAll
()
.
antMatchers
(
"/h5/slideshowInfo/**"
).
permitAll
()
.
antMatchers
(
"/h5/posterInfo/**"
).
permitAll
()
.
antMatchers
(
"/h5/posterInfo/**"
).
permitAll
()
.
antMatchers
(
"/h5/blackImgInfo/**"
).
permitAll
()
.
antMatchers
(
"/h5/blackImgInfo/**"
).
permitAll
()
.
antMatchers
(
"/h5/activityInfo/**"
).
permitAll
()
.
antMatchers
(
"/common/download**"
).
anonymous
()
.
antMatchers
(
"/common/download**"
).
anonymous
()
.
antMatchers
(
"/common/download/resource**"
).
anonymous
()
.
antMatchers
(
"/common/download/resource**"
).
anonymous
()
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
...
...
ruoyi-mall/src/main/java/com/cyl/h5/controller/H5ActivityInfoController.java
View file @
329ab0a6
...
@@ -35,6 +35,7 @@ public class H5ActivityInfoController extends BaseController {
...
@@ -35,6 +35,7 @@ public class H5ActivityInfoController extends BaseController {
@ApiOperation
(
"查询活动信息列表"
)
@ApiOperation
(
"查询活动信息列表"
)
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
public
ResponseEntity
<
Page
<
ActivityInfo
>>
list
(
@RequestBody
ActivityInfoQuery
query
,
Pageable
page
)
{
public
ResponseEntity
<
Page
<
ActivityInfo
>>
list
(
@RequestBody
ActivityInfoQuery
query
,
Pageable
page
)
{
query
.
setStatus
(
"0"
);
List
<
ActivityInfo
>
list
=
service
.
selectList
(
query
,
page
);
List
<
ActivityInfo
>
list
=
service
.
selectList
(
query
,
page
);
return
ResponseEntity
.
ok
(
new
PageImpl
<>(
list
,
page
,
((
com
.
github
.
pagehelper
.
Page
)
list
).
getTotal
()));
return
ResponseEntity
.
ok
(
new
PageImpl
<>(
list
,
page
,
((
com
.
github
.
pagehelper
.
Page
)
list
).
getTotal
()));
}
}
...
...
ruoyi-mall/src/main/java/com/cyl/h5/controller/H5OrderController.java
View file @
329ab0a6
...
@@ -84,11 +84,11 @@ public class H5OrderController {
...
@@ -84,11 +84,11 @@ public class H5OrderController {
@ApiOperation
(
"订单详情"
)
@ApiOperation
(
"订单详情"
)
@GetMapping
(
"/orderDetail"
)
@GetMapping
(
"/orderDetail"
)
public
ResponseEntity
<
H5OrderVO
>
orderDetail
(
@RequestParam
(
required
=
false
)
Long
orderId
)
{
public
ResponseEntity
<
H5OrderVO
>
orderDetail
(
@RequestParam
(
required
=
false
)
Long
orderId
,
@RequestParam
(
required
=
false
)
Long
payId
)
{
if
(
orderId
==
null
)
{
//
if (orderId == null) {
throw
new
RuntimeException
(
"系统繁忙"
);
//
throw new RuntimeException("系统繁忙");
}
//
}
return
ResponseEntity
.
ok
(
service
.
orderDetail
(
orderId
));
return
ResponseEntity
.
ok
(
service
.
orderDetail
(
orderId
,
payId
));
}
}
/**
/**
...
...
ruoyi-mall/src/main/java/com/cyl/h5/controller/H5ProductController.java
View file @
329ab0a6
...
@@ -9,11 +9,14 @@ import com.cyl.manager.pms.service.ProductService;
...
@@ -9,11 +9,14 @@ import com.cyl.manager.pms.service.ProductService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
"/no-auth/product"
)
@RequestMapping
(
"/no-auth/product"
)
...
@@ -24,9 +27,11 @@ public class H5ProductController {
...
@@ -24,9 +27,11 @@ public class H5ProductController {
private
ProductConvert
productConvert
;
private
ProductConvert
productConvert
;
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
public
ResponseEntity
<
Page
<
H5ProductVO
>>
queryGoodByPage
(
@RequestBody
ProductQuery
query
,
Pageable
page
)
{
public
Map
<
String
,
List
<
Product
>>
queryGoodByPage
(
@RequestBody
ProductQuery
query
)
{
List
<
Product
>
pageRes
=
productService
.
selectList
(
query
,
page
);
Map
<
String
,
List
<
Product
>>
map
=
new
HashMap
<>();
return
ResponseEntity
.
ok
(
new
PageImpl
<>(
productConvert
.
dos2dtos
(
pageRes
),
page
,
((
com
.
github
.
pagehelper
.
Page
)
pageRes
).
getTotal
()));
List
<
Product
>
pageRes
=
productService
.
selectListApp
(
query
);
map
.
put
(
"content"
,
pageRes
);
return
map
;
}
}
@GetMapping
(
"/detail/{id}"
)
@GetMapping
(
"/detail/{id}"
)
public
ResponseEntity
<
ProductDetailVO
>
queryDetail
(
@PathVariable
Long
id
)
{
public
ResponseEntity
<
ProductDetailVO
>
queryDetail
(
@PathVariable
Long
id
)
{
...
...
ruoyi-mall/src/main/java/com/cyl/h5/service/H5OrderService.java
View file @
329ab0a6
...
@@ -437,8 +437,14 @@ public class H5OrderService {
...
@@ -437,8 +437,14 @@ public class H5OrderService {
return
new
PageImpl
<>(
orderList
,
pageable
,
total
);
return
new
PageImpl
<>(
orderList
,
pageable
,
total
);
}
}
public
H5OrderVO
orderDetail
(
Long
orderId
)
{
public
H5OrderVO
orderDetail
(
Long
orderId
,
Long
payId
)
{
H5OrderVO
order
=
orderMapper
.
selectOrderDetail
(
orderId
);
H5OrderVO
order
=
new
H5OrderVO
();
if
(
null
!=
payId
){
order
=
orderMapper
.
selectPayOrderDetail
(
payId
);
}
else
{
order
=
orderMapper
.
selectOrderDetail
(
orderId
);
}
if
(
order
==
null
)
{
if
(
order
==
null
)
{
throw
new
RuntimeException
(
"未查询到该订单"
);
throw
new
RuntimeException
(
"未查询到该订单"
);
}
}
...
...
ruoyi-mall/src/main/java/com/cyl/manager/oms/mapper/OrderMapper.java
View file @
329ab0a6
...
@@ -33,6 +33,8 @@ public interface OrderMapper extends BaseMapper<Order> {
...
@@ -33,6 +33,8 @@ public interface OrderMapper extends BaseMapper<Order> {
H5OrderVO
selectOrderDetail
(
Long
orderId
);
H5OrderVO
selectOrderDetail
(
Long
orderId
);
H5OrderVO
selectPayOrderDetail
(
Long
payId
);
CountOrderVO
countByStatusAndMemberId
(
Long
memberId
);
CountOrderVO
countByStatusAndMemberId
(
Long
memberId
);
Integer
cancelBatch
(
@Param
(
"list"
)
List
<
Order
>
orderList
);
Integer
cancelBatch
(
@Param
(
"list"
)
List
<
Order
>
orderList
);
...
...
ruoyi-mall/src/main/java/com/cyl/manager/pms/service/ProductService.java
View file @
329ab0a6
...
@@ -66,6 +66,47 @@ public class ProductService {
...
@@ -66,6 +66,47 @@ public class ProductService {
* 查询商品信息列表
* 查询商品信息列表
*
*
* @param query 查询条件
* @param query 查询条件
* @return 商品信息
*/
public
List
<
Product
>
selectListApp
(
ProductQuery
query
)
{
QueryWrapper
<
Product
>
qw
=
new
QueryWrapper
<>();
if
(
StringUtils
.
isNoneEmpty
(
query
.
getOrderField
()))
{
if
(
StringUtils
.
isNotEmpty
(
query
.
getOrderSort
())
&&
"desc"
.
equalsIgnoreCase
(
query
.
getOrderSort
()))
{
qw
.
orderByDesc
(
query
.
getOrderField
());
}
else
{
qw
.
orderByAsc
(
query
.
getOrderField
());
}
}
else
{
qw
.
orderByDesc
(
"publish_status"
);
qw
.
orderByAsc
(
"sort"
);
}
Long
categoryId
=
query
.
getCategoryId
();
if
(
categoryId
!=
null
)
{
qw
.
eq
(
"category_id"
,
categoryId
);
}
if
(
StringUtils
.
isNotEmpty
(
query
.
getProductCategoryNameLike
()))
{
qw
.
eq
(
"product_category_name"
,
query
.
getProductCategoryNameLike
());
}
String
search
=
query
.
getNameLike
();
if
(
StringUtils
.
isNoneEmpty
(
search
))
{
qw
.
like
(
"name"
,
"%"
.
concat
(
search
.
trim
()).
concat
(
"%"
));
}
if
(
CollectionUtil
.
isNotEmpty
(
query
.
getIds
()))
{
qw
.
in
(
"id"
,
query
.
getIds
());
}
if
(
null
!=
query
.
getPublishStatus
())
{
qw
.
in
(
"publish_status"
,
query
.
getPublishStatus
());
}
if
(
CollectionUtil
.
isNotEmpty
(
query
.
getExcludeProductIds
()))
{
qw
.
in
(
"id"
,
query
.
getExcludeProductIds
());
}
return
productMapper
.
selectList
(
qw
);
}
/**
* 查询商品信息列表
*
* @param query 查询条件
* @param page 分页条件
* @param page 分页条件
* @return 商品信息
* @return 商品信息
*/
*/
...
...
ruoyi-mall/src/main/resources/mapper/oms/OrderMapper.xml
View file @
329ab0a6
...
@@ -278,5 +278,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -278,5 +278,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from oms_order
from oms_order
where status in (1,2,3) and create_time between #{startTime} and #{endTime}
where status in (1,2,3) and create_time between #{startTime} and #{endTime}
</select>
</select>
<select
id=
"selectPayOrderDetail"
resultType=
"com.cyl.h5.domain.vo.H5OrderVO"
>
select
id orderId,
pay_id,
order_sn,
member_id,
total_amount,
pay_amount,
coupon_amount,
status,
aftersale_status,
note,
delivery_sn,
create_time,
payment_time,
receiver_name,
receiver_phone,
receiver_province,
receiver_city,
receiver_district,
receiver_detail_address,
de_money,
delivery_company,
give_integral
from oms_order
where
delete_status=0
and pay_id=#{payId}
</select>
</mapper>
</mapper>
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