Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
cfld-region-outline
Project
Project
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
cfld-backend
cfld-region-outline
Commits
0aab1d8c
Commit
0aab1d8c
authored
Dec 28, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
都市圈添加雪花id
parent
45082688
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
12 deletions
+25
-12
MegalopolisInfoListVO.java
src/main/java/com/lyy/admin/VO/MegalopolisInfoListVO.java
+6
-0
MegalopolisInfoController.java
...controller/megalopolisinfo/MegalopolisInfoController.java
+7
-4
MegalopolisInfo.java
...com/lyy/admin/domain/megalopolisinfo/MegalopolisInfo.java
+2
-1
MegalopolisInfoService.java
...admin/service/megalopolisinfo/MegalopolisInfoService.java
+1
-1
MegalopolisInfoServiceImpl.java
...vice/megalopolisinfo/impl/MegalopolisInfoServiceImpl.java
+9
-6
No files found.
src/main/java/com/lyy/admin/VO/MegalopolisInfoListVO.java
View file @
0aab1d8c
package
com
.
lyy
.
admin
.
VO
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -17,6 +19,10 @@ public class MegalopolisInfoListVO implements Serializable {
@ApiModelProperty
(
value
=
"主键id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"业务id"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
businessId
;
/**
* 都市圈名称
*/
...
...
src/main/java/com/lyy/admin/controller/megalopolisinfo/MegalopolisInfoController.java
View file @
0aab1d8c
...
...
@@ -2,6 +2,7 @@ package com.lyy.admin.controller.megalopolisinfo;
import
com.github.pagehelper.PageInfo
;
import
com.lyy.admin.common.anno.Cache
;
import
com.lyy.admin.common.anno.EncryptBusiness
;
import
com.lyy.admin.common.page.TableDataInfo
;
import
com.lyy.admin.common.utils.PageUtils
;
import
com.lyy.admin.controller.BaseController
;
...
...
@@ -40,6 +41,7 @@ public class MegalopolisInfoController extends BaseController {
@ApiImplicitParam
(
name
=
"orderByColumn"
,
value
=
"排序字段(可为空,传类属性)"
,
type
=
"String"
),
@ApiImplicitParam
(
name
=
"isAsc"
,
value
=
"排序字段(可为空,请传asc或者desc)"
,
type
=
"String"
)
})
// @EncryptBusiness
public
TableDataInfo
list
(
MegalopolisInfoParam
megalopolisInfoParam
)
{
boolean
login
=
isLogin
();
startPage
();
...
...
@@ -60,12 +62,13 @@ public class MegalopolisInfoController extends BaseController {
return
getDataTable
(
parkInfoListVOs
,
new
PageInfo
(
megalopolisInfos
).
getTotal
());
}
// @Cache(cacheByUser = false,type = CacheType.LOCAL)
@GetMapping
(
"/get/{
i
d}"
)
@GetMapping
(
"/get/{
businessI
d}"
)
@ResponseBody
@ApiOperation
(
value
=
"某个都市圈信息"
,
notes
=
"rest风格传参,将参数拼接在url上"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"都市圈id"
,
type
=
"Integer"
)
public
MegalopolisInfoAllVO
get
(
@PathVariable
Integer
id
)
{
return
MegalopolisInfoSerivce
.
getMegalopolisInfo
(
id
,
getUserInfo
().
getUserId
(),
getUserInfo
().
getIsMembership
());
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"都市圈id"
,
type
=
"Long"
)
// @EncryptBusiness
public
MegalopolisInfoAllVO
get
(
@PathVariable
Long
businessId
)
{
return
MegalopolisInfoSerivce
.
getMegalopolisInfo
(
businessId
,
getUserInfo
().
getUserId
(),
getUserInfo
().
getIsMembership
());
}
}
src/main/java/com/lyy/admin/domain/megalopolisinfo/MegalopolisInfo.java
View file @
0aab1d8c
...
...
@@ -3,6 +3,7 @@ package com.lyy.admin.domain.megalopolisinfo;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.lyy.admin.common.constant.BaseEntity
;
import
lombok.Data
;
import
java.io.Serializable
;
...
...
@@ -14,7 +15,7 @@ import java.math.BigDecimal;
*/
@TableName
(
value
=
"megalopolis_info"
)
@Data
public
class
MegalopolisInfo
implements
Serializable
{
public
class
MegalopolisInfo
extends
BaseEntity
implements
Serializable
{
/**
* 主键id
*/
...
...
src/main/java/com/lyy/admin/service/megalopolisinfo/MegalopolisInfoService.java
View file @
0aab1d8c
...
...
@@ -20,7 +20,7 @@ public interface MegalopolisInfoService extends IService<MegalopolisInfo> {
public
List
<
MegalopolisInfo
>
selectMegalopolisInfoVOList
(
MegalopolisInfoParam
megalopolisInfoParam
);
public
MegalopolisInfoAllVO
getMegalopolisInfo
(
Integer
i
d
,
Integer
userId
,
Boolean
isMembership
);
public
MegalopolisInfoAllVO
getMegalopolisInfo
(
Long
businessI
d
,
Integer
userId
,
Boolean
isMembership
);
public
List
<
MegalopolisInfoListVO
>
selectMegalopolisInfoCollectionList
(
MegalopolisInfoCollectionParam
megalopolisInfoParam
);
...
...
src/main/java/com/lyy/admin/service/megalopolisinfo/impl/MegalopolisInfoServiceImpl.java
View file @
0aab1d8c
...
...
@@ -46,8 +46,6 @@ import java.util.stream.Collectors;
public
class
MegalopolisInfoServiceImpl
extends
ServiceImpl
<
MegalopolisInfoMapper
,
MegalopolisInfo
>
implements
MegalopolisInfoService
{
@Autowired
MegalopolisInfoMapper
megalopolisInfoMapper
;
@Autowired
MegalopolisCityInfoMapper
megalopolisCityInfoMapper
;
...
...
@@ -110,18 +108,23 @@ public class MegalopolisInfoServiceImpl extends ServiceImpl<MegalopolisInfoMappe
}
megalopolisInfoQW
.
orderByAsc
(
"sequence"
);
List
<
MegalopolisInfo
>
megalopolisInfos
=
megalopolisInfoMapper
.
selectL
ist
(
megalopolisInfoQW
);
List
<
MegalopolisInfo
>
megalopolisInfos
=
this
.
l
ist
(
megalopolisInfoQW
);
return
megalopolisInfos
;
}
@Override
public
MegalopolisInfoAllVO
getMegalopolisInfo
(
Integer
i
d
,
Integer
userId
,
Boolean
isMembership
)
{
public
MegalopolisInfoAllVO
getMegalopolisInfo
(
Long
businessI
d
,
Integer
userId
,
Boolean
isMembership
)
{
//通过用户id获取会员信息
// boolean flag = sysMembershipInfoService.isMemberShip(userId);
boolean
flag
=
isMembership
;
MegalopolisInfoAllVO
megalopolisInfoAllVO
=
new
MegalopolisInfoAllVO
();
MegalopolisInfo
megalopolisInfo
=
megalopolisInfoMapper
.
selectById
(
id
);
LambdaQueryWrapper
<
MegalopolisInfo
>
MILambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
MILambdaQueryWrapper
.
eq
(
MegalopolisInfo:
:
getBusinessId
,
businessId
);
MegalopolisInfo
megalopolisInfo
=
this
.
getOne
(
MILambdaQueryWrapper
);
Integer
id
=
megalopolisInfo
.
getId
();
if
(
megalopolisInfo
==
null
)
{
throw
new
APIException
(
APIExceptionEnum
.
NOTEXISTS_EXCEPTION
);
}
...
...
@@ -215,7 +218,7 @@ public class MegalopolisInfoServiceImpl extends ServiceImpl<MegalopolisInfoMappe
}
public
List
<
MegalopolisInfoListVO
>
selectMegalopolisInfoCollectionList
(
MegalopolisInfoCollectionParam
megalopolisInfoParam
)
{
return
megalopolisInfo
Mapper
.
selectMegalopolisInfoCollectionList
(
megalopolisInfoParam
);
return
this
.
base
Mapper
.
selectMegalopolisInfoCollectionList
(
megalopolisInfoParam
);
}
@Override
...
...
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