Commit 433c345c authored by 周健威's avatar 周健威

修改订单接口

parent 169ad432
......@@ -22,9 +22,9 @@ import java.util.List;
@Service
public class BannerBiz extends BaseBiz<BannerMapper,Banner> {
public List<BannerVo> findBannerList(Integer type,Integer location, String multiLocation, Integer platform) {
public List<BannerVo> findBannerList(Integer type,Integer location, String multiLocation, Integer platform, Integer status) {
List<BannerVo> bannerVos = new ArrayList<>();
List<Banner> banners = mapper.findBannerListByType(type,location,multiLocation,platform);
List<Banner> banners = mapper.findBannerListByType(type,location,multiLocation,platform,status);
banners.forEach(banner -> {
BannerVo bannerVo = new BannerVo();
BeanUtils.copyProperties(banner,bannerVo);
......
......@@ -27,5 +27,5 @@ public interface BannerMapper extends Mapper<Banner> {
List<Banner> findBannerListByType(@Param("type") Integer type,@Param("location") Integer location, @Param("multiLocation") String multiLocation, @Param("platform") Integer platform);
List<Banner> findBannerListByType(@Param("type") Integer type,@Param("location") Integer location, @Param("multiLocation") String multiLocation, @Param("platform") Integer platform, @Param("status") Integer status);
}
......@@ -34,11 +34,12 @@ public class BannerController {
public ObjectRestResponse findBannerlist(@RequestParam(required = false, value = "type") Integer type,
@RequestParam(required = false, value = "location") Integer location,
@RequestParam(required = false, value = "multiLocation") String multiLocation,
@RequestParam(value = "platform",required = false,defaultValue = "0") Integer platform) {
@RequestParam(value = "platform",required = false,defaultValue = "0") Integer platform,
@RequestParam(value = "status",required = false,defaultValue = "1") Integer status) {
if (null == location && StrUtil.isBlank(multiLocation)) {
return ObjectRestResponse.createDefaultFail();
}
List<BannerVo> bannerList = bannerBiz.findBannerList(type, location, multiLocation, platform);
List<BannerVo> bannerList = bannerBiz.findBannerList(type, location, multiLocation, platform, status);
return ObjectRestResponse.succ(bannerList);
}
}
......@@ -2,6 +2,7 @@ package com.xxfc.platform.order.biz;
import cn.hutool.core.lang.Dict;
import cn.hutool.extra.template.Template;
import cn.hutool.extra.template.TemplateConfig;
import cn.hutool.extra.template.TemplateEngine;
import cn.hutool.extra.template.TemplateUtil;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
......@@ -59,7 +60,7 @@ public class OrderTemplateBiz extends BaseBiz<OrderTemplateMapper,OrderTemplate>
}
public String result (String templateStr, Map map) {
TemplateEngine engine = TemplateUtil.createEngine();
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig());
Template template = engine.getTemplate(templateStr);
return template.render(map);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment