Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
ae300919
Commit
ae300919
authored
Oct 17, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
deecf637
65c90f03
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
219 additions
and
30 deletions
+219
-30
AppUserPositionTempBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
+14
-2
OrderMsgBiz.java
...n/java/com/xxfc/platform/order/biz/inner/OrderMsgBiz.java
+6
-2
AbstractOrderHandle.java
.../com/xxfc/platform/order/service/AbstractOrderHandle.java
+6
-1
WebsiteTourType.java
.../java/com/xxfc/platform/tour/comstnt/WebsiteTourType.java
+21
-0
WebsiteQuery.java
...main/java/com/xxfc/platform/tour/entity/WebsiteQuery.java
+12
-0
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+53
-1
TourGoodMapper.java
...in/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
+5
-0
OfficialWebsiteTourController.java
...r/rest/officialWebsite/OfficialWebsiteTourController.java
+34
-0
application.yml
xx-tour/xx-tour-server/src/main/resources/application.yml
+1
-1
TourGoodMapper.xml
...-tour-server/src/main/resources/mapper/TourGoodMapper.xml
+62
-19
ArticleBiz.java
.../src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
+2
-2
ArticleController.java
...n/java/com/xxfc/platform/uccn/rest/ArticleController.java
+3
-2
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
View file @
ae300919
...
...
@@ -66,6 +66,16 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
||
appUserPositionTempDTO
.
getPositionId
()
==
null
||
appUserPositionTempDTO
.
getPositionId
()
==
0
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"参数不能为空"
);
}
Integer
companyId
=
appUserPositionTempDTO
.
getCompanyId
();
String
companyName
=
appUserPositionTempDTO
.
getCompanyName
();
if
(!(
companyId
!=
null
&&
companyId
>
0
&&
StringUtils
.
isNotBlank
(
companyName
)))
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"分公司不存在"
);
BranchCompany
branchCompany
=
vehicleFeign
.
companyId
(
companyName
);
if
(
branchCompany
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"分公司不存在"
);
}
companyId
=
branchCompany
.
getId
();
companyName
=
branchCompany
.
getName
();
String
phone
=
appUserPositionTempDTO
.
getPhone
();
Integer
id
=
appUserPositionTempDTO
.
getId
()
==
null
?
0
:
appUserPositionTempDTO
.
getId
();
Example
example
=
new
Example
(
AppUserPositionTemp
.
class
);
...
...
@@ -82,6 +92,8 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
AppUserPositionTemp
userPositionTemp
=
new
AppUserPositionTemp
();
BeanUtils
.
copyProperties
(
appUserPositionTempDTO
,
userPositionTemp
);
userPositionTemp
.
setUserId
(
userId
);
userPositionTemp
.
setCompanyId
(
companyId
);
userPositionTemp
.
setCompanyName
(
companyName
);
//编辑
if
(
id
==
null
||
id
==
0
)
{
insertSelective
(
userPositionTemp
);
...
...
@@ -117,10 +129,10 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
}
if
(
Objects
.
nonNull
(
appUserPositionTempFindDTO
.
getStatus
()))
{
if
(
DataStatus
.
USERED
.
code
==
appUserPositionTempFindDTO
.
getStatus
())
{
criteria
.
and
IsNotNull
(
"userId"
);
criteria
.
and
NotEqualTo
(
"userId"
,
0
);
}
if
(
DataStatus
.
NO_USERED
.
code
==
appUserPositionTempFindDTO
.
getStatus
())
{
criteria
.
and
IsNull
(
"userId"
);
criteria
.
and
EqualTo
(
"userId"
,
0
);
}
}
example
.
setOrderByClause
(
"upd_time desc"
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderMsgBiz.java
View file @
ae300919
...
...
@@ -283,9 +283,11 @@ public class OrderMsgBiz {
if
(
null
!=
orvd
.
getEndCompanyId
()
&&
!
SYS_FALSE
.
equals
(
orvd
.
getEndCompanyId
()))
{
//新的账单 记录 OUT_ORDER_FUND 返回订单款取消订单
//查询 201, "取消订单退款" 并且状态为真
OrderAccount
orderAccount
=
orderAccountBiz
.
selectOne
(
new
OrderAccount
(){{
setOrderId
(
baseOrder
.
getId
());
setAccountType
(
AccountTypeEnum
.
OUT_ORDER_FUND
.
getCode
());
setAccountStatus
(
SYS_TRUE
);
}});
if
(
BigDecimal
.
ZERO
.
equals
(
orderAccount
.
getDeductAmount
()))
{
...
...
@@ -311,8 +313,6 @@ public class OrderMsgBiz {
sms2RefundAppUser
(
BigDecimal
.
ZERO
,
orderAccount
.
getDeductAmount
(),
orderAccount
.
getAccountAmount
(),
BigDecimal
.
ZERO
,
baseOrder
,
appUserDTO
,
smstype
,
smsParams
);
}
//后台发送消息(出车人)
smsParams
.
clear
();
sms2BgUser
(
startCompanyDetail
.
getVehiceServicePhone
(),
startCompanyDetail
,
endCompanyDetail
,
orvd
,
otd
,
baseOrder
,
appUserDTO
,
SmsTemplateDTO
.
CANCEL_E
,
smsParams
);
...
...
@@ -422,9 +422,11 @@ public class OrderMsgBiz {
OrderAccount
orderAccount
;
if
(
RefundStatusEnum
.
RESIDUE_ILLEGAL
.
getCode
().
equals
(
baseOrder
.
getRefundStatus
()))
{
smstype
=
SmsTemplateDTO
.
REFUND_A
;
//查询 203, "部分押金(扣除该扣除的 + 保留违章预备金)" 并且状态为真
orderAccount
=
orderAccountBiz
.
selectOne
(
new
OrderAccount
(){{
setOrderId
(
baseOrder
.
getId
());
setAccountType
(
AccountTypeEnum
.
OUT_PART_DEPOSIT
.
getCode
());
setAccountStatus
(
SYS_TRUE
);
}});
OrderAccountDetail
oad
=
JSONUtil
.
toBean
(
orderAccount
.
getAccountDetail
(),
OrderAccountDetail
.
class
);
...
...
@@ -447,9 +449,11 @@ public class OrderMsgBiz {
residueAmount
=
orvd
.
getReturnPayResidue
();
}
else
if
(
RefundStatusEnum
.
REFUND_DEPOSIT
.
getCode
().
equals
(
baseOrder
.
getRefundStatus
())){
smstype
=
SmsTemplateDTO
.
REFUND_B
;
//查询 204, "剩余押金(扣除该扣除的)" 并且状态为真
orderAccount
=
orderAccountBiz
.
selectOne
(
new
OrderAccount
(){{
setOrderId
(
baseOrder
.
getId
());
setAccountType
(
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
.
getCode
());
setAccountStatus
(
SYS_TRUE
);
}});
originalAmount
=
orderAccount
.
getOriginalAmount
();
violateAmount
=
orderAccount
.
getDeductAmount
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/AbstractOrderHandle.java
View file @
ae300919
...
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.order.service;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
...
...
@@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -75,7 +77,10 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
//根据facilitatePhone 查询后台管理系统人员 未完成
if
(
StrUtil
.
isNotBlank
(
facilitatePhone
))
{
baseOrder
.
setFacilitatePhone
(
facilitatePhone
);
userFeign
.
getOne
(
facilitatePhone
,
null
);
List
<
AppUserLogin
>
appUserDTOList
=
userFeign
.
getOne
(
facilitatePhone
,
null
);
if
(
null
!=
appUserDTOList
&&
appUserDTOList
.
size
()
>
0
)
{
baseOrder
.
setFacilitateId
(
appUserDTOList
.
get
(
0
).
getId
());
}
}
//设置订单号
...
...
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/comstnt/WebsiteTourType.java
0 → 100644
View file @
ae300919
package
com
.
xxfc
.
platform
.
tour
.
comstnt
;
public
enum
WebsiteTourType
{
POPULAR
(
1
,
"热门路线"
),
CHARACTERISTIC
(
2
,
"特色旅游"
),
NEW
(
3
,
"新开辟路线"
),
RECOMMEND
(
4
,
"推荐路线"
);
private
Integer
code
;
private
String
msg
;
WebsiteTourType
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getMsg
()
{
return
msg
;
}
}
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/entity/WebsiteQuery.java
0 → 100644
View file @
ae300919
package
com
.
xxfc
.
platform
.
tour
.
entity
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
WebsiteQuery
{
private
Integer
limit
=
6
;
private
Integer
type
=
1
;
private
List
<
Integer
>
tagIds
;
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
ae300919
...
...
@@ -13,6 +13,7 @@ import com.github.wxiaoqi.security.common.util.RandomUtil;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.tour.dto.*
;
import
com.xxfc.platform.tour.entity.*
;
import
com.xxfc.platform.tour.mapper.*
;
...
...
@@ -20,8 +21,12 @@ import com.xxfc.platform.tour.vo.TourGoodVo;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
java.lang.reflect.InvocationTargetException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -38,6 +43,11 @@ import java.util.*;
@Slf4j
public
class
TourGoodBiz
extends
BaseBiz
<
TourGoodMapper
,
TourGood
>
{
@Value
(
"${officialWebsite.popular}"
)
private
String
popular
;
@Value
(
"${officialWebsite.characteristic}"
)
private
String
characteristic
;
@Autowired
private
TourGoodBannerBiz
bannerBiz
;
@Autowired
...
...
@@ -322,7 +332,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
*/
public
List
<
GoodDataVO
>
getAllByHome
(
Integer
page
,
Integer
limit
){
return
mapper
.
findAllByHome
((
page
-
1
)*
limit
,
limit
);
}
;
}
/**
* 获取指定数量的随机旅游路线
...
...
@@ -345,6 +355,48 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
}
return
ObjectRestResponse
.
succ
(
resultList
);
}
public
List
homePageTour
(
WebsiteQuery
query
)
{
if
(
Objects
.
isNull
(
query
))
{
return
new
ArrayList
();
}
setQueryTagIds
(
query
);
List
<
TourGood
>
list
=
mapper
.
getList
(
query
);
return
CollectionUtils
.
isNotEmpty
(
list
)?
list:
new
ArrayList
<>();
}
private
void
setQueryTagIds
(
WebsiteQuery
query
)
{
if
(
CollectionUtils
.
isEmpty
(
query
.
getTagIds
()))
{
List
<
Integer
>
list
=
new
ArrayList
<>();
Integer
type
=
query
.
getType
();
if
(
type
==
1
)
{
if
(
StringUtils
.
isNotBlank
(
popular
))
{
String
[]
popularIds
=
popular
.
split
(
","
);
for
(
String
id
:
popularIds
)
{
list
.
add
(
Integer
.
parseInt
(
id
));
}
}
}
if
(
type
==
2
)
{
if
(
StringUtils
.
isNotBlank
(
characteristic
))
{
String
[]
characteristicIds
=
characteristic
.
split
(
","
);
for
(
String
id
:
characteristicIds
)
{
list
.
add
(
Integer
.
parseInt
(
id
));
}
}
}
query
.
setTagIds
(
list
);
}
}
public
List
newTour
(
Integer
limit
)
{
List
list
=
mapper
.
newTour
(
limit
);
return
CollectionUtils
.
isNotEmpty
(
list
)?
list:
new
ArrayList
<>();
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
View file @
ae300919
...
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.tour.mapper;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.xxfc.platform.tour.dto.GoodSearchDTO
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.entity.WebsiteQuery
;
import
com.xxfc.platform.tour.vo.TourGoodVo
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.Mapper
;
...
...
@@ -36,4 +37,8 @@ public interface TourGoodMapper extends Mapper<TourGood> {
* @return
*/
List
<
GoodDataVO
>
findAllByHome
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"size"
)
Integer
size
);
List
<
TourGood
>
getList
(
WebsiteQuery
query
);
List
newTour
(
Integer
limit
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/officialWebsite/OfficialWebsiteTourController.java
0 → 100644
View file @
ae300919
package
com
.
xxfc
.
platform
.
tour
.
rest
.
officialWebsite
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.tour.biz.TourGoodBiz
;
import
com.xxfc.platform.tour.comstnt.WebsiteTourType
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.entity.WebsiteQuery
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.*
;
@RestController
@RequestMapping
(
"website"
)
@IgnoreClientToken
@IgnoreUserToken
@Api
(
tags
=
{
"官网"
})
public
class
OfficialWebsiteTourController
extends
BaseController
<
TourGoodBiz
,
TourGood
>
{
@PostMapping
(
"/app/unauth/tour"
)
public
ObjectRestResponse
homePageTour
(
@RequestBody
WebsiteQuery
query
)
throws
Exception
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
homePageTour
(
query
));
}
@GetMapping
(
"/app/unauth/tour/new"
)
public
ObjectRestResponse
newTour
(
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"6"
)
Integer
limit
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
newTour
(
limit
));
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/resources/application.yml
View file @
ae300919
...
...
@@ -4,4 +4,4 @@ logging:
com.github.wxiaoqi
:
debug
com.xxfc.platform
:
debug
\ No newline at end of file
debug
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodMapper.xml
View file @
ae300919
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.xxfc.platform.tour.mapper.TourGoodMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.xxfc.platform.tour.entity.TourGood"
id=
"tourGoodMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
...
...
@@ -53,26 +53,28 @@
<!--查询旅游路线列表-->
<select
id=
"getCoordinateList"
parameterType=
"java.util.Map"
resultMap=
"tourGoodMap"
>
SELECT t.* from tour_good t
left join (
select good_id,
IFNULL(ROUND(( (2 * ASIN( SQRT( POW( SIN((latitude * PI() / 180.0- #{params.latitude}* PI() / 180.0)/2), 2)+COS( latitude * PI() / 180.0)*COS( #{params.latitude} * PI() / 180.0)
*POW(SIN((longitude * PI() / 180.0 - #{params.longitude}* PI() /180.0)/2),2))))*6378.137)*10000)/10000 ,0 ) AS distance
FROM tour_good_site WHERE type=2 ) gs ON t.id=gs.good_id
where t.is_del=0 AND t.status=1
SELECT t.* from tour_good t
left join (
select good_id,
IFNULL(ROUND(( (2 * ASIN( SQRT( POW( SIN((latitude * PI() / 180.0- #{params.latitude}* PI() / 180.0)/2), 2)+COS(
latitude * PI() / 180.0)*COS( #{params.latitude} * PI() / 180.0)
*POW(SIN((longitude * PI() / 180.0 - #{params.longitude}* PI() /180.0)/2),2))))*6378.137)*10000)/10000 ,0 ) AS
distance
FROM tour_good_site WHERE type=2 ) gs ON t.id=gs.good_id
where t.is_del=0 AND t.status=1
<if
test=
"params.distance != null and params.distance != ''and params.distance >0"
>
and
gs.distance
<
#{params.distance}
and gs.distance
<
#{params.distance}
</if>
<if
test=
"params.query != null and params.query != ''"
>
and (t.`name` like CONCAT('%',#{params.query},'%') or t.introduce like CONCAT('%',#{params.query},'%'))
</if>
order
by gs.distance
order
by gs.distance
</select>
<!--查询旅游路线列表-->
<select
id=
"getGoodList"
parameterType=
"java.util.Map"
resultMap=
"tourGoodMap"
>
SELECT * from tour_good t
where
t.is_del=0 AND
t.status=1
where
t.is_del=0 AND
t.status=1
<if
test=
"params.query != null and params.query != ''"
>
and (t.`name` like CONCAT('%',#{params.query},'%') or t.introduce like CONCAT('%',#{params.query},'%'))
</if>
...
...
@@ -103,22 +105,63 @@
<!--后台查询旅游路线列表-->
<select
id=
"findGoodList"
resultMap=
"tourGoodVoMap"
>
SELECT g.*,REPLACE(GROUP_CONCAT( DISTINCT t.`name`),',','|')as tagNames
from tour_good g
SELECT g.*,REPLACE(GROUP_CONCAT( DISTINCT t.`name`),',','|')as tagNames from tour_good g
LEFT JOIN (SELECT * FROM tour_good_tag WHERE is_del=0) tag ON g.id=tag.good_id
LEFT JOIN (SELECT * FROM tour_tag WHERE is_del=0) t ON tag.tag_id=t.id
<where>
g.is_del=0
<if
test=
"params.name != null and params.name != ''"
>
and (g.`name` like CONCAT('%',#{params.name},'%') or g.introduce like CONCAT('%',#{params.name},'%'))
</if>
<if
test=
"params.tagId != null and params.tagId != '' "
>
and g.id in (SELECT good_id from tour_good_tag
where tag_id = #{params.tagId} and is_del=0 )
</if>
<if
test=
"params.name != null and params.name != ''"
>
and (g.`name` like CONCAT('%',#{params.name},'%') or g.introduce like CONCAT('%',#{params.name},'%'))
</if>
<if
test=
"params.tagId != null and params.tagId != '' "
>
and g.id in (SELECT good_id from tour_good_tag
where tag_id = #{params.tagId} and is_del=0 )
</if>
</where>
GROUP BY g.id
ORDER BY g.rank DESC ,g.id DESC
</select>
<select
id=
"getList"
resultType=
"com.github.wxiaoqi.security.common.vo.GoodDataVO"
>
SELECT
g.id AS `id`,
g. NAME AS `name`,
g.cover AS `imgUrl`,
g.price
FROM
tour_good g,
tour_good_tag t
WHERE
g.id = t.good_id
AND g.is_del = 0
AND t.is_del = 0
AND g.status = 1
AND t.tag_id IN
<foreach
collection=
"tagIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
GROUP BY g.id
ORDER BY
g.rank ASC,
g.crt_time DESC
LIMIT #{limit}
</select>
<select
id=
"newTour"
resultType=
"com.github.wxiaoqi.security.common.vo.GoodDataVO"
>
SELECT
id,
name,
cover AS imgUrl,
price
FROM
tour_good
WHERE
is_del = 0
AND
status = 1
ORDER BY
crt_time DESC
LIMIT #{limit}
</select>
</mapper>
\ No newline at end of file
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
View file @
ae300919
...
...
@@ -107,8 +107,8 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
* @param type
* @return
*/
public
List
getHomePageArticle
(
Integer
type
)
{
List
<
Article
>
articleList
=
mapper
.
getArticleList
(
type
,
HOME_PAGE_NUMBER
,
null
,
null
);
public
List
getHomePageArticle
(
Integer
type
,
Integer
limit
)
{
List
<
Article
>
articleList
=
mapper
.
getArticleList
(
type
,
limit
,
null
,
null
);
// if (Objects.isNull(articleList)) {
// return new ArrayList();
// } else {
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/ArticleController.java
View file @
ae300919
...
...
@@ -55,8 +55,9 @@ public class ArticleController extends BaseController<ArticleBiz, Article> {
@GetMapping
(
"/app/unauth/homePage/{type}"
)
@ApiOperation
(
value
=
"获取首页文章列表"
)
public
ObjectRestResponse
getHomePageArticle
(
@PathVariable
Integer
type
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
getHomePageArticle
(
type
));
public
ObjectRestResponse
getHomePageArticle
(
@PathVariable
Integer
type
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"9"
)
Integer
limit
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
getHomePageArticle
(
type
,
limit
));
}
@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