导出
This commit is contained in:
		| @ -1,33 +1,27 @@ | |||||||
| package cn.iocoder.yudao.module.member.controller.admin.customizeExcel; | package cn.iocoder.yudao.module.member.controller.admin.customizeExcel; | ||||||
|  |  | ||||||
| import cn.iocoder.yudao.framework.common.pojo.CommonResult; | import cn.iocoder.yudao.framework.excel.core.handler.SelectSheetWriteHandler; | ||||||
| import cn.iocoder.yudao.framework.common.pojo.PageParam; |  | ||||||
| import cn.iocoder.yudao.framework.common.pojo.PageResult; |  | ||||||
| import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |  | ||||||
| import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | ||||||
| import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | ||||||
| import cn.iocoder.yudao.module.member.controller.admin.business.vo.BusinessPageReqVO; |  | ||||||
| import cn.iocoder.yudao.module.member.controller.admin.business.vo.BusinessRespVO; |  | ||||||
| import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.OrderExcelVO; | import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.OrderExcelVO; | ||||||
| import cn.iocoder.yudao.module.member.dal.dataobject.business.BusinessDO; |  | ||||||
| import cn.iocoder.yudao.module.member.service.business.BusinessService; |  | ||||||
| import cn.iocoder.yudao.module.member.service.customizeExcel.CustomizeExcelService; | import cn.iocoder.yudao.module.member.service.customizeExcel.CustomizeExcelService; | ||||||
|  | import com.alibaba.excel.EasyExcel; | ||||||
|  | import com.alibaba.excel.converters.longconverter.LongStringConverter; | ||||||
|  | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; | ||||||
| import io.swagger.v3.oas.annotations.Operation; | import io.swagger.v3.oas.annotations.Operation; | ||||||
| import io.swagger.v3.oas.annotations.Parameter; |  | ||||||
| import io.swagger.v3.oas.annotations.tags.Tag; | import io.swagger.v3.oas.annotations.tags.Tag; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.GetMapping; | import org.springframework.web.bind.annotation.GetMapping; | ||||||
| import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
| import org.springframework.web.bind.annotation.RequestParam; |  | ||||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||||
|  |  | ||||||
| import javax.annotation.Resource; | import javax.annotation.Resource; | ||||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||||
| import javax.validation.Valid; |  | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
|  | import java.net.URLEncoder; | ||||||
|  | import java.nio.charset.StandardCharsets; | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |  | ||||||
| import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; | ||||||
|  |  | ||||||
|  |  | ||||||
| @ -51,5 +45,6 @@ public class CustomizeExcelController { | |||||||
|         ExcelUtils.write(response, "订单详情统计.xls", "数据", OrderExcelVO.class, |         ExcelUtils.write(response, "订单详情统计.xls", "数据", OrderExcelVO.class, | ||||||
|                 orderExcelVOS); |                 orderExcelVOS); | ||||||
|  |  | ||||||
|  |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -1,6 +1,7 @@ | |||||||
| package cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo; | package cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo; | ||||||
|  |  | ||||||
| import com.alibaba.excel.annotation.ExcelProperty; | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import com.alibaba.excel.annotation.format.NumberFormat; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||||
| @ -21,18 +22,21 @@ public class OrderExcelVO { | |||||||
|     private String timeSlot; |     private String timeSlot; | ||||||
|  |  | ||||||
|     @ExcelProperty("总价") |     @ExcelProperty("总价") | ||||||
|  |     @NumberFormat("#0.00") | ||||||
|     private BigDecimal totalMoney; |     private BigDecimal totalMoney; | ||||||
|  |  | ||||||
|     @ExcelProperty("菜名") |     @ExcelProperty("菜名") | ||||||
|     private String dishesName; |     private String dishesName; | ||||||
|  |  | ||||||
|     @ExcelProperty("单价(元/50g)") |     @ExcelProperty("单价(元/50g)") | ||||||
|  |     @NumberFormat("#0.00") | ||||||
|     private BigDecimal unitPrice; |     private BigDecimal unitPrice; | ||||||
|  |  | ||||||
|     @ExcelProperty("重量(g)") |     @ExcelProperty("重量(g)") | ||||||
|     private String weight; |     private String weight; | ||||||
|  |  | ||||||
|     @ExcelProperty("价格(元)") |     @ExcelProperty("价格(元)") | ||||||
|  |     @NumberFormat("#0.00") | ||||||
|     private BigDecimal price; |     private BigDecimal price; | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -47,40 +47,14 @@ spring: | |||||||
|       primary: master |       primary: master | ||||||
|       datasource: |       datasource: | ||||||
|         master: |         master: | ||||||
| #          name: yudao |           url: jdbc:mysql://119.84.144.11:33006/yudao_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true | ||||||
| #          url: jdbc:mysql://124.223.90.54:6975/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true |  | ||||||
|           url: jdbc:mysql://localhost:33006/yudao?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true |  | ||||||
|  |  | ||||||
| #          url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |  | ||||||
|           #          url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 |  | ||||||
|           #          url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例 |  | ||||||
|           #          url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 |  | ||||||
|           #          url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 |  | ||||||
|           #          url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 |  | ||||||
|           username: root |           username: root | ||||||
|           password: JXLZZX79 |           password: JXLZZX79 | ||||||
|         #          username: sa |  | ||||||
|         #          password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W |  | ||||||
|         #          username: SYSDBA # DM 连接的示例 |  | ||||||
|         #          password: SYSDBA # DM 连接的示例 |  | ||||||
| #        slave: # 模拟从库,可根据自己需要修改 |  | ||||||
| #          name: ruoyi-vue-pro |  | ||||||
| #          lazy: true # 开启懒加载,保证启动速度 |  | ||||||
| #          url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 |  | ||||||
|           #          url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 |  | ||||||
|           #          url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 |  | ||||||
|           #          url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 |  | ||||||
|           #          url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 |  | ||||||
| #          username: root |  | ||||||
| #          password: Emjlmlwj1! |  | ||||||
|   #          username: sa |  | ||||||
|   #          password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W |  | ||||||
|  |  | ||||||
|   # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 |   # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 | ||||||
|   redis: |   redis: | ||||||
|     host: localhost # 地址 |     host: 119.84.144.11 # 地址 | ||||||
|     port: 63079 # 端口 |     port: 63079 # 端口 | ||||||
|     database: 1 # 数据库索引 |     database: 5 # 数据库索引 正式-1,测试-5 | ||||||
|     # 密码 |     # 密码 | ||||||
|     password: JXLZZX79 |     password: JXLZZX79 | ||||||
|     # 连接超时时间 |     # 连接超时时间 | ||||||
| @ -277,17 +251,5 @@ justauth: | |||||||
|     prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: |     prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: | ||||||
|     timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 |     timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 | ||||||
|  |  | ||||||
| # TODO 赤焰:这个配置的目的是? |  | ||||||
| #ureport配置 |  | ||||||
| #ureport: |  | ||||||
| #  disableHttpSessionReportCache: true #是否禁用 |  | ||||||
| #  disableFileProvider: true #是否禁用 |  | ||||||
| #  debug: true |  | ||||||
| #  fileStoreDir: D://ureport//files |  | ||||||
| #  provider: |  | ||||||
| #    database: |  | ||||||
| #       disabled: true |  | ||||||
| #    file: |  | ||||||
| #       disabled: true |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 seesaw
					seesaw