Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
a4d72125
"src/main/webapp/vscode:/vscode.git/clone" did not exist on "0c6f4ec6fb96e0d644713d8279882e493098005a"
Commit
a4d72125
authored
Jun 01, 2018
by
zhh
Browse files
添加商品专区和优选接口
parent
7e6e3d00
Changes
6
Hide whitespace changes
Inline
Side-by-side
mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java
0 → 100644
View file @
a4d72125
package
com.macro.mall.controller
;
import
com.macro.mall.dto.CommonResult
;
import
com.macro.mall.model.CmsPrefrenceArea
;
import
com.macro.mall.service.CmsPrefrenceAreaService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
/**
* 商品优选管理Controller
* Created by macro on 2018/6/1.
*/
@Controller
@Api
(
tags
=
"CmsPrefrenceAreaController"
,
description
=
"商品优选管理"
)
@RequestMapping
(
"/prefrenceArea"
)
public
class
CmsPrefrenceAreaController
{
@Autowired
private
CmsPrefrenceAreaService
prefrenceAreaService
;
@ApiOperation
(
"获取所有商品优选"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Object
listAll
()
{
List
<
CmsPrefrenceArea
>
prefrenceAreaList
=
prefrenceAreaService
.
listAll
();
return
new
CommonResult
().
success
(
prefrenceAreaList
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java
0 → 100644
View file @
a4d72125
package
com.macro.mall.controller
;
import
com.macro.mall.dto.CommonResult
;
import
com.macro.mall.model.CmsSubject
;
import
com.macro.mall.service.CmsSubjectService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
/**
* 商品专题Controller
* Created by macro on 2018/6/1.
*/
@Controller
@Api
(
tags
=
"CmsSubjectController"
,
description
=
"商品专题管理"
)
@RequestMapping
(
"/subject"
)
public
class
CmsSubjectController
{
@Autowired
private
CmsSubjectService
subjectService
;
@ApiOperation
(
"获取全部商品专题"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Object
listAll
()
{
List
<
CmsSubject
>
subjectList
=
subjectService
.
listAll
();
return
new
CommonResult
().
success
(
subjectList
);
}
}
mall-admin/src/main/java/com/macro/mall/service/CmsPrefrenceAreaService.java
0 → 100644
View file @
a4d72125
package
com.macro.mall.service
;
import
com.macro.mall.model.CmsPrefrenceArea
;
import
java.util.List
;
/**
* 优选专区Service
* Created by macro on 2018/6/1.
*/
public
interface
CmsPrefrenceAreaService
{
List
<
CmsPrefrenceArea
>
listAll
();
}
mall-admin/src/main/java/com/macro/mall/service/CmsSubjectService.java
0 → 100644
View file @
a4d72125
package
com.macro.mall.service
;
import
com.macro.mall.model.CmsSubject
;
import
java.util.List
;
/**
* 商品专题Service
* Created by macro on 2018/6/1.
*/
public
interface
CmsSubjectService
{
List
<
CmsSubject
>
listAll
();
}
mall-admin/src/main/java/com/macro/mall/service/impl/CmsPrefrenceAreaServiceImpl.java
0 → 100644
View file @
a4d72125
package
com.macro.mall.service.impl
;
import
com.macro.mall.mapper.CmsPrefrenceAreaMapper
;
import
com.macro.mall.model.CmsPrefrenceArea
;
import
com.macro.mall.model.CmsPrefrenceAreaExample
;
import
com.macro.mall.service.CmsPrefrenceAreaService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* 商品优选Service实现类
* Created by macro on 2018/6/1.
*/
@Service
public
class
CmsPrefrenceAreaServiceImpl
implements
CmsPrefrenceAreaService
{
@Autowired
private
CmsPrefrenceAreaMapper
prefrenceAreaMapper
;
@Override
public
List
<
CmsPrefrenceArea
>
listAll
()
{
return
prefrenceAreaMapper
.
selectByExample
(
new
CmsPrefrenceAreaExample
());
}
}
mall-admin/src/main/java/com/macro/mall/service/impl/CmsSubjectServiceImpl.java
0 → 100644
View file @
a4d72125
package
com.macro.mall.service.impl
;
import
com.macro.mall.mapper.CmsSubjectMapper
;
import
com.macro.mall.model.CmsSubject
;
import
com.macro.mall.model.CmsSubjectExample
;
import
com.macro.mall.service.CmsSubjectService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* 商品专题Service实现类
* Created by macro on 2018/6/1.
*/
@Service
public
class
CmsSubjectServiceImpl
implements
CmsSubjectService
{
@Autowired
private
CmsSubjectMapper
subjectMapper
;
@Override
public
List
<
CmsSubject
>
listAll
()
{
return
subjectMapper
.
selectByExample
(
new
CmsSubjectExample
());
}
}
Write
Preview
Supports
Markdown
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