diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/dto/SpuInfoRespDTO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/dto/SpuInfoRespDTO.java index 6aae7191b..92c20a0d7 100644 --- a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/dto/SpuInfoRespDTO.java +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/dto/SpuInfoRespDTO.java @@ -31,7 +31,7 @@ public class SpuInfoRespDTO { */ private String code; /** - * 商品卖点 + * 促销语 */ private String sellPoint; /** diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java index 826cdd6c4..54f0986dd 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; import cn.iocoder.yudao.framework.common.validation.InEnum; -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; import cn.iocoder.yudao.module.product.enums.spu.ProductSpuSpecTypeEnum; import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; import io.swagger.annotations.ApiModelProperty; @@ -25,7 +24,7 @@ public class ProductSpuBaseVO { @ApiModelProperty(value = "商品编码", example = "yudaoyuanma") private String code; - @ApiModelProperty(value = "商品卖点", example = "好吃!") + @ApiModelProperty(value = "促销语", example = "好吃!") private String sellPoint; @ApiModelProperty(value = "商品详情", required = true, example = "我是商品描述") diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java index a22b68a2c..93c47d4af 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java @@ -47,7 +47,7 @@ public class ProductSpuDO extends BaseDO { */ private String code; /** - * 商品卖点 + * 促销语 */ private String sellPoint; /** diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java index 86a0e844c..f47152150 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.trade.service.order; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.text.StrBuilder; import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.TerminalEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; @@ -15,8 +14,8 @@ import cn.iocoder.yudao.module.market.api.price.dto.PriceCalculateRespDTO; import cn.iocoder.yudao.module.pay.api.order.PayOrderApi; import cn.iocoder.yudao.module.pay.api.order.PayOrderInfoCreateReqDTO; import cn.iocoder.yudao.module.product.api.sku.ProductSkuApi; -import cn.iocoder.yudao.module.product.api.sku.dto.SkuDecrementStockBatchReqDTO; import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO; +import cn.iocoder.yudao.module.product.api.sku.dto.SkuDecrementStockBatchReqDTO; import cn.iocoder.yudao.module.product.api.spu.ProductSpuApi; import cn.iocoder.yudao.module.product.api.spu.dto.SpuInfoRespDTO; import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; @@ -181,7 +180,7 @@ public class TradeOrderServiceImpl implements TradeOrderService { private void checkSaleableFromSpu(List spuInfos) { SpuInfoRespDTO spu = CollectionUtils.findFirst(spuInfos, - spuInfoDTO -> !Objects.equals(ProductSpuStatusEnum.ENABLE.getStyle(), spuInfoDTO.getStatus())); + spuInfoDTO -> !Objects.equals(ProductSpuStatusEnum.ENABLE.getStatus(), spuInfoDTO.getStatus())); if (Objects.isNull(spu)) { throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_SPU_NOT_SALE); } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 36ab6a8b2..fe88a0609 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -45,33 +45,33 @@ spring: datasource: master: name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://139.9.196.247:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=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.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.master.name} # SQLServer 连接的示例 username: root - password: 123456 + password: ${RUOYI_VUE_PRO} # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W slave: # 模拟从库,可根据自己需要修改 name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://139.9.196.247:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=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: 123456 + password: ${RUOYI_VUE_PRO} # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 127.0.0.1 # 地址 + host: 139.9.196.247 # 地址 port: 6379 # 端口 database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 + password: 123456 # 密码,建议生产环境开启 jasypt: encryptor: diff --git a/yudao-ui-admin/src/utils/constants.js b/yudao-ui-admin/src/utils/constants.js index 67ecfdd46..9f5d796ed 100644 --- a/yudao-ui-admin/src/utils/constants.js +++ b/yudao-ui-admin/src/utils/constants.js @@ -185,37 +185,54 @@ export const PayOrderRefundStatusEnum = { * 支付退款订单状态枚举 */ export const PayRefundStatusEnum = { - CREATE:{ - status:0, + CREATE: { + status: 0, name: '退款订单生成' }, - SUCCESS:{ - status:1, + SUCCESS: { + status: 1, name: '退款成功' }, - FAILURE:{ - status:2, + FAILURE: { + status: 2, name: '退款失败' }, - PROCESSING_NOTIFY:{ - status:3, + PROCESSING_NOTIFY: { + status: 3, name: '退款中,渠道通知结果' }, - PROCESSING_QUERY:{ - status:4, + PROCESSING_QUERY: { + status: 4, name: '退款中,系统查询结果' }, - UNKNOWN_RETRY:{ - status:5, + UNKNOWN_RETRY: { + status: 5, name: '状态未知,请重试' }, - UNKNOWN_QUERY:{ - status:6, + UNKNOWN_QUERY: { + status: 6, name: '状态未知,系统查询结果' }, - CLOSE:{ - status:99, + CLOSE: { + status: 99, name: '退款关闭' } } +/** + * 商品 SPU 状态 + */ +export const ProductSpuStatusEnum = { + RECYCLE: { + status: -1, + name: '回收站' + }, + DISABLE: { + status: 0, + name: '下架' + }, + ENABLE: { + status: 1, + name: '上架' + }, +} diff --git a/yudao-ui-admin/src/utils/dict.js b/yudao-ui-admin/src/utils/dict.js index 1ddde889a..8c5b4bbca 100644 --- a/yudao-ui-admin/src/utils/dict.js +++ b/yudao-ui-admin/src/utils/dict.js @@ -56,6 +56,9 @@ export const DICT_TYPE = { PAY_ORDER_REFUND_STATUS: 'pay_order_refund_status', // 商户支付订单退款状态 PAY_REFUND_ORDER_STATUS: 'pay_refund_order_status', // 退款订单状态 PAY_REFUND_ORDER_TYPE: 'pay_refund_order_type', // 退款订单类别 + + // ========== MALL - PRODUCT 模块 ========== + PRODUCT_SPU_STATUS: 'product_spu_status', // 商品 SPU 状态 } /** @@ -114,6 +117,3 @@ export function getDictDataLabel(dictType, value) { const dict = getDictData(dictType, value); return dict ? dict.label : ''; } - -export class getDictDataL { -} diff --git a/yudao-ui-admin/src/views/mall/product/spu/index.vue b/yudao-ui-admin/src/views/mall/product/spu/index.vue index 41d9ebf14..68c673f00 100644 --- a/yudao-ui-admin/src/views/mall/product/spu/index.vue +++ b/yudao-ui-admin/src/views/mall/product/spu/index.vue @@ -4,74 +4,48 @@ - - - - + + + + - + - + - - - - - + - + - + - - + - + - - - - - + - + - + - 搜索 重置 @@ -82,8 +56,7 @@ 新增 - + v-hasPermi="['product:spu:create']">添加商品 @@ -96,17 +69,13 @@ + - + @@ -117,18 +86,15 @@ - @@ -141,17 +107,12 @@ - + @@ -162,18 +123,15 @@ - @@ -186,17 +144,12 @@ - + @@ -207,18 +160,15 @@ - @@ -231,17 +181,12 @@ - + @@ -252,27 +197,24 @@ - + - @@ -353,9 +295,6 @@ export default { this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); // 执行查询 getSpuPage(params).then((response) => { - response.data.list.forEach(element => { - element.price = this.divide(element.minPrice, 100) + "~" + this.divide(element.maxPrice, 100) - }); this.list = response.data.list; this.total = response.data.total; this.loading = false; @@ -390,18 +329,16 @@ export default { .confirm('是否确认删除商品spu编号为"' + id + '"的数据项?') .then(function () { return deleteSpu(id); - }) - .then(() => { + }).then(() => { this.getList(); this.$modal.msgSuccess("删除成功"); - }) - .catch(() => { + }).catch(() => { }); }, - unitConversion(row, column, cellValue) { - return this.divide(cellValue, 100); + formatPrice(row, column, cellValue) { + return '¥' + this.divide(cellValue, 100); }, - // 选中tab + // 选中 tab handleClick(val) { if (val.name === "all") { this.queryParams.tabStatus = null; diff --git a/yudao-ui-admin/src/views/mall/product/spu/save.vue b/yudao-ui-admin/src/views/mall/product/spu/save.vue index ea08de23b..f24644135 100644 --- a/yudao-ui-admin/src/views/mall/product/spu/save.vue +++ b/yudao-ui-admin/src/views/mall/product/spu/save.vue @@ -7,8 +7,8 @@ - - + +