记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
9ea32b04
Commit
9ea32b04
authored
Dec 28, 2021
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
金刚位增删改查的搭建
parent
eabdb68e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
272 additions
and
104 deletions
+272
-104
GoblinFrontNavigationController.java
...ller/zhengzai/goblin/GoblinFrontNavigationController.java
+105
-0
IGoblinFrontNavigationService.java
...hengzai/goblin/service/IGoblinFrontNavigationService.java
+17
-0
GoblinFrontNavigationServiceImpl.java
.../goblin/service/imp/GoblinFrontNavigationServiceImpl.java
+38
-0
GoblinFrontNavigation.java
...iquidnet/service/goblin/entity/GoblinFrontNavigation.java
+96
-88
GoblinFrontNavigationMapper.java
...et/service/goblin/mapper/GoblinFrontNavigationMapper.java
+16
-16
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinFrontNavigationController.java
0 → 100644
View file @
9ea32b04
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
goblin
;
import
com.alibaba.fastjson.JSON
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.imp.GoblinFrontNavigationServiceImpl
;
import
com.liquidnet.service.goblin.entity.GoblinFrontBanner
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 首页导航栏
前端控制器
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Api
(
tags
=
"金刚位管理"
)
@RestController
@RequestMapping
(
"/navigation"
)
public
class
GoblinFrontNavigationController
extends
BaseController
{
@Autowired
GoblinFrontNavigationServiceImpl
goblinFrontNavigationService
;
/***
* @author zhangfuxin
* @Description: 添加金刚位
* @date 2021/12/28 上午11:22
*/
@PostMapping
(
"create"
)
@ApiOperation
(
value
=
"增加金刚位"
)
@ResponseBody
public
AjaxResult
create
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"增加金刚位{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
boolean
result
=
goblinFrontNavigationService
.
create
(
goblinFrontNavigation
);
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
/**
* @author zhangfuxin
* @Description:修改金刚位
* @date 2021/12/28 上午11:23
*/
@PostMapping
(
"update"
)
@ApiOperation
(
value
=
"修改金刚位"
)
@ResponseBody
public
AjaxResult
update
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"修改金刚位{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
boolean
result
=
goblinFrontNavigationService
.
update
(
goblinFrontNavigation
);
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
/**
* 删除金刚位
*/
@PostMapping
(
"delete"
)
@ApiOperation
(
value
=
"删除金刚位"
)
@ResponseBody
public
AjaxResult
delete
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"删除金刚位{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
boolean
result
=
goblinFrontNavigationService
.
delte
(
goblinFrontNavigation
.
getMid
());
if
(
result
)
{
return
success
(
"操作成功"
);
}
else
{
return
error
(
"操作失败"
);
}
}
/**
* 分页金刚位
*/
@PostMapping
(
"page"
)
@ApiOperation
(
value
=
"分页"
)
@ResponseBody
public
AjaxResult
page
(
@RequestParam
(
name
=
"pageSize"
,
required
=
true
)
int
pageSize
,
@RequestParam
(
name
=
"pageNumber"
,
required
=
true
)
int
pageNumber
,
@RequestBody
GoblinFrontBanner
goblinFrontBanner
)
{
logger
.
info
(
"分页banner{}"
,
JSON
.
toJSONString
(
goblinFrontBanner
));
return
AjaxResult
.
success
(
goblinFrontNavigationService
.
page
(
pageSize
,
pageNumber
,
null
));
}
/**
* @author zhangfuxin
* @Description:查看金刚位
* @date 2021/12/28 上午11:24
*/
@PostMapping
(
"getOne"
)
@ApiOperation
(
value
=
"查看金刚位"
)
@ResponseBody
public
AjaxResult
getOne
(
@RequestBody
GoblinFrontNavigation
goblinFrontNavigation
)
{
logger
.
info
(
"修改banner{}"
,
JSON
.
toJSONString
(
goblinFrontNavigation
));
goblinFrontNavigation
=
goblinFrontNavigationService
.
getOne
(
goblinFrontNavigation
.
getMid
());
return
AjaxResult
.
success
(
goblinFrontNavigation
);
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/IGoblinFrontNavigationService.java
0 → 100644
View file @
9ea32b04
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 首页导航栏
服务类
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
public
interface
IGoblinFrontNavigationService
extends
IService
<
GoblinFrontNavigation
>
{
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/imp/GoblinFrontNavigationServiceImpl.java
0 → 100644
View file @
9ea32b04
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
imp
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontNavigationService
;
import
com.liquidnet.service.goblin.entity.GoblinFrontBanner
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.liquidnet.service.goblin.mapper.GoblinFrontNavigationMapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 首页导航栏
服务实现类
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Service
public
class
GoblinFrontNavigationServiceImpl
extends
ServiceImpl
<
GoblinFrontNavigationMapper
,
GoblinFrontNavigation
>
implements
IGoblinFrontNavigationService
{
public
boolean
create
(
GoblinFrontNavigation
goblinFrontBanner
){
return
true
;
}
public
boolean
update
(
GoblinFrontNavigation
goblinFrontBanner
){
return
true
;
}
public
GoblinFrontNavigation
getOne
(
Long
id
){
return
null
;
}
public
boolean
delte
(
Long
id
){
return
true
;
}
public
PageInfo
<
GoblinFrontNavigation
>
page
(
int
pageSize
,
int
pageNumber
,
GoblinFrontNavigation
goblinFrontNavigation
)
{
return
null
;
}
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/entity/GoblinFrontNavigation.java
View file @
9ea32b04
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
package
com
.
liquidnet
.
service
.
goblin
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 首页导航栏
* </p>
*
* @author liquidnet
* @since 2021-12-27
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinFrontNavigation
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
mid
;
/**
* 图片路径或id
*/
private
String
picUrl
;
/**
* 标题
*/
private
String
title
;
/**
* 商品id
*/
private
String
spuId
;
/**
* 展示形式:1、一行2、二行
*/
private
Integer
displayType
;
/**
* 分类
*/
private
String
categoryType
;
/**
* 活动链接
*/
private
String
activityUrl
;
/**
* 1、分类2、专题3、商品单品
*/
private
Integer
navigationType
;
/**
* 顺序
*/
private
Integer
indexs
;
/**
* 创建时间
*/
private
LocalDateTime
createTime
;
/**
* 修改时间
*/
private
LocalDateTime
updateTime
;
/**
* 导航id
*/
private
String
navigationId
;
/**
* 0未删除1已删除
*/
private
Integer
delTag
;
}
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
GoblinFrontNavigation
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* 图片路径或id
*/
private
String
picUrl
;
/**
* 标题
*/
private
String
title
;
/**
* 商品id
*/
private
String
spuId
;
/**
* 展示形式:1、一行2、二行
*/
private
Integer
displayType
;
/**
* 分类
*/
private
String
categoryType
;
/**
* 活动链接
*/
private
String
activityUrl
;
/**
* 1、分类2、专题3、商品单品
*/
private
Integer
navigationType
;
/**
* 顺序
*/
private
Integer
indexs
;
/**
* 创建时间
*/
private
LocalDateTime
createTime
;
/**
* 修改时间
*/
private
LocalDateTime
updateTime
;
/**
* 导航id
*/
private
String
navigationId
;
/**
* 0未删除1已删除
*/
private
Integer
delTag
;
/**
* 商品名字
*/
private
String
spuName
;
}
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/java/com/liquidnet/service/goblin/mapper/GoblinFrontNavigationMapper.java
View file @
9ea32b04
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
package
com
.
liquidnet
.
service
.
goblin
.
mapper
;
import
com.liquidnet.service.goblin.entity.GoblinFrontNavigation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 首页导航栏
Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-12-2
7
*/
public
interface
GoblinFrontNavigationMapper
extends
BaseMapper
<
GoblinFrontNavigation
>
{
}
Mapper 接口
* </p>
*
* @author liquidnet
* @since 2021-12-2
8
*/
public
interface
GoblinFrontNavigationMapper
extends
BaseMapper
<
GoblinFrontNavigation
>
{
}
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