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
a13d9f1e
Commit
a13d9f1e
authored
Feb 23, 2023
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单时校验订单中sku数量
parent
fa61a757
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
6 deletions
+45
-6
soss-admin/src/main/java/com/soss/web/controller/system/BannerController.java
+2
-1
soss-system/src/main/java/com/soss/system/domain/po/BannerListPo.java
+34
-0
soss-system/src/main/java/com/soss/system/mapper/SysBannerMapper.java
+2
-1
soss-system/src/main/java/com/soss/system/service/ISysBannerService.java
+2
-1
soss-system/src/main/java/com/soss/system/service/impl/SysBannerServiceImpl.java
+3
-1
soss-system/src/main/resources/mapper/system/SysBannerMapper.xml
+2
-2
No files found.
soss-admin/src/main/java/com/soss/web/controller/system/BannerController.java
View file @
a13d9f1e
...
@@ -6,6 +6,7 @@ import com.soss.common.core.domain.AjaxResult;
...
@@ -6,6 +6,7 @@ import com.soss.common.core.domain.AjaxResult;
import
com.soss.common.core.page.TableDataInfo
;
import
com.soss.common.core.page.TableDataInfo
;
import
com.soss.common.exception.ServiceException
;
import
com.soss.common.exception.ServiceException
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.po.BannerListPo
;
import
com.soss.system.domain.po.BannerPo
;
import
com.soss.system.domain.po.BannerPo
;
import
com.soss.system.domain.vo.BannerVo
;
import
com.soss.system.domain.vo.BannerVo
;
import
com.soss.system.service.ISysBannerService
;
import
com.soss.system.service.ISysBannerService
;
...
@@ -27,7 +28,7 @@ public class BannerController extends BaseController {
...
@@ -27,7 +28,7 @@ public class BannerController extends BaseController {
private
ISysBannerService
bannerService
;
private
ISysBannerService
bannerService
;
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestBody
SysBanner
banner
)
{
public
TableDataInfo
list
(
@RequestBody
BannerListPo
banner
)
{
startPage
();
startPage
();
List
<
SysBanner
>
list
=
bannerService
.
selectBanner
(
banner
);
List
<
SysBanner
>
list
=
bannerService
.
selectBanner
(
banner
);
List
<
BannerVo
>
bannerVos
=
bannerService
.
copyBanner
(
list
);
List
<
BannerVo
>
bannerVos
=
bannerService
.
copyBanner
(
list
);
...
...
soss-system/src/main/java/com/soss/system/domain/po/BannerListPo.java
0 → 100644
View file @
a13d9f1e
package
com
.
soss
.
system
.
domain
.
po
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
"轮播图查询参数类"
)
public
class
BannerListPo
{
/**
* 类型:1-小程序,2-KDS,3-点单屏
*/
private
Integer
type
;
/**
* 目标:1-小程序首页,2-小程序我的,0-其它
*/
private
Integer
target
;
/**
* 状态
*/
private
Integer
state
;
@ApiModelProperty
(
"省份"
)
private
String
province
;
@ApiModelProperty
(
"城市"
)
private
String
city
;
@ApiModelProperty
(
"区域"
)
private
String
area
;
@ApiModelProperty
(
"店铺ID"
)
private
Long
shopId
;
}
soss-system/src/main/java/com/soss/system/mapper/SysBannerMapper.java
View file @
a13d9f1e
package
com
.
soss
.
system
.
mapper
;
package
com
.
soss
.
system
.
mapper
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.po.BannerListPo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,7 +13,7 @@ import java.util.List;
...
@@ -12,7 +13,7 @@ import java.util.List;
* @date 2022-04-28
* @date 2022-04-28
*/
*/
public
interface
SysBannerMapper
{
public
interface
SysBannerMapper
{
List
<
SysBanner
>
selectBanner
(
SysBanner
banner
);
List
<
SysBanner
>
selectBanner
(
BannerListPo
banner
);
Long
createBanner
(
SysBanner
banner
);
Long
createBanner
(
SysBanner
banner
);
...
...
soss-system/src/main/java/com/soss/system/service/ISysBannerService.java
View file @
a13d9f1e
package
com
.
soss
.
system
.
service
;
package
com
.
soss
.
system
.
service
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.po.BannerListPo
;
import
com.soss.system.domain.po.BannerPo
;
import
com.soss.system.domain.po.BannerPo
;
import
com.soss.system.domain.vo.BannerVo
;
import
com.soss.system.domain.vo.BannerVo
;
...
@@ -13,7 +14,7 @@ import java.util.List;
...
@@ -13,7 +14,7 @@ import java.util.List;
* @date 2022-04-28
* @date 2022-04-28
*/
*/
public
interface
ISysBannerService
{
public
interface
ISysBannerService
{
List
<
SysBanner
>
selectBanner
(
SysBanner
banner
);
List
<
SysBanner
>
selectBanner
(
BannerListPo
banner
);
Long
createBanner
(
BannerPo
banner
);
Long
createBanner
(
BannerPo
banner
);
...
...
soss-system/src/main/java/com/soss/system/service/impl/SysBannerServiceImpl.java
View file @
a13d9f1e
...
@@ -4,6 +4,7 @@ import com.soss.common.exception.ServiceException;
...
@@ -4,6 +4,7 @@ import com.soss.common.exception.ServiceException;
import
com.soss.common.utils.StringUtils
;
import
com.soss.common.utils.StringUtils
;
import
com.soss.system.domain.Shop
;
import
com.soss.system.domain.Shop
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.SysBanner
;
import
com.soss.system.domain.po.BannerListPo
;
import
com.soss.system.domain.po.BannerPo
;
import
com.soss.system.domain.po.BannerPo
;
import
com.soss.system.domain.vo.BannerVo
;
import
com.soss.system.domain.vo.BannerVo
;
import
com.soss.system.mapper.ShopMapper
;
import
com.soss.system.mapper.ShopMapper
;
...
@@ -39,7 +40,7 @@ public class SysBannerServiceImpl implements ISysBannerService {
...
@@ -39,7 +40,7 @@ public class SysBannerServiceImpl implements ISysBannerService {
private
AreaUtil
areaUtil
;
private
AreaUtil
areaUtil
;
@Override
@Override
public
List
<
SysBanner
>
selectBanner
(
SysBanner
banner
)
{
public
List
<
SysBanner
>
selectBanner
(
BannerListPo
banner
)
{
return
sysBannerMapper
.
selectBanner
(
banner
);
return
sysBannerMapper
.
selectBanner
(
banner
);
}
}
...
@@ -144,6 +145,7 @@ public class SysBannerServiceImpl implements ISysBannerService {
...
@@ -144,6 +145,7 @@ public class SysBannerServiceImpl implements ISysBannerService {
bannerVo
.
setType
(
banner
.
getType
());
bannerVo
.
setType
(
banner
.
getType
());
bannerVo
.
setTarget
(
banner
.
getTarget
());
bannerVo
.
setTarget
(
banner
.
getTarget
());
bannerVo
.
setSort
(
banner
.
getSort
());
bannerVo
.
setSort
(
banner
.
getSort
());
bannerVo
.
setState
(
banner
.
getState
());
bannerVo
.
setProvinceStr
(
banner
.
getProvince
());
bannerVo
.
setProvinceStr
(
banner
.
getProvince
());
bannerVo
.
setCityStr
(
banner
.
getCity
());
bannerVo
.
setCityStr
(
banner
.
getCity
());
bannerVo
.
setAreaStr
(
banner
.
getArea
());
bannerVo
.
setAreaStr
(
banner
.
getArea
());
...
...
soss-system/src/main/resources/mapper/system/SysBannerMapper.xml
View file @
a13d9f1e
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<result
property=
"updatedAt"
column=
"updated_at"
/>
<result
property=
"updatedAt"
column=
"updated_at"
/>
</resultMap>
</resultMap>
<select
id=
"selectBanner"
resultMap=
"BannerResult"
parameterType=
"
SysBanner
"
>
<select
id=
"selectBanner"
resultMap=
"BannerResult"
parameterType=
"
BannerListPo
"
>
select * from sys_banner
select * from sys_banner
<where>
<where>
<if
test=
"type != null "
>
type = #{type}
</if>
<if
test=
"type != null "
>
type = #{type}
</if>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<if
test=
"province != null and province != ''"
>
and province like concat('%', #{province}, '%')
</if>
<if
test=
"province != null and province != ''"
>
and province like concat('%', #{province}, '%')
</if>
<if
test=
"city != null and city != ''"
>
and city like concat('%', #{city}, '%')
</if>
<if
test=
"city != null and city != ''"
>
and city like concat('%', #{city}, '%')
</if>
<if
test=
"area != null and area != ''"
>
and area like concat('%', #{area}, '%')
</if>
<if
test=
"area != null and area != ''"
>
and area like concat('%', #{area}, '%')
</if>
<if
test=
"shopId
s != null and shopIds != ''"
>
and shop_ids like concat('%', #{shopIds
}, '%')
</if>
<if
test=
"shopId
!= null and shopId != ''"
>
and shopId like concat('%', #{shopId
}, '%')
</if>
<if
test=
"state != null "
>
and state = #{state}
</if>
<if
test=
"state != null "
>
and state = #{state}
</if>
</where>
</where>
order by created_at desc
order by created_at desc
...
...
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