From b49b0290f80d58896b5cd3c2d5493ebefa9ba04b Mon Sep 17 00:00:00 2001 From: fengtianyangyang <5411465+feng_tianyangyang@user.noreply.gitee.com> Date: Thu, 12 May 2022 15:30:53 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E5=A4=9A=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/StoreFlowServiceImpl.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java index 3a1e6c8b..dfe3e1af 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java @@ -76,18 +76,16 @@ public class StoreFlowServiceImpl extends ServiceImpl orderItems = orderItemService.getByOrderSn(orderSn); //根据订单编号获取订单数据 Order order = orderService.getBySn(orderSn); - //如果查询到多条支付记录,打印日志 - if (order.getPayStatus().equals(PayStatusEnum.PAID.name())) { - log.error("订单[{}]检测到重复付款,请处理", orderSn); - } - //获取订单促销类型,如果为促销订单则获取促销商品并获取结算价 String orderPromotionType = order.getOrderPromotionType(); + //循环子订单记录流水 for (OrderItem item : orderItems) { StoreFlow storeFlow = new StoreFlow(); BeanUtil.copyProperties(item, storeFlow); + //去掉orderitem的时间。 + storeFlow.setCreateTime(null); //入账 storeFlow.setId(SnowFlake.getIdStr()); storeFlow.setFlowType(FlowTypeEnum.PAY.name()); @@ -102,24 +100,28 @@ public class StoreFlowServiceImpl extends ServiceImpl Date: Fri, 13 May 2022 09:19:21 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E7=BB=99?= =?UTF-8?q?=E4=BA=880?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/impl/statistics/OnlineMemberStatistics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java b/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java index 8cffcd84..92b6b23f 100644 --- a/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java +++ b/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java @@ -56,7 +56,7 @@ public class OnlineMemberStatistics implements EveryHourExecute { Calendar finalCalendar = calendar; - AtomicReference lastNum = new AtomicReference<>(1); + AtomicReference lastNum = new AtomicReference<>(0); onlineMemberVOS = onlineMemberVOS.stream() .filter(onlineMemberVO -> { lastNum.set(onlineMemberVO.getNum()); From 57cf3b94e087dfd72c26a2b6b3c7a59468b4b730 Mon Sep 17 00:00:00 2001 From: Chopper Date: Fri, 13 May 2022 11:19:02 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E8=B6=B3=E8=BF=B9=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/FootprintController.java | 3 +- .../member/mapper/FootprintMapper.java | 11 ------ .../member/service/FootprintService.java | 3 +- .../serviceimpl/FootprintServiceImpl.java | 36 +++++++++++++------ 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/buyer-api/src/main/java/cn/lili/controller/member/FootprintController.java b/buyer-api/src/main/java/cn/lili/controller/member/FootprintController.java index 256603f9..e5de7c6b 100644 --- a/buyer-api/src/main/java/cn/lili/controller/member/FootprintController.java +++ b/buyer-api/src/main/java/cn/lili/controller/member/FootprintController.java @@ -5,6 +5,7 @@ import cn.lili.common.vo.PageVO; import cn.lili.common.vo.ResultMessage; import cn.lili.modules.member.service.FootprintService; import cn.lili.modules.search.entity.dos.EsGoodsIndex; +import com.baomidou.mybatisplus.core.metadata.IPage; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -34,7 +35,7 @@ public class FootprintController { @ApiOperation(value = "分页获取") @GetMapping - public ResultMessage> getByPage(PageVO page) { + public ResultMessage> getByPage(PageVO page) { return ResultUtil.data(footprintService.footPrintPage(page)); } diff --git a/framework/src/main/java/cn/lili/modules/member/mapper/FootprintMapper.java b/framework/src/main/java/cn/lili/modules/member/mapper/FootprintMapper.java index 6638d618..f65c731b 100644 --- a/framework/src/main/java/cn/lili/modules/member/mapper/FootprintMapper.java +++ b/framework/src/main/java/cn/lili/modules/member/mapper/FootprintMapper.java @@ -18,17 +18,6 @@ import java.util.List; * @since 2020-02-25 14:10:16 */ public interface FootprintMapper extends BaseMapper { - - /** - * 获取用户足迹的SkuId分页 - * - * @param page 分页 - * @param queryWrapper 查询条件 - * @return 用户足迹的SkuId分页 - */ - @Select("select sku_id from li_foot_print ${ew.customSqlSegment} ") - List footprintSkuIdList(IPage page, @Param(Constants.WRAPPER) Wrapper queryWrapper); - /** * 删除超过100条后的记录 * diff --git a/framework/src/main/java/cn/lili/modules/member/service/FootprintService.java b/framework/src/main/java/cn/lili/modules/member/service/FootprintService.java index fc5d8ca3..3005ce96 100644 --- a/framework/src/main/java/cn/lili/modules/member/service/FootprintService.java +++ b/framework/src/main/java/cn/lili/modules/member/service/FootprintService.java @@ -3,6 +3,7 @@ package cn.lili.modules.member.service; import cn.lili.common.vo.PageVO; import cn.lili.modules.member.entity.dos.FootPrint; import cn.lili.modules.search.entity.dos.EsGoodsIndex; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; @@ -44,7 +45,7 @@ public interface FootprintService extends IService { * @param pageVO 分页 * @return 会员浏览历史列表 */ - List footPrintPage(PageVO pageVO); + IPage footPrintPage(PageVO pageVO); /** * 获取当前会员的浏览记录数量 diff --git a/framework/src/main/java/cn/lili/modules/member/serviceimpl/FootprintServiceImpl.java b/framework/src/main/java/cn/lili/modules/member/serviceimpl/FootprintServiceImpl.java index 0fea8a25..d5b315b8 100644 --- a/framework/src/main/java/cn/lili/modules/member/serviceimpl/FootprintServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/member/serviceimpl/FootprintServiceImpl.java @@ -9,7 +9,9 @@ import cn.lili.modules.search.entity.dos.EsGoodsIndex; import cn.lili.modules.search.service.EsGoodsSearchService; import cn.lili.mybatis.util.PageUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,6 +21,7 @@ import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** * 会员浏览历史业务层实现 @@ -29,9 +32,7 @@ import java.util.Objects; @Service public class FootprintServiceImpl extends ServiceImpl implements FootprintService { - /** - * es商品业务层 - */ + @Autowired private EsGoodsSearchService esGoodsSearchService; @@ -74,20 +75,35 @@ public class FootprintServiceImpl extends ServiceImpl footPrintPage(PageVO pageVO) { + public IPage footPrintPage(PageVO pageVO) { LambdaQueryWrapper lambdaQueryWrapper = Wrappers.lambdaQuery(); lambdaQueryWrapper.eq(FootPrint::getMemberId, UserContext.getCurrentUser().getId()); lambdaQueryWrapper.eq(FootPrint::getDeleteFlag, false); - lambdaQueryWrapper.orderByDesc(FootPrint::getUpdateTime); - List skuIdList = this.baseMapper.footprintSkuIdList(PageUtil.initPage(pageVO), lambdaQueryWrapper); - if (!skuIdList.isEmpty()) { - List list = esGoodsSearchService.getEsGoodsBySkuIds(skuIdList); + lambdaQueryWrapper.orderByDesc(FootPrint::getCreateTime); + IPage footPrintPages = this.page(PageUtil.initPage(pageVO), lambdaQueryWrapper); + + + //定义结果 + IPage esGoodsIndexIPage = new Page(); + + if (footPrintPages.getRecords() == null || footPrintPages.getRecords().isEmpty()) { + return esGoodsIndexIPage; + } else { + List list = esGoodsSearchService.getEsGoodsBySkuIds( + footPrintPages.getRecords().stream().map(item -> { + return item.getSkuId(); + }).collect(Collectors.toList())); //去除为空的商品数据 list.removeIf(Objects::isNull); - return list; + + esGoodsIndexIPage.setPages(footPrintPages.getPages()); + esGoodsIndexIPage.setRecords(list); + esGoodsIndexIPage.setTotal(footPrintPages.getTotal()); + esGoodsIndexIPage.setSize(footPrintPages.getSize()); + esGoodsIndexIPage.setCurrent(footPrintPages.getCurrent()); + return esGoodsIndexIPage; } - return Collections.emptyList(); } @Override From 81f48d9c92f6573f0e8b9be6b936abee5c203ff8 Mon Sep 17 00:00:00 2001 From: Chopper Date: Fri, 13 May 2022 11:45:30 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E5=AF=B9=E4=B8=8A=E4=B8=80=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E7=9A=84=E5=8F=82=E6=95=B0=E8=B5=8B=E5=80=BC=E5=81=9A?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/impl/statistics/OnlineMemberStatistics.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java b/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java index 92b6b23f..1afdac4c 100644 --- a/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java +++ b/consumer/src/main/java/cn/lili/timetask/handler/impl/statistics/OnlineMemberStatistics.java @@ -59,7 +59,9 @@ public class OnlineMemberStatistics implements EveryHourExecute { AtomicReference lastNum = new AtomicReference<>(0); onlineMemberVOS = onlineMemberVOS.stream() .filter(onlineMemberVO -> { - lastNum.set(onlineMemberVO.getNum()); + if (onlineMemberVO.getDate().before(finalCalendar.getTime())) { + lastNum.set(onlineMemberVO.getNum()); + } return onlineMemberVO.getDate().after(finalCalendar.getTime()); }) .collect(Collectors.toList()); From 3dcff0b682325a93b0936762f7b85b526952d56c Mon Sep 17 00:00:00 2001 From: Chopper Date: Fri, 13 May 2022 17:42:36 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E4=BA=BA=E6=95=B0?= =?UTF-8?q?=E6=B5=81=E9=87=8F=E5=B1=95=E7=A4=BA=E5=B0=91=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=B0=8F=E6=97=B6=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/statistics/serviceimpl/PlatformViewServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/main/java/cn/lili/modules/statistics/serviceimpl/PlatformViewServiceImpl.java b/framework/src/main/java/cn/lili/modules/statistics/serviceimpl/PlatformViewServiceImpl.java index f1263659..5d824068 100644 --- a/framework/src/main/java/cn/lili/modules/statistics/serviceimpl/PlatformViewServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/statistics/serviceimpl/PlatformViewServiceImpl.java @@ -131,7 +131,7 @@ public class PlatformViewServiceImpl extends ServiceImpl Date: Wed, 18 May 2022 14:35:34 +0800 Subject: [PATCH 06/11] siteController --- .../controller/common/SiteController.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 common-api/src/main/java/cn/lili/controller/common/SiteController.java diff --git a/common-api/src/main/java/cn/lili/controller/common/SiteController.java b/common-api/src/main/java/cn/lili/controller/common/SiteController.java new file mode 100644 index 00000000..70b32328 --- /dev/null +++ b/common-api/src/main/java/cn/lili/controller/common/SiteController.java @@ -0,0 +1,33 @@ +package cn.lili.controller.common; + +import cn.lili.common.enums.ResultUtil; +import cn.lili.common.vo.ResultMessage; +import cn.lili.modules.system.entity.enums.SettingEnum; +import cn.lili.modules.system.service.SettingService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 滑块验证码接口 + * + * @author Chopper + * @since 2020/11/26 15:41 + */ +@Slf4j +@RestController +@RequestMapping("/common/common/site") +@Api(tags = "系统基础接口") +public class SiteController { + + @Autowired + private SettingService settingService; + + @ApiOperation(value = "获取系统基础信息") + @GetMapping + public ResultMessage getFileList() { + return ResultUtil.data(settingService.get(SettingEnum.BASE_SETTING.name())); + } +} From 87e13b36772cb64a575f65ba21894ae63376c0cb Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 18 May 2022 15:15:22 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kit/plugin/wechat/model/UnifiedOrderModel.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java index 25d5a3ca..1266aab7 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java @@ -1,5 +1,6 @@ package cn.lili.modules.payment.kit.plugin.wechat.model; +import cn.lili.common.utils.StringUtils; import lombok.Data; import lombok.experimental.Accessors; @@ -42,6 +43,7 @@ public class UnifiedOrderModel { * 商品描述 */ private String description; + /** * 商户订单号 */ @@ -82,6 +84,15 @@ public class UnifiedOrderModel { * 场景信息 */ private SceneInfo scene_info; + + + public String getDescription() { + if (!StringUtils.isEmpty(description) && description.length() > 30) { + return description.substring(30); + } + return description; + } + } From e3626a094def34f15214af9f1dde614f336b2731 Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 18 May 2022 16:48:03 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E8=BF=9B=E8=A1=8C=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/payment/kit/params/dto/CashierParam.java | 4 ++++ .../kit/plugin/wechat/model/UnifiedOrderModel.java | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java b/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java index 577cd13c..b28d7950 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java @@ -47,6 +47,10 @@ public class CashierParam { if (StringUtils.isEmpty(detail)) { return "清单详细"; } + //对参数长度进行限制 + if (!StringUtils.isEmpty(detail) && detail.length() > 30) { + detail = detail.substring(30); + } return StringUtils.filterSpecialChart(detail); } } diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java index 1266aab7..52aeff50 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/model/UnifiedOrderModel.java @@ -1,5 +1,6 @@ package cn.lili.modules.payment.kit.plugin.wechat.model; +import cn.hutool.json.JSONUtil; import cn.lili.common.utils.StringUtils; import lombok.Data; import lombok.experimental.Accessors; @@ -85,14 +86,6 @@ public class UnifiedOrderModel { */ private SceneInfo scene_info; - - public String getDescription() { - if (!StringUtils.isEmpty(description) && description.length() > 30) { - return description.substring(30); - } - return description; - } - } From d25f17782b4d3e940851579c31d3622582f4da35 Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 18 May 2022 21:35:17 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E8=A7=84=E8=8C=83=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/lili/modules/payment/kit/params/dto/CashierParam.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java b/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java index b28d7950..b7b5b096 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java @@ -18,6 +18,8 @@ import java.util.List; @ToString public class CashierParam { + static Long MAX_DETAIL_LENGTH = 30L; + @ApiModelProperty(value = "价格") private Double price; @@ -48,7 +50,7 @@ public class CashierParam { return "清单详细"; } //对参数长度进行限制 - if (!StringUtils.isEmpty(detail) && detail.length() > 30) { + if (!StringUtils.isEmpty(detail) && detail.length() > MAX_DETAIL_LENGTH) { detail = detail.substring(30); } return StringUtils.filterSpecialChart(detail); From b19e4043cde187b5fd08be3d62a56a7247867e6a Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 18 May 2022 22:38:13 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/lili/common/utils/StringUtils.java | 14 ++++++++++++++ .../payment/kit/params/dto/CashierParam.java | 6 +----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/cn/lili/common/utils/StringUtils.java b/framework/src/main/java/cn/lili/common/utils/StringUtils.java index f3ae80e1..bf9df5b6 100644 --- a/framework/src/main/java/cn/lili/common/utils/StringUtils.java +++ b/framework/src/main/java/cn/lili/common/utils/StringUtils.java @@ -147,6 +147,20 @@ public class StringUtils extends StrUtil { return str.concat(appendStr); } + /** + * 切割字符串 + * + * @param str 字符串 + * @param length 长度 + * @return 处理后的字符串 + */ + public static String sub(String str, Integer length) { + if (str.length() < length) { + return str; + } + return str.substring(0, length); + } + /** * 过滤特殊字符串 * diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java b/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java index b7b5b096..4bdfcbe5 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/params/dto/CashierParam.java @@ -49,10 +49,6 @@ public class CashierParam { if (StringUtils.isEmpty(detail)) { return "清单详细"; } - //对参数长度进行限制 - if (!StringUtils.isEmpty(detail) && detail.length() > MAX_DETAIL_LENGTH) { - detail = detail.substring(30); - } - return StringUtils.filterSpecialChart(detail); + return StringUtils.filterSpecialChart(StringUtils.sub(detail, 30)); } } From 7fccbc2aa2ec12fe6bf180b1fec5f366408bdfc8 Mon Sep 17 00:00:00 2001 From: caihongcheng <1501738723@qq.com> Date: Thu, 19 May 2022 15:23:44 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=96=87=E7=AB=A0=E6=8E=A5=E5=8F=A3=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili/controller/other/ArticleManagerController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java b/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java index ea8e22ab..d9372124 100644 --- a/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java +++ b/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java @@ -42,6 +42,14 @@ public class ArticleManagerController { return ResultUtil.data(articleService.getById(id)); } + @ApiOperation(value = "根据类型查看文章") + @ApiImplicitParam(name = "type", value = "文章类型", required = true, dataType = "String", paramType = "path") + @GetMapping(value = "/type/{type}") + public ResultMessage
getByType(@PathVariable String type) { + + return ResultUtil.data(articleService.customGetByType(type)); + } + @ApiOperation(value = "分页获取") @ApiImplicitParams({ @ApiImplicitParam(name = "categoryId", value = "文章分类ID", paramType = "query"),