ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBigGiftPackageOrderController.java
@@ -3,6 +3,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.annotation.Log; @@ -34,6 +35,7 @@ import com.ruoyi.common.core.domain.AjaxResult; import java.io.IOException; import java.math.BigDecimal; import java.net.URLEncoder; import java.time.LocalDateTime; import java.util.ArrayList; @@ -155,14 +157,18 @@ tBigGiftPackageOrder.setPartnerName(lastUser.getName()); } } Integer bigGiftPackageId = tBigGiftPackageOrder.getBigGiftPackageId(); TBigGiftPackage tBigGiftPackage = tBigGiftPackageService.getById(bigGiftPackageId); tBigGiftPackageOrder.setBigGiftPackageName(tBigGiftPackage.getName()); tBigGiftPackageOrder.setBigGiftPackageCover(tBigGiftPackage.getCoverImage()); tBigGiftPackageOrder.setBigGiftPackagePrice(tBigGiftPackage.getTotalPrice()); tBigGiftPackageOrder.setBigGiftPackageIntro(tBigGiftPackage.getIntroduction()); String bigGiftPackage = tBigGiftPackageOrder.getBigGiftPackage(); if(bigGiftPackage!=null){ JSONObject jsonObject = JSONObject.parseObject(bigGiftPackage); tBigGiftPackageOrder.setBigGiftPackageName(jsonObject.getString("name")); tBigGiftPackageOrder.setBigGiftPackageCover(jsonObject.getString("coverImage")); tBigGiftPackageOrder.setBigGiftPackagePrice(new BigDecimal(jsonObject.getString("totalPrice"))); tBigGiftPackageOrder.setBigGiftPackageIntro(jsonObject.getString("introduction")); } // 销量 long count = tBigGiftPackageOrderService.count(new LambdaQueryWrapper<TBigGiftPackageOrder>().eq(TBigGiftPackageOrder::getBigGiftPackageId, bigGiftPackageId).ne(TBigGiftPackageOrder::getStatus, 5)); long count = tBigGiftPackageOrderService.count(new LambdaQueryWrapper<TBigGiftPackageOrder>().eq(TBigGiftPackageOrder::getBigGiftPackageId, tBigGiftPackageOrder.getBigGiftPackageId()).ne(TBigGiftPackageOrder::getStatus, 5)); tBigGiftPackageOrder.setBigGiftPackageSales((int)count); @@ -171,6 +177,10 @@ TCompany tCompany = tCompanyService.getById(companyId); tBigGiftPackageOrder.setCompanyName(tCompany.getName()); } tBigGiftPackageOrder.setUserName(appUser.getName()); tBigGiftPackageOrder.setPhone(appUser.getPhone()); return R.ok(tBigGiftPackageOrder); } ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPhysicalGoodsOrderController.java
@@ -9,10 +9,12 @@ import com.ruoyi.common.core.domain.R; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.WebUtils; import com.ruoyi.system.model.TAppUser; import com.ruoyi.system.model.TBigGiftPackageOrder; import com.ruoyi.system.model.TPhysicalGoods; import com.ruoyi.system.model.TPhysicalGoodsOrder; import com.ruoyi.system.query.BigGiftPackageQuery; import com.ruoyi.system.service.TAppUserService; import com.ruoyi.system.service.TPhysicalGoodsOrderService; import com.ruoyi.system.service.TPhysicalGoodsService; import io.swagger.annotations.Api; @@ -42,10 +44,12 @@ public class TPhysicalGoodsOrderController { private final TPhysicalGoodsOrderService tPhysicalGoodsOrderService; private final TPhysicalGoodsService tPhysicalGoodsService; private final TAppUserService tAppUserService; public TPhysicalGoodsOrderController(TPhysicalGoodsOrderService tPhysicalGoodsOrderService, TPhysicalGoodsService tPhysicalGoodsService) { public TPhysicalGoodsOrderController(TPhysicalGoodsOrderService tPhysicalGoodsOrderService, TPhysicalGoodsService tPhysicalGoodsService, TAppUserService tAppUserService) { this.tPhysicalGoodsOrderService = tPhysicalGoodsOrderService; this.tPhysicalGoodsService = tPhysicalGoodsService; this.tAppUserService = tAppUserService; } @@ -68,6 +72,12 @@ order.setPhysicalGoodsCover(jsonObject.getString("coverImage")); order.setPhysicalGoodsPrice(new BigDecimal(jsonObject.getString("totalPrice")).setScale(2, BigDecimal.ROUND_HALF_UP)); order.setPhysicalGoodsIntro(jsonObject.getString("introduction")); Integer appUserId = order.getAppUserId(); TAppUser appUser = tAppUserService.getById(appUserId); order.setUserName(appUser.getName()); order.setPhone(appUser.getPhone()); return R.ok(order); } ruoyi-admin/src/main/resources/application-prod.yml
@@ -20,7 +20,7 @@ port: 8081 servlet: # 应用的访问路径 context-path: /laboratory/ context-path: /manage/ tomcat: # tomcat的URI编码 uri-encoding: UTF-8 @@ -82,7 +82,7 @@ # 数据库索引 database: 0 # 密码 password: 123456 password: jsd2026! # 连接超时时间 timeout: 10s lettuce: @@ -102,9 +102,9 @@ druid: # 主库数据源 master: url: jdbc:mysql://127.0.0.1:10633/laboratory?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true url: jdbc:mysql://127.0.0.1:3306/jiashida?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: root password: Laboratory@2025! password: Jiashida@2026! # 从库数据源 slave: # 从数据源开关/默认关闭 ruoyi-common/src/main/java/com/ruoyi/common/core/controller/FileController.java
@@ -40,7 +40,7 @@ } String TimeDir =new SimpleDateFormat("yyyy-MM-dd").format(new Date()); // String realPath = fileUploadConfig.getLocation() + TimeDir; String realPath = "F:\\file\\mobile\\" + TimeDir; String realPath = "/mnt/file/" + TimeDir; File file = new File(realPath); // 没有目录就创建 if (!file.exists()) {