as
This commit is contained in:
23
docs/databases-new/table_create-banner.sql
Normal file
23
docs/databases-new/table_create-banner.sql
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `applet_banner`;
|
||||||
|
CREATE TABLE `applet_banner` (
|
||||||
|
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
|
||||||
|
`sid` VARCHAR(64) NOT NULL COMMENT 'sid',
|
||||||
|
`createTime` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||||
|
`remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息',
|
||||||
|
`isEnable` INT(11) NULL DEFAULT '1' COMMENT '是否可用 1显示 2 不显示',
|
||||||
|
|
||||||
|
`bannerUrl` VARCHAR(1024) NULL DEFAULT NULL COMMENT '轮播图完整URL',
|
||||||
|
`bannerPath` VARCHAR(1024) NULL DEFAULT NULL COMMENT '轮播图相对地址',
|
||||||
|
`title` VARCHAR(255) NULL DEFAULT NULL COMMENT '标题',
|
||||||
|
`content` TEXT NULL DEFAULT NULL COMMENT '内容',
|
||||||
|
`startDate` DATETIME NULL DEFAULT NULL COMMENT '开始时间',
|
||||||
|
`endDate` DATETIME NULL DEFAULT NULL COMMENT '结束时间',
|
||||||
|
`sort` int DEFAULT 1,
|
||||||
|
`releaseTime` DATETIME NULL DEFAULT NULL COMMENT '发布时间',
|
||||||
|
`publisher` VARCHAR(255) NULL DEFAULT NULL COMMENT '发布人',
|
||||||
|
`isShow` VARCHAR(255) NULL DEFAULT '1' COMMENT '是否显示 1 显示 2不显示',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) COMMENT='小程序轮播图' ENGINE=InnoDB;
|
||||||
|
|
||||||
2
docs/databases-new/修改表结构编码.txt
Normal file
2
docs/databases-new/修改表结构编码.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
alter table lpk_customer convert to character set utf8 collate utf8_general_ci
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
package com.yxt.yythmall.adminapi;
|
package com.yxt.yythmall.adminapi;
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.excel.ExcelWriter;
|
|
||||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
@@ -20,7 +18,6 @@ import java.io.IOException;
|
|||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
@RestController("com.yxt.yythmall.adminapi.AdminReserveRest")
|
@RestController("com.yxt.yythmall.adminapi.AdminReserveRest")
|
||||||
@RequestMapping("/adminapi/reserve")
|
@RequestMapping("/adminapi/reserve")
|
||||||
@@ -43,16 +40,17 @@ public class AdminReserveRest {
|
|||||||
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
||||||
String fileName = URLEncoder.encode("预约单明细", "UTF-8").replaceAll("\\+", "%20");
|
String fileName = URLEncoder.encode("预约单明细", "UTF-8").replaceAll("\\+", "%20");
|
||||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
Map<String, List<ReserveCustomerExcel>> map = vegeCellarReserveOrderService.mapForExcelCustomer(pq);
|
// Map<String, List<ReserveCustomerExcel>> map = vegeCellarReserveOrderService.mapForExcelCustomer(pq);
|
||||||
// EasyExcel.write(response.getOutputStream(), RpHzcExcel.class).sheet("cck").doWrite(list);
|
List<ReserveCustomerExcel> list = vegeCellarReserveOrderService.listForExcelCustomer(pq);
|
||||||
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ReserveCustomerExcel.class).build()) {
|
EasyExcel.write(response.getOutputStream(), ReserveCustomerExcel.class).sheet("预约单明细").doWrite(list);
|
||||||
AtomicInteger i= new AtomicInteger();
|
// try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ReserveCustomerExcel.class).build()) {
|
||||||
map.forEach((key,val) ->{
|
// AtomicInteger i= new AtomicInteger();
|
||||||
WriteSheet writeSheet = EasyExcel.writerSheet(i.get(),key).build();
|
// map.forEach((key,val) ->{
|
||||||
i.getAndIncrement();
|
// WriteSheet writeSheet = EasyExcel.writerSheet(i.get(),key).build();
|
||||||
excelWriter.write(val, writeSheet);
|
// i.getAndIncrement();
|
||||||
});
|
// excelWriter.write(val, writeSheet);
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("精确到客户的预约单列表")
|
@ApiOperation("精确到客户的预约单列表")
|
||||||
@@ -95,18 +93,19 @@ public class AdminReserveRest {
|
|||||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
response.setCharacterEncoding("utf-8");
|
response.setCharacterEncoding("utf-8");
|
||||||
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
||||||
String fileName = URLEncoder.encode("提货点配货单", "UTF-8").replaceAll("\\+", "%20");
|
String fileName = URLEncoder.encode("支行配货单", "UTF-8").replaceAll("\\+", "%20");
|
||||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
Map<String, List<ReserveBankExcel>> map = vegeCellarReserveOrderService.mapForExcelBank(pq);
|
Map<String, List<ReserveBankExcel>> map = vegeCellarReserveOrderService.mapForExcelBank(pq);
|
||||||
// EasyExcel.write(response.getOutputStream(), RpHzcExcel.class).sheet("cck").doWrite(list);
|
List<ReserveBankExcel> list = vegeCellarReserveOrderService.listForExcelBank(pq);
|
||||||
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ReserveBankExcel.class).build()) {
|
EasyExcel.write(response.getOutputStream(), ReserveBankExcel.class).sheet("支行配货单").doWrite(list);
|
||||||
AtomicInteger i= new AtomicInteger();
|
// try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ReserveBankExcel.class).build()) {
|
||||||
map.forEach((key,val) ->{
|
// AtomicInteger i= new AtomicInteger();
|
||||||
WriteSheet writeSheet = EasyExcel.writerSheet(i.get(),key).build();
|
// map.forEach((key,val) ->{
|
||||||
i.getAndIncrement();
|
// WriteSheet writeSheet = EasyExcel.writerSheet(i.get(),key).build();
|
||||||
excelWriter.write(val, writeSheet);
|
// i.getAndIncrement();
|
||||||
});
|
// excelWriter.write(val, writeSheet);
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("精确到客户的预约单列表")
|
@ApiOperation("精确到客户的预约单列表")
|
||||||
|
|||||||
52
src/main/java/com/yxt/yythmall/adminapi/BannerRest.java
Normal file
52
src/main/java/com/yxt/yythmall/adminapi/BannerRest.java
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
package com.yxt.yythmall.adminapi;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.yythmall.biz.appletbanner.AppletBanner;
|
||||||
|
import com.yxt.yythmall.biz.appletbanner.AppletBannerQuery;
|
||||||
|
import com.yxt.yythmall.biz.appletbanner.AppletBannerService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@RestController("com.yxt.yythmall.adminapi.BannerRest")
|
||||||
|
@RequestMapping("/adminapi/banner")
|
||||||
|
public class BannerRest {
|
||||||
|
@Autowired
|
||||||
|
private AppletBannerService appletBannerService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("分页列表")
|
||||||
|
@PostMapping("/pageList")
|
||||||
|
public ResultBean<IPage<AppletBanner>> pageList(@RequestBody PagerQuery<AppletBannerQuery> pq) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
IPage<AppletBanner> page = appletBannerService.pageList(pq);
|
||||||
|
return rb.success().setData(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改或保存")
|
||||||
|
@PostMapping("/saveOrUpdate")
|
||||||
|
public ResultBean saveOrUpdate(@RequestBody AppletBanner dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
appletBannerService.saveOrUpdate(dto);
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("初始化")
|
||||||
|
@GetMapping("/noticeInit/{sid}")
|
||||||
|
public ResultBean<AppletBanner> noticeInit(@PathVariable("sid") String sid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
AppletBanner ab = appletBannerService.fetchBySid(sid);
|
||||||
|
return rb.success().setData(ab);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("是否显示")
|
||||||
|
@GetMapping("/isDisplayed/{sid}/{state}")
|
||||||
|
public ResultBean isDisplayed(@PathVariable("sid") String sid, @PathVariable("state") String state) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
appletBannerService.updateShowState(sid, state);
|
||||||
|
return rb.success().setMsg("更改成功!");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.yxt.yythmall.biz.appletbanner;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.yxt.common.core.domain.EntityWithId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/12/8 9:10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("applet_banner")
|
||||||
|
public class AppletBanner extends EntityWithId {
|
||||||
|
|
||||||
|
private String sid = IdUtil.fastSimpleUUID();
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTime = new Date();
|
||||||
|
private String remarks;
|
||||||
|
private String isEnable;
|
||||||
|
private String title;
|
||||||
|
private String content;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date startDate;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date endDate;
|
||||||
|
private int sort = 1;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date releaseTime;//发布时间
|
||||||
|
private String publisher;//发布人
|
||||||
|
private String isShow = "1";
|
||||||
|
|
||||||
|
|
||||||
|
private String bannerUrl;//轮播图完整URL
|
||||||
|
private String bannerPath;//轮播图相对地址
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.yxt.yythmall.biz.appletbanner;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AppletBannerMapper extends BaseMapper<AppletBanner> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.yxt.yythmall.biz.appletbanner;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/12/8 9:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppletBannerQuery implements Query {
|
||||||
|
private String startDate; //开始时间
|
||||||
|
private String endDate; //结束时间
|
||||||
|
private String countNumber; //总数
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.yxt.yythmall.biz.appletbanner;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.yxt.common.base.utils.PagerUtil;
|
||||||
|
import com.yxt.common.base.utils.StringUtils;
|
||||||
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
|
import com.yxt.yythmall.wxapi.vo.WxBannerListVo;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class AppletBannerService extends ServiceImpl<AppletBannerMapper, AppletBanner> {
|
||||||
|
|
||||||
|
public IPage<AppletBanner> pageList(PagerQuery<AppletBannerQuery> pq) {
|
||||||
|
AppletBannerQuery query = pq.getParams();
|
||||||
|
IPage<AppletBanner> page = PagerUtil.queryToPage(pq);
|
||||||
|
|
||||||
|
QueryWrapper<AppletBanner> qw = new QueryWrapper<>();
|
||||||
|
if (StringUtils.isNotBlank(query.getName())) {
|
||||||
|
qw.like("title", query.getName());
|
||||||
|
}
|
||||||
|
IPage<AppletBanner> iPage = baseMapper.selectPage(page, qw);
|
||||||
|
return iPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AppletBanner fetchBySid(String sid) {
|
||||||
|
QueryWrapper<AppletBanner> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("sid", sid);
|
||||||
|
List<AppletBanner> list = baseMapper.selectList(qw);
|
||||||
|
if (list == null || list.isEmpty())
|
||||||
|
return null;
|
||||||
|
return list.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateShowState(String sid, String state) {
|
||||||
|
UpdateWrapper<AppletBanner> uw = new UpdateWrapper<>();
|
||||||
|
uw.set("isShow", state);
|
||||||
|
uw.eq("sid", sid);
|
||||||
|
baseMapper.update(null, uw);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WxBannerListVo> listWxVo() {
|
||||||
|
QueryWrapper<AppletBanner> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("isShow", 1);
|
||||||
|
List<AppletBanner> list = baseMapper.selectList(qw);
|
||||||
|
List<WxBannerListVo> voList = new ArrayList<>();
|
||||||
|
list.forEach(entity -> {
|
||||||
|
WxBannerListVo vo = new WxBannerListVo();
|
||||||
|
BeanUtil.copyProperties(entity, vo);
|
||||||
|
voList.add(vo);
|
||||||
|
});
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,4 +38,7 @@ public class ReserveCustomerExcel {
|
|||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
@ExcelProperty(value = "商品数量(份)",index = 7)
|
@ExcelProperty(value = "商品数量(份)",index = 7)
|
||||||
private String goodsNumber;
|
private String goodsNumber;
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@ExcelProperty(value = "客户所属支行",index = 8)
|
||||||
|
private String customerBank;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,4 +35,5 @@ public class ReserveOrderVo implements Vo {
|
|||||||
private String goodsSid;
|
private String goodsSid;
|
||||||
private String goodsName;
|
private String goodsName;
|
||||||
private String goodsNumber;
|
private String goodsNumber;
|
||||||
|
private String customerBank;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -471,13 +471,16 @@
|
|||||||
max(lb.address) bankAddress,
|
max(lb.address) bankAddress,
|
||||||
vd.goodsSid,
|
vd.goodsSid,
|
||||||
max(vd.goodsName) goodsName,
|
max(vd.goodsName) goodsName,
|
||||||
sum(vd.goodsNumber) goodsNumber
|
sum(vd.goodsNumber) goodsNumber,
|
||||||
|
max(lcb.name) customerBank
|
||||||
from vege_cellar_reserve_order vo
|
from vege_cellar_reserve_order vo
|
||||||
LEFT JOIN lpk_store ls ON ls.sid=vo.storeSid
|
LEFT JOIN lpk_store ls ON ls.sid=vo.storeSid
|
||||||
LEFT JOIN lpk_bank lb ON lb.sid=ls.bankSid
|
LEFT JOIN lpk_bank lb ON lb.sid=ls.bankSid
|
||||||
left join vege_cellar_reserve_details vd on vo.sid=vd.orderSid
|
left join vege_cellar_reserve_details vd on vo.sid=vd.orderSid
|
||||||
left join lpk_goods lg on vd.goodsSid=lg.sid
|
left join lpk_goods lg on vd.goodsSid=lg.sid
|
||||||
left join pms_brand pb on pb.id=vo.affiliation
|
left join pms_brand pb on pb.id=vo.affiliation
|
||||||
|
LEFT JOIN lpk_customer lc ON lc.sid=vo.customerSid
|
||||||
|
LEFT JOIN lpk_customer_bank lcb ON lcb.sid = lc.customerBankSid
|
||||||
<where>
|
<where>
|
||||||
${ew.sqlSegment}
|
${ew.sqlSegment}
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSatAndSun1(String date) {
|
public boolean isSatAndSun1(String date) {
|
||||||
List<CannotReserveDictionary> l = cannotReserveDictionaryService.list(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime", date));
|
List<CannotReserveDictionary> l = cannotReserveDictionaryService.list(new QueryWrapper<CannotReserveDictionary>().eq("unavailableTime", date));
|
||||||
if (l.size() > 0) {
|
if (l.size() > 0) {
|
||||||
@@ -92,6 +93,7 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Test
|
// @Test
|
||||||
// public void isSatAndSun(){
|
// public void isSatAndSun(){
|
||||||
// String date="2023-12-11";
|
// String date="2023-12-11";
|
||||||
@@ -725,6 +727,18 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ReserveCustomerExcel> listForExcelCustomer(LpkReserveOrderQuery query) {
|
||||||
|
QueryWrapper<VegeCellarReserveOrder> qw = buildQuery(query);
|
||||||
|
List<ReserveOrderVo> list = baseMapper.pageOfCustomer(qw);
|
||||||
|
List<ReserveCustomerExcel> volist = new ArrayList<>();
|
||||||
|
list.forEach(vo -> {
|
||||||
|
ReserveCustomerExcel ex = new ReserveCustomerExcel();
|
||||||
|
BeanUtil.copyProperties(vo, ex);
|
||||||
|
volist.add(ex);
|
||||||
|
});
|
||||||
|
return volist;
|
||||||
|
}
|
||||||
|
|
||||||
public ResultBean<IPage<ReserveOrderVo>> pageOfStore(PagerQuery<LpkReserveOrderQuery> pq) {
|
public ResultBean<IPage<ReserveOrderVo>> pageOfStore(PagerQuery<LpkReserveOrderQuery> pq) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
LpkReserveOrderQuery query = pq.getParams();
|
LpkReserveOrderQuery query = pq.getParams();
|
||||||
@@ -792,6 +806,18 @@ public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellar
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ReserveBankExcel> listForExcelBank(LpkReserveOrderQuery query) {
|
||||||
|
QueryWrapper<VegeCellarReserveOrder> qw = buildQuery(query);
|
||||||
|
List<ReserveOrderVo> list = baseMapper.pageOfBank(qw);
|
||||||
|
List<ReserveBankExcel> volist = new ArrayList<>();
|
||||||
|
list.forEach(vo -> {
|
||||||
|
ReserveBankExcel ex = new ReserveBankExcel();
|
||||||
|
BeanUtil.copyProperties(vo, ex);
|
||||||
|
volist.add(ex);
|
||||||
|
});
|
||||||
|
return volist;
|
||||||
|
}
|
||||||
|
|
||||||
public ResultBean<IPage<ReserveOrderVo>> pageOfAll(PagerQuery<LpkReserveOrderQuery> pq) {
|
public ResultBean<IPage<ReserveOrderVo>> pageOfAll(PagerQuery<LpkReserveOrderQuery> pq) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
LpkReserveOrderQuery query = pq.getParams();
|
LpkReserveOrderQuery query = pq.getParams();
|
||||||
|
|||||||
36
src/main/java/com/yxt/yythmall/wxapi/WxBannerRest.java
Normal file
36
src/main/java/com/yxt/yythmall/wxapi/WxBannerRest.java
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
package com.yxt.yythmall.wxapi;
|
||||||
|
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.yythmall.biz.appletbanner.AppletBanner;
|
||||||
|
import com.yxt.yythmall.biz.appletbanner.AppletBannerService;
|
||||||
|
import com.yxt.yythmall.wxapi.vo.WxBannerListVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController("om.yxt.yythmall.wxapi.WxBannerRest")
|
||||||
|
@RequestMapping("/wxapi/banner")
|
||||||
|
public class WxBannerRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AppletBannerService appletBannerService;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public ResultBean<List<WxBannerListVo>> list() {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<WxBannerListVo> list = appletBannerService.listWxVo();
|
||||||
|
return rb.success().setData(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/banner/{sid}")
|
||||||
|
public ResultBean<AppletBanner> fetchBySid(@PathVariable("sid") String sid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
AppletBanner entity = appletBannerService.fetchBySid(sid);
|
||||||
|
return rb.success().setData(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
13
src/main/java/com/yxt/yythmall/wxapi/vo/WxBannerListVo.java
Normal file
13
src/main/java/com/yxt/yythmall/wxapi/vo/WxBannerListVo.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.yythmall.wxapi.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WxBannerListVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private String bannerUrl;//轮播图完整URL
|
||||||
|
private String bannerPath;//轮播图相对地址
|
||||||
|
}
|
||||||
@@ -3,11 +3,11 @@ spring:
|
|||||||
hikari:
|
hikari:
|
||||||
max-lifetime: 500000
|
max-lifetime: 500000
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://39.104.100.138:3306/yxt_lpk_yythmall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://39.104.100.138:3306/yxt_lpk_yythmall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||||
url: jdbc:mysql://8.130.39.13:3306/yxt_lpk_yythmall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
# url: jdbc:mysql://8.130.39.13:3306/yxt_lpk_yythmall?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: 1LAiGz$t1*Iw
|
# password: 1LAiGz$t1*Iw
|
||||||
# password: yxt_mysql_138
|
password: yxt_mysql_138
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
|
|||||||
Reference in New Issue
Block a user