ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppUserController.java
@@ -466,7 +466,7 @@ List<IntegralChangeRecordVo> list = integralChangeRecordService.integralChangeRecordExport(query); Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TAppUser.class, list); Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), IntegralChangeRecordVo.class, list); HttpServletResponse response = WebUtils.response(); assert response != null; response.setContentType("application/vnd.ms-excel"); ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBigGiftPackageController.java
@@ -7,6 +7,7 @@ import cn.afterturn.easypoi.excel.entity.ImportParams; import cn.hutool.json.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.basic.PageInfo; @@ -116,10 +117,7 @@ @DeleteMapping(value = "/delete/{id}") @Log(title = "大礼包-删除", businessType = BusinessType.DELETE) public R<String> delete(@PathVariable Integer id ) { TBigGiftPackage bigGiftPackage = tBigGiftPackageService.getById(id); bigGiftPackage.setStatus(0); bigGiftPackage.setUpdateUserId(tokenService.getLoginUser().getUserId()); boolean remove = tBigGiftPackageService.updateById(bigGiftPackage); boolean remove = tBigGiftPackageService.update(new LambdaUpdateWrapper<TBigGiftPackage>().eq(TBigGiftPackage::getId, id).set(TBigGiftPackage::getStatus, 1).set(TBigGiftPackage::getUpdateUserId,tokenService.getLoginUser().getUserId())); if (remove) { return R.ok("删除成功"); } 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/TPhysicalGoodsController.java
@@ -7,6 +7,7 @@ import cn.afterturn.easypoi.excel.entity.ImportParams; import cn.hutool.json.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.domain.R; @@ -112,10 +113,7 @@ @DeleteMapping(value = "/delete/{id}") @Log(title = "实物商品-删除", businessType = BusinessType.DELETE) public R<String> delete(@PathVariable Integer id ) { TPhysicalGoods physicalGoods = tPhysicalGoodsService.getById(id); physicalGoods.setStatus(0); physicalGoods.setUpdateUserId(tokenService.getLoginUser().getUserId()); boolean remove = tPhysicalGoodsService.updateById(physicalGoods); boolean remove = tPhysicalGoodsService.update(new LambdaUpdateWrapper<TPhysicalGoods>().eq(TPhysicalGoods::getId, id).set(TPhysicalGoods::getStatus, 1).set(TPhysicalGoods::getUpdateUserId,tokenService.getLoginUser().getUserId())); return remove ? R.ok() : R.fail(); } 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()) { ruoyi-system/src/main/resources/mapper/system/TIntegralChangeRecordMapper.xml
@@ -21,7 +21,7 @@ SELECT t.id, t.app_user_id, t.balance AS newIntegral, t.price AS newIntegral, t.old_balance AS oldIntegral, t.create_time, t.create_user_id, @@ -52,7 +52,7 @@ SELECT t.id, t.app_user_id, t.balance AS newIntegral, t.price AS newIntegral, t.old_balance AS oldIntegral, t.create_time, t.create_user_id,