商品模块代码提交
This commit is contained in:
parent
12a0ef76f8
commit
c12bf6bbfb
|
|
@ -11,7 +11,7 @@ spring:
|
|||
port: 6379
|
||||
password: chaozg123
|
||||
timeout: 5000
|
||||
database: 1
|
||||
database: 2
|
||||
lettuce:
|
||||
pool:
|
||||
min-idle: 0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.czg.product.enums;
|
||||
|
||||
/**
|
||||
* 商品上下架类型
|
||||
*
|
||||
* @author tankaikai
|
||||
* @since 2025-02-18 18:20
|
||||
*/
|
||||
public enum ProductIsSaleTypeEnum {
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
PRODUCT("product"),
|
||||
|
||||
/**
|
||||
* sku
|
||||
*/
|
||||
SKU("sku");
|
||||
|
||||
private String value;
|
||||
|
||||
ProductIsSaleTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.czg.product.param;
|
||||
|
||||
import com.czg.validator.group.DefaultGroup;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品上下架参数
|
||||
*
|
||||
* @author tankaikai
|
||||
* @since 2025-02-18 17:46
|
||||
*/
|
||||
@Data
|
||||
public class ProductIsSaleParam implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 上下架类型 product-商品 sku-SKU
|
||||
*/
|
||||
@NotBlank(message = "上下架类型不能为空", groups = DefaultGroup.class)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 商品id/sku id
|
||||
*/
|
||||
@NotNull(message = "商品id/sku-id不能为空", groups = DefaultGroup.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 是否上下架 1-上架,0-下架
|
||||
*/
|
||||
@NotNull(message = "是否上下架不能为空", groups = DefaultGroup.class)
|
||||
private Integer isSale;
|
||||
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ import com.alipay.api.request.AlipaySystemOauthTokenRequest;
|
|||
import com.alipay.api.response.AlipaySystemOauthTokenResponse;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
|
|
@ -25,27 +24,27 @@ public class AlipayUtil {
|
|||
/**
|
||||
* 网关地址 线上:https://openapi.alipay.com/gateway.do 沙箱:https://openapi.alipaydev.com/gateway.do
|
||||
*/
|
||||
@Value("${alipay.serverUrl}")
|
||||
//@Value("${alipay.serverUrl}")
|
||||
private String serverUrl;
|
||||
/**
|
||||
* 应用ID
|
||||
*/
|
||||
@Value("${alipay.appId}")
|
||||
//@Value("${alipay.appId}")
|
||||
private String appId;
|
||||
/**
|
||||
* 应用私钥
|
||||
*/
|
||||
@Value("${alipay.privateKey}")
|
||||
//@Value("${alipay.privateKey}")
|
||||
private String privateKey;
|
||||
/**
|
||||
* 支付宝公钥
|
||||
*/
|
||||
@Value("${alipay.alipayPublicKey}")
|
||||
//@Value("${alipay.alipayPublicKey}")
|
||||
private String alipayPublicKey;
|
||||
/**
|
||||
* 支付宝公钥
|
||||
*/
|
||||
@Value("${alipay.encryptKey}")
|
||||
//@Value("${alipay.encryptKey}")
|
||||
private String encryptKey;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import cn.hutool.http.HttpUtil;
|
|||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
@ -19,10 +18,10 @@ import java.util.Map;
|
|||
@Component
|
||||
public class WechatAuthUtil {
|
||||
|
||||
@Value("${wx.appId}")
|
||||
//@Value("${wx.appId}")
|
||||
private String appId;
|
||||
|
||||
@Value("${wx.secrete}")
|
||||
//@Value("${wx.secrete}")
|
||||
private String secrete;
|
||||
|
||||
static LinkedHashMap<String,String> linkedHashMap=new LinkedHashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue