Compare commits

...

10 Commits

Author SHA1 Message Date
清晨
41ff2e9162 feat(mall): 添加商品指导价和展示价
- 在 TzProdCommVo 中添加 guidingPrice 和 price 字段
- 在 TzProdCommServiceImpl 中查询并设置商品指导价和展示价
-优化订单状态更新逻辑,仅在存在 orderItemId 时进行更新- 移除 V3LakalaUserUtils 中的调试打印语句
2025-05-22 16:56:20 +08:00
清晨
1635812bb5 feat(mall): 新增商品标签筛选功能并优化支付相关代码- 在商品搜索接口中添加标签筛选参数
- 更新数据库查询以支持标签筛选
- 移除冗余的支付相关代码
- 更新拉卡拉SDK的调用方式
2025-05-19 14:38:07 +08:00
清晨
3f7707f1db feat(mall): 添加商品评论列表功能并优化订单项
- 新增商品评论列表接口和相关服务方法
- 在订单项中添加指导价字段
- 优化商品评论查询条件和排序功能
- 增加评论用户头像和用户名信息
- 更新相关实体类和VO类以支持新功能
2025-05-16 10:50:23 +08:00
清晨
b5ce9d4a3d feat(mall): 商品搜索接口增加筛选条件
- 在商品搜索接口中添加环保等级、防火等级、试用场景等筛选条件
- 更新相关服务和 mapper 方法,支持新增的筛选条件
- 修改 SQL 查询语句,增加相应的 WHERE条件
2025-05-15 09:05:39 +08:00
清晨
5452cdced6 feat(mall): 添加商品环保等级、防火等级和试用场景属性
- 在 TzProd 和 TzProdBo 模型中添加环保等级、防火等级和试用场景字段
- 在 HyBasketVo 中添加指导价字段
- 更新 TzProdController 和 TzProdServiceImpl 以支持新属性的查询
2025-05-14 10:19:58 +08:00
清晨
1640ba4b7d refactor(mall): 优化分类查询接口参数类型和逻辑
- 将 ApiProdController 中 categoryByAncestors 方法的参数类型从 Long 改为 String
- 修改 ITzCategoryService 接口中 listByAncestors 方法的参数类型从 Long 改为 String- 更新 TzCategoryServiceImpl 中 listByAncestors 方法,移除对 subset 字段的查询条件- 优化 listByParentId 方法,移除对 subset 字段的查询条件
2025-05-12 17:48:26 +08:00
清晨
d57fc6f4ad refactor(mall): 移除未使用的函数参数
- 在 TzCategoryServiceImpl 类中移除了 listByParentId 和 listByAncestors 方法的多余参数注释- 这些参数在方法实现中并未使用,移除它们可以提高代码的可读性和维护性
2025-05-12 16:15:58 +08:00
清晨
5011984747 feat(category): 增加按祖级 ID 查询分类信息功能- 新增 categoryByAncestors 接口,根据祖级 ID 获取分类信息列表
- 在 TzCategory 模型中添加 ancestors 字段,用于存储祖级列表
- 在 TzCategoryService接口中添加 listByAncestors 方法
- 在 TzCategoryServiceImpl 中实现 listByAncestors 方法
- 更新相关 BO 和 VO 类,支持 ancestors 字段
2025-05-12 16:06:05 +08:00
清晨
1d180d33a9 refactor(mall): 优化分类服务接口实现
- 移除了 PdfUtil 类中的未使用代码- 简化了 TzCategoryServiceImpl 中的分类添加逻辑- 增加了 TzCategoryServiceImpl 中根据父级 ID 查询子类信息的方法注释
2025-05-12 14:44:09 +08:00
清晨
ad2776df97 refactor(mall): 更新数据库配置并优化类目查询逻辑
- 更新 ruoyi-admin 和 ruoyi-mall-api 项目的数据库配置,使用新的数据库连接信息
- 修改 TzCategoryServiceImpl 中的 listByParentId 方法,增加对子集状态的查询条件
2025-05-12 10:02:27 +08:00
46 changed files with 844 additions and 122 deletions

View File

@@ -52,9 +52,9 @@ spring:
# url: jdbc:mysql://localhost:3306/jcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
# username: root
# password: root
url: jdbc:mysql://erp9.52o.site:13308/jcs20250106?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: jcs20250106
password: esXkafdSMsxRAkNe
url: jdbc:mysql://erp9.52o.site:13308/jcs20250512?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: jcs20250512
password: rdnGT3TFYFnMzstX
# 从库数据源
slave:
lazy: false

View File

@@ -55,9 +55,9 @@ spring:
# url: jdbc:mysql://localhost:3306/cailiao?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
# username: root
# password: root
url: jdbc:mysql://124.223.56.113:13306/cailiao1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: cailiao1
password: j5RcfMwRG2WMHyAC
url: jdbc:mysql://erp9.52o.site:13308/jcs20250512?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: jcs20250512
password: rdnGT3TFYFnMzstX
# 从库数据源
slave:
lazy: false

View File

@@ -35,7 +35,7 @@
<module>ruoyi-common-websocket</module>
<module>ruoyi-common-sse</module>
<module>ruoyi-common-pay</module>
<module>ruoyi-common-pay-new</module>
<!-- <module>ruoyi-common-pay-new</module>-->
</modules>
<artifactId>ruoyi-common</artifactId>

View File

@@ -99,20 +99,7 @@
<artifactId>transmittable-thread-local</artifactId>
</dependency>
<!-- 腾讯云COS-STS -->
<dependency>
<groupId>com.qcloud</groupId>
<artifactId>cos-sts_api</artifactId>
<version>${com.qcloud.version}</version>
<scope>compile</scope>
</dependency>
<!-- 腾讯云内容安全 -->
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>${tencentcloudapi.version}</version>
</dependency>
</dependencies>

View File

@@ -8,6 +8,9 @@ import com.aspose.words.SaveFormat;
import java.io.*;
/**
* @author Maosw
*/
public class PdfUtil {

View File

@@ -16,24 +16,24 @@ public class BaseCommonDemo {
// 你的证书序列号
private static final String serialNo = "0195119ac8ac";
/*//商户私钥信息地址
//商户私钥信息地址
private static final String priKeyPath = "D:\\manage\\jcs\\OP10000499商户私钥.txt";
//拉卡拉支付平台证书地址
private static final String lklCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";
//拉卡拉支付平台证书地址2(用于拉卡拉通知验签)+
private static final String lklNotifyCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";*/
private static final String lklNotifyCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";
//商户私钥信息地址
/*//商户私钥信息地址
private static final String priKeyPath = "/home/manage/jcs/OP10000499商户私钥.txt";
//拉卡拉支付平台证书地址
private static final String lklCerPath = "/home/manage/jcs/平台公钥生产.cer";
//拉卡拉支付平台证书地址2(用于拉卡拉通知验签)
private static final String lklNotifyCerPath = "/home/manage/jcs/平台公钥生产.cer";
private static final String lklNotifyCerPath = "/home/manage/jcs/平台公钥生产.cer";*/
/**
* 拉卡拉报文加密对称性密钥

View File

@@ -40,22 +40,22 @@ public class KlkConstant {
/**
* bindAccount 分账关系绑定结果回调地址
*/
public static final String BIND_ACC_URL = "https://jcs-api.52o.site/api/mall/callback/applyBind";
public static final String BIND_ACC_URL = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/applyBind";
/**
* 提现结果回调地址
*/
public static final String WITHDRAWAL = "https://jcs-api.52o.site/api/mall/callback/withdrawal";
public static final String WITHDRAWAL = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/withdrawal";
/**
* 会员兑换码订单回调地址
*/
public static final String MEMBER_CODE_ORDER = "https://jcs-api.52o.site/api/mall/callback/codeOrder";
public static final String MEMBER_CODE_ORDER = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/codeOrder";
/**
* 材料订单回调地址
*/
public static final String MEMBER_ORDER = "https://jcs-api.52o.site/api/mall/callback/order";
public static final String MEMBER_ORDER = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/order";
/**
* 分账状态 处理中PROCESSING, 已受理ACCEPTED, 成功SUCCESS, 失败FAIL

View File

@@ -7,6 +7,7 @@ import com.lakala.zf.laop.java.sdk.demo.BaseCommonDemo;
import com.lkl.laop.sdk.LKLSDK;
import com.lkl.laop.sdk.exception.SDKException;
import com.lkl.laop.sdk.request.V3CcssCounterOrderCreateRequest;
import com.lkl.laop.sdk.request.model.V3CcssOrderOutSplitInfo;
import com.lkl.laop.sdk.request.model.V3CcssOrderSceneFieldInfo;
import java.math.BigDecimal;
@@ -21,6 +22,88 @@ import java.util.List;
public class LakalaUtils extends BaseCommonDemo {
*/
/**
* 聚合收银台创建订单
*
* @return
*//*
public static JSONObject createOrderPayment(String orderNo, BigDecimal payPrice, List<V3CcssOrderOutSplitInfo> splitInfoList) throws Exception {
doInit();
//创建订单请求参数
V3CcssCounterOrderCreateRequest request = new V3CcssCounterOrderCreateRequest();
//商户订单号
request.setOutOrderNo(orderNo);
//是否支持多次发起订单 0 不支持 1 支持
request.setSupportRepeatPay(1);
//银联商户号
request.setMerchantNo(KlkConstant.merchantNo);
//订单支付金额 单位:分
request.setTotalAmount(payPrice.multiply(new BigDecimal(100)).longValue());
//支付有效期 一天
request.setOrderEfficientTime(DateUtil.format(DateUtil.offsetDay(new Date(), 1), "yyyyMMddHHmmss"));
//回调地址
request.setNotifyUrl(KlkConstant.MEMBER_ORDER);
request.setSupportCancel(1);
request.setSupportRefund(1);
*/
/*request.setSplitMark("1");
request.setOutSplitInfo(splitInfoList);*//*
//支付类型
// req.setCounterParam("{\"pay_mode\":\"ALIPAY\"}");
// req.setBusiTypeParam("[{\"busi_type\":\"UPCARD\",\"params\":{\"crd_flg\":\"CRDFLG_D|CRDFLG_C|CRDFLG_OTH\"}},{\"busi_type\":\"SCPAY\",\"params\":{\"pay_mode\":\"WECHAT\",\"crd_flg\":\"CRDFLG_D\"}}]");
// 订单标题,在使用收银台扫码支付时必输入,交易时送往账户端
request.setOrderInfo("集材社订单支付");
List<String> sgnInfos = new ArrayList<>();
sgnInfos.add("1");
request.setSgnInfo(sgnInfos);
V3CcssOrderSceneFieldInfo.HbFqSceneInfo hbFqSceneInfo = new V3CcssOrderSceneFieldInfo.HbFqSceneInfo();
hbFqSceneInfo.setHbFqNum("3");
hbFqSceneInfo.setHbFqSellerPercent("0");
//3. 发送请求
String response = null;
try {
response = LKLSDK.httpPost(request);
} catch (SDKException e) {
throw new RuntimeException(e);
}
//4. 响应
System.out.println(response);
JSONObject jsonObject = JSONObject.parseObject(response);
if ("000000".equals(jsonObject.get("code"))) {
System.out.println(jsonObject.get("resp_data").toString());
} else {
System.out.println(jsonObject.get("msg").toString());
}
return jsonObject;
}
*/
/**
* 聚合收银台创建订单

View File

@@ -1,22 +1,28 @@
/*
package com.lakala.zf.laop.java.sdk.demo.utils;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.lakala.zf.laop.java.sdk.demo.BaseCommonDemo;
import com.lkl.laop.sdk.LKLSDK;
import com.lkl.laop.sdk.request.V3LabsRelationRefundRequest;
import com.lkl.laop.sdk.request.*;
import com.lkl.laop.sdk.utils.CommonUtil;
import javax.servlet.ServletException;
*/
/**
* @author Maosw
*/
public class V3LakalaOrderUtils extends BaseCommonDemo {
*//*
/*
*//**
public class V3LakalaUserUtils extends BaseCommonDemo {
*/
/**
* 根据卡号查询卡BIN信息
*//*
public static JSONObject cardBin(String acctNo) throws Exception {
doInit();
if (acctNo == null) {
@@ -27,13 +33,17 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
cardBin.setOrderNo(CommonUtil.getOrderNo());
cardBin.setOrgCode(KlkConstant.ORG_CODE);
cardBin.setCardNo(acctNo);
System.out.println("cardBin:"+cardBin);
String cardBinResponse = LKLSDK.httpPost(cardBin);
System.out.println(cardBinResponse);
return JSON.parseObject(cardBinResponse);
}
*//**
*/
/**
*附件上传
*//*
public static JSONObject uploadFile(V2MmsOpenApiUploadFile uploadFile) throws Exception {
doInit();
if (uploadFile == null) {
@@ -50,9 +60,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
return JSON.parseObject(uploadFileResponse);
}
*//**
*/
/**
* 分账接收方创建申请
*//*
public static JSONObject applyLedgerReceiver(V2MmsApplyLedgerReceiverRequest ledgerReceiver) throws Exception {
doInit();
if (ledgerReceiver == null) {
@@ -65,9 +77,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
return JSON.parseObject(uploadFileResponse);
}
*//**
*/
/**
* 查询提现申请详情
*//*
public static JSONObject queryWithdraw(V3SacsQueryRequest queryRequest) throws Exception {
doInit();
if (queryRequest == null) {
@@ -77,9 +91,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
return JSON.parseObject(response);
}
*//**
*/
/**
* 提现申请
*//*
public static JSONObject withdraw(V3SacsBalanceSeparateRequest separateRequest) throws Exception {
doInit();
if (separateRequest == null) {
@@ -89,9 +105,11 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
return JSON.parseObject(response);
}
*//**
*/
/**
*提款模式设置
*//*
public static JSONObject setWithdrawMode(V2LaepIndustryEwalletSettleProfileRequest ewalletSettleProfileRequest) throws Exception {
doInit();
if (ewalletSettleProfileRequest == null) {
@@ -99,11 +117,16 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
}
String response = LKLSDK.httpPost(ewalletSettleProfileRequest);
return JSON.parseObject(response);
}*/
}
/**
* 退款
*/
/* *//*
*/
/**
* 退款
*//*
*/
/*
public static JSONObject relationRefund(V3LabsRelationRefundRequest v3LabsRelationRefundRequest) throws Exception {
// 1. 配置初始化
doInit();
@@ -115,6 +138,8 @@ public class V3LakalaOrderUtils extends BaseCommonDemo {
//4. 响应
System.out.println(response);
return JSON.parseObject(response);
}
}*//*
}
*/

View File

@@ -16,24 +16,24 @@ public class BaseCommonDemo {
// 你的证书序列号
private static final String serialNo = "0195119ac8ac";
/*//商户私钥信息地址
//商户私钥信息地址
private static final String priKeyPath = "D:\\manage\\jcs\\OP10000499商户私钥.txt";
//拉卡拉支付平台证书地址
private static final String lklCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";
//拉卡拉支付平台证书地址2(用于拉卡拉通知验签)
private static final String lklNotifyCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";*/
private static final String lklNotifyCerPath = "D:\\manage\\jcs\\平台公钥生产.cer";
//商户私钥信息地址
private static final String priKeyPath = "/home/manage/jcs/OP10000499商户私钥.txt";
/*private static final String priKeyPath = "/home/manage/jcs/OP10000499商户私钥.txt";
//拉卡拉支付平台证书地址
private static final String lklCerPath = "/home/manage/jcs/平台公钥生产.cer";
//拉卡拉支付平台证书地址2(用于拉卡拉通知验签)
private static final String lklNotifyCerPath = "/home/manage/jcs/平台公钥生产.cer";
private static final String lklNotifyCerPath = "/home/manage/jcs/平台公钥生产.cer";*/
/**
* 拉卡拉报文加密对称性密钥

View File

@@ -40,22 +40,22 @@ public class KlkConstant {
/**
* bindAccount 分账关系绑定结果回调地址
*/
public static final String BIND_ACC_URL = "https://jcs-api.52o.site/api/mall/callback/applyBind";
public static final String BIND_ACC_URL = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/applyBind";
/**
* 提现结果回调地址
*/
public static final String WITHDRAWAL = "https://jcs-api.52o.site/api/mall/callback/withdrawal";
public static final String WITHDRAWAL = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/withdrawal";
/**
* 会员兑换码订单回调地址
*/
public static final String MEMBER_CODE_ORDER = "https://jcs-api.52o.site/api/mall/callback/codeOrder";
public static final String MEMBER_CODE_ORDER = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/codeOrder";
/**
* 材料订单回调地址
*/
public static final String MEMBER_ORDER = "https://jcs-api.52o.site/api/mall/callback/order";
public static final String MEMBER_ORDER = "https://jcsapi-new.52o.site/jcsapi/api/mall/callback/order";
/**
* 分账状态 处理中PROCESSING, 已受理ACCEPTED, 成功SUCCESS, 失败FAIL

View File

@@ -3,6 +3,7 @@ package com.lakala.zf.laop.java.sdk.demo.utils;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.lakala.zf.laop.java.sdk.demo.BaseCommonDemo;
import com.lakala.zf.laop.java.sdk.demo.v3.V3LabsRelationRefundRequest;
import com.lkl.laop.sdk.LKLSDK;
import com.lkl.laop.sdk.request.*;
import com.lkl.laop.sdk.utils.CommonUtil;
@@ -102,9 +103,9 @@ public class V3LakalaUserUtils extends BaseCommonDemo {
return JSON.parseObject(response);
}
/* *//**
* 退款
*//*
/**
* 提款模式查询
*/
public static JSONObject relationRefund(V3LabsRelationRefundRequest v3LabsRelationRefundRequest) throws Exception {
// 1. 配置初始化
doInit();
@@ -116,6 +117,6 @@ public class V3LakalaUserUtils extends BaseCommonDemo {
//4. 响应
System.out.println(response);
return JSON.parseObject(response);
}*/
}
}

View File

@@ -0,0 +1,166 @@
package com.lakala.zf.laop.java.sdk.demo.v3;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.lkl.laop.sdk.enums.FunctionCodeEnum;
import com.lkl.laop.sdk.request.V3CommRequest;
import com.lkl.laop.sdk.request.model.V3LabsTradeLocationInfo;
/**
* @author nxj
* @date 2023/7/21 14:07
* @description v3退款交易
*/
public class V3LabsRelationRefundRequest extends V3CommRequest {
/**
* 商户号
* M
* 拉卡拉分配的商户号
*/
@JsonProperty("merchant_no")
private String merchantNo;
/**
* 终端号
* M
* 拉卡拉分配的业务终端号
*/
@JsonProperty("term_no")
private String termNo;
/**
* 商户交易流水号
* M
* 商户系统唯一
*/
@JsonProperty("out_trade_no")
private String outTradeNo;
/**
* 退款金额
* M
* 单位分,整数数字型字符
*/
@JsonProperty("refund_amount")
private String refundAmount;
/**
* 退款原因
* M
* 退款原因描述
*/
@JsonProperty("refund_reason")
private String refundReason;
/**
* 原商户交易流水号
* C
* 下单时的商户请求流水号退款时origin_out_trade_noorigin_trade_noorigin_log_no必送其一
*/
@JsonProperty("origin_out_trade_no")
private String originOutTradeNo;
/**
* 原拉卡拉交易流水号
* C
* 下单成功时,返回的拉卡拉交易流水。 origin_out_trade_no、origin_log_no、origin_trade_no至少一个必填
* (调用收银台下单接口拉起交易后发起退款时至少要传两个),同时存在时优先级顺序如下: origin_trade_no、origin_log_no、origin_out_trade_no。
*/
@JsonProperty("origin_trade_no")
private String originTradeNo;
/**
* 原对账单流水号
* C
* 对账单中的交易流水。 origin_out_trade_no、origin_log_no、origin_trade_no至少一个必填
* (调用收银台下单接口拉起交易后发起退款时至少要传两个,同时存在时优先级顺序如下: origin_trade_no、origin_log_no、origin_out_trade_no。
*/
@JsonProperty("origin_log_no")
private String originLogNo;
/**
* 地址位置信息
* M
* 地址位置信息,风控要求必送
*/
@JsonProperty("location_info")
private V3LabsTradeLocationInfo locationInfo;
public String getMerchantNo() {
return merchantNo;
}
public void setMerchantNo(String merchantNo) {
this.merchantNo = merchantNo;
}
public String getTermNo() {
return termNo;
}
public void setTermNo(String termNo) {
this.termNo = termNo;
}
public String getOutTradeNo() {
return outTradeNo;
}
public void setOutTradeNo(String outTradeNo) {
this.outTradeNo = outTradeNo;
}
public String getRefundAmount() {
return refundAmount;
}
public void setRefundAmount(String refundAmount) {
this.refundAmount = refundAmount;
}
public String getRefundReason() {
return refundReason;
}
public void setRefundReason(String refundReason) {
this.refundReason = refundReason;
}
public String getOriginOutTradeNo() {
return originOutTradeNo;
}
public void setOriginOutTradeNo(String originOutTradeNo) {
this.originOutTradeNo = originOutTradeNo;
}
public String getOriginTradeNo() {
return originTradeNo;
}
public void setOriginTradeNo(String originTradeNo) {
this.originTradeNo = originTradeNo;
}
public String getOriginLogNo() {
return originLogNo;
}
public void setOriginLogNo(String originLogNo) {
this.originLogNo = originLogNo;
}
public V3LabsTradeLocationInfo getLocationInfo() {
return locationInfo;
}
public void setLocationInfo(V3LabsTradeLocationInfo locationInfo) {
this.locationInfo = locationInfo;
}
@Override
public FunctionCodeEnum getFunctionCode() {
return FunctionCodeEnum.API_V3_LABS_RELATION_REFUND;
}
}

View File

@@ -83,6 +83,21 @@
<version>3.17.0</version>
</dependency>
<!-- 腾讯云COS-STS -->
<dependency>
<groupId>com.qcloud</groupId>
<artifactId>cos-sts_api</artifactId>
<version>${com.qcloud.version}</version>
<scope>compile</scope>
</dependency>
<!-- 腾讯云内容安全 -->
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>${tencentcloudapi.version}</version>
</dependency>
</dependencies>
<build>

View File

@@ -4,8 +4,8 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.core.utils.TxApiSdkUtils;
import org.dromara.web.common.ServerResponseEntity;
import org.dromara.web.utils.TxApiSdkUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

View File

@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
import com.lakala.zf.laop.java.sdk.demo.BaseCommonDemo;
import com.lakala.zf.laop.java.sdk.demo.utils.KlkConstant;
import com.lakala.zf.laop.java.sdk.demo.utils.V3LakalaUserUtils;
import com.lkl.laop.sdk.LKLSDK;
import com.lkl.laop.sdk.request.V2LaepIndustryEwalletSettleProfileRequest;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -152,7 +151,7 @@ public class ApiCallbackController extends BaseCommonDemo {
// 1. 配置初始化
doInit();
LKLSDK.notificationHandle(getBody(request), getAuthorization(request));
// LKLSDK.notificationHandle(getBody(request), getAuthorization(request));
String body = getBody(request);
// 业务处理

View File

@@ -8,6 +8,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.validate.QueryGroup;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.mall.domain.TzUserSearch;
@@ -17,11 +18,14 @@ import org.dromara.mall.domain.bo.TzNoticeBo;
import org.dromara.mall.domain.bo.TzPictureAlbumBo;
import org.dromara.mall.domain.vo.*;
import org.dromara.mall.service.*;
import org.dromara.system.domain.vo.SysDictDataVo;
import org.dromara.system.service.ISysDictTypeService;
import org.dromara.web.common.SecurityUtils;
import org.dromara.web.common.ServerResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
@@ -44,6 +48,8 @@ public class ApiIndexController {
private final ITzNoticeService tzNoticeService;
private final ISysDictTypeService dictTypeService;
@GetMapping("/indexImgs")
@Operation(summary = "首页轮播图" , description = "获取首页轮播图列表信息")
public ServerResponseEntity<List<TzIndexImgVo>> indexImgs() {
@@ -102,4 +108,18 @@ public class ApiIndexController {
return ServerResponseEntity.success(noticeDetail);
}
/**
* 根据字典类型查询字典数据信息
*
* @param dictType 字典类型
*/
@GetMapping(value = "/type/{dictType}")
public R<List<SysDictDataVo>> dictType(@PathVariable String dictType) {
List<SysDictDataVo> data = dictTypeService.selectDictDataByType(dictType);
if (ObjectUtil.isNull(data)) {
data = new ArrayList<>();
}
return R.ok(data);
}
}

View File

@@ -215,17 +215,45 @@ public class ApiProdController {
}
@GetMapping("/categoryInfo")
@Operation(summary = "分类信息列表", description = "获取所有的产品分类信息顶级分类的parentId为0,默认为顶级分类")
@Operation(summary = "根据父级ID获取分类信息列表", description = "获取所有的产品分类信息顶级分类的parentId为0,默认为顶级分类")
@Parameter(name = "parentId", description = "分类ID")
public ServerResponseEntity<List<TzCategoryVo>> categoryInfo(@RequestParam(value = "parentId", defaultValue = "0") Long parentId) {
List<TzCategoryVo> categories = categoryService.listByParentId(parentId);
return ServerResponseEntity.success(categories);
}
@GetMapping("/categoryByAncestors")
@Operation(summary = "根据祖级ID获取分类信息列表", description = "获取所有的产品分类信息顶级分类的ancestors为0,默认为顶级分类")
@Parameter(name = "ancestors", description = "祖级ID")
public ServerResponseEntity<List<TzCategoryVo>> categoryByAncestors(@RequestParam(value = "ancestors", defaultValue = "0") String ancestors) {
List<TzCategoryVo> categories = categoryService.listByAncestors(ancestors);
return ServerResponseEntity.success(categories);
}
@PostMapping("/searchProdPage")
@Operation(summary = "分页排序搜索商品", description = "根据商品名搜索")
@Parameters({@Parameter(name = "categoryId", description = "分类ID"),@Parameter(name = "prodName", description = "商品名"), @Parameter(name = "floor", description = "是否特价 1是 2", required = true),@Parameter(name = "sort", description = "排序(0综合 1价格排序 2热门 3新品)", required = true), @Parameter(name = "orderBy", description = "排序(0升序 1降序)--sort选择1时必传")})
public ServerResponseEntity<IPage<TzProdVo>> searchProdPage(@RequestBody PageQuery pageQuery, @RequestParam(value = "categoryId") Long categoryId, @RequestParam(value = "prodName") String prodName, @RequestParam(value = "floor") Integer floor, @RequestParam(value = "sort") Integer sort, @RequestParam(value = "orderBy") Integer orderBy) {
@Parameters({
@Parameter(name = "categoryId", description = "分类ID"),
@Parameter(name = "prodName", description = "商品名"),
@Parameter(name = "envLevel", description = "环保等级", required = false),
@Parameter(name = "fireLevel", description = "防火等级", required = false),
@Parameter(name = "trialScenario", description = "试用场景", required = false),
@Parameter(name = "label", description = "标签 0默认 1性价比 2品质款 3旗舰款", required = false),
@Parameter(name = "floor", description = "是否特价 1是 2", required = true),
@Parameter(name = "sort", description = "排序(0综合 1价格排序 2热门 3新品)", required = true),
@Parameter(name = "orderBy", description = "排序(0升序 1降序)--sort选择1时必传")
})
public ServerResponseEntity<IPage<TzProdVo>> searchProdPage(
@RequestBody PageQuery pageQuery,
@RequestParam(value = "categoryId") Long categoryId,
@RequestParam(value = "prodName") String prodName,
@RequestParam(value = "envLevel", required = false) String envLevel,
@RequestParam(value = "fireLevel", required = false) String fireLevel,
@RequestParam(value = "trialScenario", required = false) String trialScenario,
@RequestParam(value = "label", required = false) Integer label,
@RequestParam(value = "floor") Integer floor,
@RequestParam(value = "sort") Integer sort,
@RequestParam(value = "orderBy") Integer orderBy) {
Long userId = SecurityUtils.getUserInfo();
//用户个人搜索关键词叠加
if (ObjectUtil.isNotEmpty(userId)) {
@@ -233,7 +261,14 @@ public class ApiProdController {
}
//热搜关键词次数叠加
hotSearchService.setSearchNum(prodName);
return ServerResponseEntity.success(prodService.getSearchProdPageByProdName(pageQuery, categoryId, prodName, floor, sort, orderBy));
return ServerResponseEntity.success(prodService.getSearchProdPageByProdName(pageQuery, categoryId, prodName, envLevel, fireLevel, trialScenario, label, floor, sort, orderBy));
}
@GetMapping("/prodCommPage")
@Operation(summary = "商品评论列表", description = "查询商品评论列表")
public ServerResponseEntity<IPage<TzProdCommVo>> getMyWithdrawList(TzProdCommBo bo, PageQuery pageQuery) {
return ServerResponseEntity.success(prodCommService.selectPageList(bo, pageQuery));
}
@PostMapping("/prodCommByProdId")

View File

@@ -0,0 +1,189 @@
package org.dromara.web.utils;
import cn.hutool.core.codec.Base64;
import com.tencent.cloud.CosStsClient;
import com.tencent.cloud.Policy;
import com.tencent.cloud.Response;
import com.tencent.cloud.Statement;
import com.tencent.cloud.cos.util.Jackson;
import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.ims.v20201229.ImsClient;
import com.tencentcloudapi.ims.v20201229.models.ImageModerationRequest;
import com.tencentcloudapi.ims.v20201229.models.ImageModerationResponse;
import com.tencentcloudapi.sms.v20210111.SmsClient;
import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
import com.tencentcloudapi.tms.v20201229.TmsClient;
import com.tencentcloudapi.tms.v20201229.models.TextModerationRequest;
import com.tencentcloudapi.tms.v20201229.models.TextModerationResponse;
import java.util.TreeMap;
public class TxApiSdkUtils
{
private static final String SMS_SECRET_ID = "AKIDMcmoeNr64nIpicWBYeU6TaR8h280uyAF";
private static final String SMS_SECRET_KEY = "yg8JEzVmriLjtqZ3KURUIrDRQ9euxmbI";
/**
* 获取上传临时密钥
*/
public void getCredential() {
TreeMap<String, Object> config = new TreeMap<String, Object>();
try {
//这里的 SecretId 和 SecretKey 代表了用于申请临时密钥的永久身份(主账号、子账号等),子账号需要具有操作存储桶的权限。
String secretId = System.getenv(SMS_SECRET_ID);
String secretKey = System.getenv(SMS_SECRET_KEY);
// 替换为您的云 api 密钥 SecretId
config.put("secretId", secretId);
// 替换为您的云 api 密钥 SecretKey
config.put("secretKey", secretKey);
// 初始化 policy
Policy policy = new Policy();
// 临时密钥有效时长,单位是秒,默认 1800 秒,目前主账号最长 2 小时(即 7200 秒),子账号最长 36 小时(即 129600
config.put("durationSeconds", 1800);
// 换成您的 bucket
config.put("bucket", "examplebucket-1250000000");
// 换成 bucket 所在地区
config.put("region", "ap-shanghai");
// 开始构建一条 statement
Statement statement = new Statement();
// 声明设置的结果是允许操作
statement.setEffect("allow");
statement.addActions(new String[]{
"cos:PutObject",
// 表单上传、小程序上传
"cos:PostObject",
// 分块上传
"cos:InitiateMultipartUpload",
"cos:ListMultipartUploads",
"cos:ListParts",
"cos:UploadPart",
"cos:CompleteMultipartUpload",
// 处理相关接口一般为数据万象产品 权限中以ci开头
// 创建媒体处理任务
"ci:CreateMediaJobs",
// 文件压缩
"ci:CreateFileProcessJobs"
});
statement.addResources(new String[]{
"qcs::cos:ap-chongqing:uid/1250000000:examplebucket-1250000000/*",
"qcs::ci:ap-chongqing:uid/1250000000:bucket/examplebucket-1250000000/*"});
// 把一条 statement 添加到 policy 可以添加多条
policy.addStatement(statement);
// 将 Policy 示例转化成 String可以使用任何 json 转化方式,这里是本 SDK 自带的推荐方式
config.put("policy", Jackson.toJsonPrettyString(policy));
Response response = CosStsClient.getCredential(config);
} catch (Exception e) {
throw new IllegalArgumentException("no valid secret !");
}
}
/**
* 腾讯云文件安全检测
* @param content
* @return
*/
public static String checkContext(String content){
try{
Credential cred = new Credential(SMS_SECRET_ID, SMS_SECRET_KEY);
// 实例化一个http选项可选的没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("tms.ap-shanghai.tencentcloudapi.com");
// 实例化一个client选项可选的没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
TmsClient client = new TmsClient(cred, "ap-shanghai", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
TextModerationRequest req = new TextModerationRequest();
String str = Base64.encode(content);
req.setContent(str);
// 返回的resp是一个TextModerationResponse的实例与请求对象对应
TextModerationResponse resp = client.TextModeration(req);
// 输出json格式的字符串回包
return AbstractModel.toJsonString(resp);
} catch (TencentCloudSDKException e) {
throw new IllegalArgumentException("文件检测接口异常");
}
}
/**
* 腾讯云图片安全检测
* @param imgUrl
* @return
*/
public static String checkImages(String imgUrl){
try{
Credential cred = new Credential(SMS_SECRET_ID, SMS_SECRET_KEY);
// 实例化一个http选项可选的没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("ims.ap-shanghai.tencentcloudapi.com");
// 实例化一个client选项可选的没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
ImsClient client = new ImsClient(cred, "ap-shanghai", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象jkighjkhgkhgkhgjhghkjj
ImageModerationRequest req = new ImageModerationRequest();
req.setFileUrl(imgUrl);
// 返回的resp是一个ImageModerationResponse的实例与请求对象对应
ImageModerationResponse resp = client.ImageModeration(req);
// 输出json格式的字符串回包
return AbstractModel.toJsonString(resp);
} catch (TencentCloudSDKException e) {
throw new IllegalArgumentException("文件检测接口异常");
}
}
/**
* 腾讯云发送短信
* @param phoneNumber
* @param code
* @return
*/
public static String sendSmsMsg(String phoneNumber, String code){
try{
Credential cred = new Credential(SMS_SECRET_ID, SMS_SECRET_KEY);
// 实例化一个http选项可选的没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("sms.tencentcloudapi.com");
// 实例化一个client选项可选的没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
SmsClient client = new SmsClient(cred, "ap-nanjing", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
SendSmsRequest req = new SendSmsRequest();
String[] phoneNumberSet1 = {phoneNumber};
req.setPhoneNumberSet(phoneNumberSet1);
req.setSmsSdkAppId("1400926380");
req.setTemplateId("2222045");
req.setSignName("合肥小图科技");
String[] templateParamSet1 = {code};
req.setTemplateParamSet(templateParamSet1);
// 返回的resp是一个SendSmsResponse的实例与请求对象对应
SendSmsResponse resp = client.SendSms(req);
// 输出json格式的字符串回包
return AbstractModel.toJsonString(resp);
} catch (TencentCloudSDKException e) {
throw new IllegalArgumentException("短信接口异常");
}
}
}

View File

@@ -52,9 +52,9 @@ spring:
# url: jdbc:mysql://localhost:3306/jcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
# username: root
# password: root
url: jdbc:mysql://erp9.52o.site:13308/jcs20250106?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: jcs20250106
password: esXkafdSMsxRAkNe
url: jdbc:mysql://erp9.52o.site:13308/jcs20250512?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: jcs20250512
password: rdnGT3TFYFnMzstX
# 从库数据源
slave:
lazy: false

View File

@@ -55,9 +55,9 @@ spring:
# url: jdbc:mysql://localhost:3306/cailiao?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
# username: root
# password: root
url: jdbc:mysql://localhost:3306/jcs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: root
password: root
url: jdbc:mysql://erp9.52o.site:13308/jcs20250512?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: jcs20250512
password: rdnGT3TFYFnMzstX
# 从库数据源
slave:
lazy: false

View File

@@ -139,12 +139,12 @@
<version>5.3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<!--<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-pay-new</artifactId>
<version>5.3.0</version>
<scope>compile</scope>
</dependency>
</dependency>-->
</dependencies>
</project>

View File

@@ -22,7 +22,6 @@ import org.dromara.mall.domain.bo.TzSkuBo;
import org.dromara.mall.domain.vo.TzProdSumVo;
import org.dromara.mall.domain.vo.TzProdVo;
import org.dromara.mall.service.ITzProdService;
import org.dromara.mall.service.ITzSkuService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -42,8 +41,6 @@ public class TzProdController extends BaseController {
private final ITzProdService tzProdService;
private final ITzSkuService tzSkuService;
/**
* 查询商品列表
*/

View File

@@ -30,9 +30,9 @@ public class TzCategory extends BaseEntity {
private Long categoryId;
/**
* 店铺ID
* 祖级列表
*/
private Long shopId;
private String ancestors;
/**
* 父节点

View File

@@ -212,4 +212,19 @@ public class TzProd extends TenantEntity {
*/
private String remark;
/**
* 环保等级
*/
private String envLevel;
/**
* 防火等级
*/
private String fireLevel;
/**
* 试用场景
*/
private String trialScenario;
}

View File

@@ -33,6 +33,11 @@ public class TzProdComm extends TenantEntity {
*/
private Long prodId;
/**
* 商品名称
*/
private String prodName;
/**
* 订单 ID
*/
@@ -83,5 +88,10 @@ public class TzProdComm extends TenantEntity {
*/
private Long delFlag;
/**
* 浏览量
*/
private Long num;
}

View File

@@ -30,9 +30,9 @@ public class TzCategoryBo extends BaseEntity {
private Long categoryId;
/**
* 店铺ID
* 祖级列表
*/
private Long shopId;
private String ancestors;
/**
* 父节点

View File

@@ -217,4 +217,19 @@ public class TzProdBo extends TenantEntity {
*/
private String remark;
/**
* 环保等级(查询多值时逗号隔开)
*/
private String envLevel;
/**
* 防火等级(查询多值时逗号隔开)
*/
private String fireLevel;
/**
* 试用场景(查询多值时逗号隔开)
*/
private String trialScenario;
}

View File

@@ -32,6 +32,11 @@ public class TzProdCommBo extends BaseEntity {
@NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
private Long prodId;
/**
* 商品名称
*/
private String prodName;
/**
* 订单 ID
*/
@@ -82,5 +87,15 @@ public class TzProdCommBo extends BaseEntity {
*/
private Integer delFlag;
/**
* 浏览量
*/
private Long num;
/**
* 排序 1-最新2-最热
*/
private Integer sort;
}

View File

@@ -104,6 +104,12 @@ public class HyBasketVo implements Serializable {
@ExcelProperty(value = "SKU图片")
private String pic;
/**
* 指导价
*/
@ExcelProperty(value = "指导价")
private BigDecimal guidingPrice;
/**
* SKU成本价格
*/

View File

@@ -153,6 +153,12 @@ public class HyOrderItemVo implements Serializable {
@ExcelProperty(value = "付款金额")
private BigDecimal payPrice;
/**
* 指导价
*/
@ExcelProperty(value = "指导价")
private BigDecimal guidingPrice;
/**
* 支付状态 1:待支付 2:未付清 3:已付清
*/

View File

@@ -33,10 +33,10 @@ public class TzCategoryVo implements Serializable {
private Long categoryId;
/**
* 店铺ID
* 祖级列表
*/
@ExcelProperty(value = "店铺ID")
private Long shopId;
@ExcelProperty(value = "祖级列表")
private String ancestors;
/**
* 父节点

View File

@@ -8,6 +8,7 @@ import org.dromara.mall.domain.TzProdComm;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@@ -109,5 +110,21 @@ public class TzProdCommVo implements Serializable {
@ExcelProperty(value = "评论时间")
private Date createTime;
/**
* 浏览量
*/
@ExcelProperty(value = "浏览量")
private Long num;
/**
* 商品指导价
*/
private BigDecimal guidingPrice;
/**
* 商品展示价
*/
private BigDecimal price;
}

View File

@@ -289,5 +289,20 @@ public class TzProdVo implements Serializable {
@ExcelProperty(value = "备注")
private String remark;
/**
* 环保等级
*/
private String envLevel;
/**
* 防火等级
*/
private String fireLevel;
/**
* 试用场景
*/
private String trialScenario;
}

View File

@@ -60,7 +60,7 @@ public interface TzProdMapper extends BaseMapperPlus<TzProd, TzProdVo>, MPJBaseM
* @param orderBy
* @return
*/
IPage<TzProdVo> getSearchProdPageByProdName(@Param("page") IPage<TzProdBo> page, @Param("categoryId") Long categoryId, @Param("prodName") String prodName, @Param("floor") Integer floor, @Param("sort") Integer sort, @Param("orderBy") Integer orderBy);
IPage<TzProdVo> getSearchProdPageByProdName(@Param("page") IPage<TzProdBo> page, @Param("categoryId") Long categoryId, @Param("prodName") String prodName, @Param("envLevel") String envLevel, @Param("fireLevel") String fireLevel, @Param("trialScenario") String trialScenario, @Param("label") Integer label, @Param("floor") Integer floor, @Param("sort") Integer sort, @Param("orderBy") Integer orderBy);
/**

View File

@@ -68,4 +68,11 @@ public interface ITzCategoryService {
* @return
*/
List<TzCategoryVo> categoryAll();
/**
* 分类信息列表
* @param ancestors
* @return
*/
List<TzCategoryVo> listByAncestors(String ancestors);
}

View File

@@ -91,4 +91,12 @@ public interface ITzProdCommService {
* @return 商品评论分页列表
*/
IPage<TzProdCommVo> queryPageListByUser(TzProdCommBo bo, PageQuery pageQuery);
/**
* 查询商品评论列表
*
* @param bo 查询条件
* @return 商品评论列表
*/
IPage<TzProdCommVo> selectPageList(TzProdCommBo bo, PageQuery pageQuery);
}

View File

@@ -108,7 +108,7 @@ public interface ITzProdService extends MPJBaseService<TzProd> {
* @param orderBy
* @return
*/
IPage<TzProdVo> getSearchProdPageByProdName(PageQuery pageQuery, Long categoryId, String prodName, Integer floor, Integer sort, Integer orderBy);
IPage<TzProdVo> getSearchProdPageByProdName(PageQuery pageQuery, Long categoryId, String prodName, String envLevel, String fireLevel, String trialScenario, Integer label, Integer floor, Integer sort, Integer orderBy);
/**
* 商品收藏

View File

@@ -85,6 +85,7 @@ public class HyBasketServiceImpl extends MPJBaseServiceImpl<HyBasketMapper,HyBas
.selectAll(HyBasket.class)
.select(TzProd::getProdCode, TzProd::getProdName, TzProd::getPic, TzProd::getUnit)
.select(TzSku::getSkuCode, TzSku::getSkuFactoryCode, TzSku::getSkuName)
.selectAs(TzProd::getGuidingPrice, HyBasketVo::getGuidingPrice)
.selectAs(TzSku::getPrice, HyBasketVo::getOriPrice)
.leftJoin(TzProd.class, TzProd::getProdId, HyBasket::getProdId)
.leftJoin(TzSku.class, TzSku::getSkuId, HyBasket::getSkuId)

View File

@@ -8,9 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.lakala.zf.laop.java.sdk.demo.utils.KlkConstant;
import com.lakala.zf.laop.java.sdk.demo.utils.V3LakalaOrderUtils;
import com.lakala.zf.laop.java.sdk.demo.utils.V3LakalaUserUtils;
import com.lkl.laop.sdk.request.V3LabsRelationRefundRequest;
import com.lakala.zf.laop.java.sdk.demo.v3.V3LabsRelationRefundRequest;
import com.lkl.laop.sdk.request.V3SacsBalanceSeparateRequest;
import com.lkl.laop.sdk.request.model.V3LabsTradeLocationInfo;
import lombok.RequiredArgsConstructor;
@@ -147,7 +146,7 @@ public class HyOrderItemServiceImpl extends MPJBaseServiceImpl<HyOrderItemMapper
MPJLambdaWrapper<HyOrderItem> wrapper = buildQueryWrapper(bo)
.selectAll(HyOrderItem.class)
.select(TzProd::getProdName, TzProd::getPic,TzProd::getUnit)
.select(TzSku::getSkuName, TzSku::getPrice)
.select(TzSku::getSkuName, TzSku::getPrice,TzSku::getGuidingPrice)
.leftJoin(TzProd.class, TzProd::getProdId, HyOrderItem::getProdId)
.leftJoin(TzSku.class, TzSku::getSkuId, HyOrderItem::getSkuId)
.orderByDesc(HyOrderItem::getCreateTime);
@@ -382,7 +381,7 @@ public class HyOrderItemServiceImpl extends MPJBaseServiceImpl<HyOrderItemMapper
MPJLambdaWrapper<HyOrderItem> wrapper = new MPJLambdaWrapper<HyOrderItem>()
.selectAll(HyOrderItem.class)
.select(TzProd::getProdName, TzProd::getPic,TzProd::getUnit)
.select(TzSku::getSkuName, TzSku::getPrice)
.select(TzSku::getSkuName, TzSku::getPrice, TzSku::getGuidingPrice)
.leftJoin(TzProd.class, TzProd::getProdId, HyOrderItem::getProdId)
.leftJoin(TzSku.class, TzSku::getSkuId, HyOrderItem::getSkuId)
.eq(HyOrderItem::getId, orderId)
@@ -526,7 +525,7 @@ public class HyOrderItemServiceImpl extends MPJBaseServiceImpl<HyOrderItemMapper
MPJLambdaWrapper<HyOrderItem> wrapper = new MPJLambdaWrapper<HyOrderItem>()
.selectAll(HyOrderItem.class)
.select(TzProd::getProdName, TzProd::getPic,TzProd::getUnit)
.select(TzSku::getSkuName)
.select(TzSku::getSkuName, TzSku::getGuidingPrice)
.leftJoin(TzProd.class, TzProd::getProdId, HyOrderItem::getProdId)
.leftJoin(TzSku.class, TzSku::getSkuId, HyOrderItem::getSkuId)
.eq(HyOrderItem::getOrderId, orderId)
@@ -836,7 +835,7 @@ public class HyOrderItemServiceImpl extends MPJBaseServiceImpl<HyOrderItemMapper
V3LabsTradeLocationInfo v3LabsTradeLocationInfo = new V3LabsTradeLocationInfo("124.223.107.31", null, null);
v3LabsRelationRefundRequest.setLocationInfo(v3LabsTradeLocationInfo);
JSONObject jsonObject1 = V3LakalaOrderUtils.relationRefund(v3LabsRelationRefundRequest);
JSONObject jsonObject1 = V3LakalaUserUtils.relationRefund(v3LabsRelationRefundRequest);
if ("BBS00000".equals(jsonObject1.getString("code"))) {
// 更新主订单付款金额
boolean orderResult = orderMapper.update(null,

View File

@@ -8,9 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.lakala.zf.laop.java.sdk.demo.utils.KlkConstant;
import com.lakala.zf.laop.java.sdk.demo.utils.V3LakalaOrderUtils;
import com.lakala.zf.laop.java.sdk.demo.utils.V3LakalaUserUtils;
import com.lkl.laop.sdk.request.V3LabsRelationRefundRequest;
import com.lakala.zf.laop.java.sdk.demo.v3.V3LabsRelationRefundRequest;
import com.lkl.laop.sdk.request.V3SacsBalanceSeparateRequest;
import com.lkl.laop.sdk.request.model.V3LabsTradeLocationInfo;
import lombok.RequiredArgsConstructor;
@@ -475,7 +474,7 @@ public class HyOrderServiceImpl extends MPJBaseServiceImpl<HyOrderMapper, HyOrde
V3LabsTradeLocationInfo v3LabsTradeLocationInfo = new V3LabsTradeLocationInfo("124.223.107.31", null, null);
v3LabsRelationRefundRequest.setLocationInfo(v3LabsTradeLocationInfo);
JSONObject jsonObject1 = V3LakalaOrderUtils.relationRefund(v3LabsRelationRefundRequest);
JSONObject jsonObject1 = V3LakalaUserUtils.relationRefund(v3LabsRelationRefundRequest);
if ("BBS00000".equals(jsonObject1.getString("code"))) {
// 更新主订单状态为已取消
boolean orderResult = baseMapper.update(null,

View File

@@ -63,14 +63,14 @@ public class TzBankCardServiceImpl extends BaseCommonDemo implements ITzBankCard
private final TzUserMapper userMapper;
/* private static String basePath = "D:\\lkl\\createFile\\";
private static String basePath = "D:\\lkl\\createFile\\";
private static String urlPrefix = "D:\\lkl\\file\\";*/
private static String urlPrefix = "D:\\lkl\\file\\";
private static String basePath = "/home/manage/jcs/createFile/";
/*private static String basePath = "/home/manage/jcs/createFile/";
private static String urlPrefix = "/home/manage/jcs/file/";
private static String urlPrefix = "/home/manage/jcs/file/";*/
/**
* 1-身份证正面 2-身份证反面 3-银行卡 4-营业执照 5-合作协议-纸质版 6-合作协议-电子版

View File

@@ -75,14 +75,14 @@ public class TzCategoryServiceImpl implements ITzCategoryService {
bo.setGrade(category.getGrade()+1);
category.setSubset(1);
baseMapper.updateById(category);
bo.setAncestors(category.getAncestors()+StringUtils.SEPARATOR+category.getCategoryId());
}else{
bo.setAncestors("0");
}
bo.setRecTime(new Date());
TzCategory add = MapstructUtils.convert(bo, TzCategory.class);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setCategoryId(add.getCategoryId());
}
return flag;
return baseMapper.insert(add) > 0;
}
/**
@@ -98,13 +98,15 @@ public class TzCategoryServiceImpl implements ITzCategoryService {
bo.setGrade(category.getGrade()+1);
category.setSubset(1);
baseMapper.updateById(category);
bo.setAncestors(category.getAncestors()+StringUtils.SEPARATOR+category.getCategoryId());
}else{
bo.setAncestors("0");
}
TzCategory update = MapstructUtils.convert(bo, TzCategory.class);
return baseMapper.updateById(update) > 0;
}
/**
* 校验并批量删除产品类目信息
*
@@ -117,15 +119,24 @@ public class TzCategoryServiceImpl implements ITzCategoryService {
return baseMapper.deleteByIds(ids) > 0;
}
/**
* 根据父级ID查询子类信息
*/
@Override
public List<TzCategoryVo> listByParentId(Long parentId) {
return baseMapper.selectVoList(new LambdaQueryWrapper<TzCategory>().eq(TzCategory::getParentId, parentId).eq(TzCategory::getStatus,1));
}
/**
* 分类信息列表
*/
@Override
public List<TzCategoryVo> listByAncestors(String ancestors) {
return baseMapper.selectVoList(new LambdaQueryWrapper<TzCategory>().like(TzCategory::getAncestors, ancestors).eq(TzCategory::getStatus,1));
}
/**
* 全部分类信息列表
*
* @return
*/
@Override
public List<TzCategoryVo> categoryAll() {

View File

@@ -1,6 +1,7 @@
package org.dromara.mall.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -41,7 +42,6 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
private final HyOrderMapper orderMapper;
/**
* 查询商品评论
*
@@ -50,7 +50,16 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
*/
@Override
public TzProdCommVo queryById(Long id){
return baseMapper.selectVoById(id);
TzProdCommVo tzProdCommVo = baseMapper.selectVoById(id);
TzUser user = userMapper.selectById(tzProdCommVo.getUserId());
if(user != null) {
tzProdCommVo.setUserAvatar(user.getPic());
tzProdCommVo.setUserName(user.getRealName());
}
//设置浏览量+1
baseMapper.update(new LambdaUpdateWrapper<TzProdComm>().eq(TzProdComm::getId, id).setIncrBy(TzProdComm::getNum, 1));
return tzProdCommVo;
}
/**
@@ -68,6 +77,37 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
return TableDataInfo.build(result);
}
/**
* 查询商品评论列表
*
* @param bo 查询条件
* @param pageQuery
* @return 商品评论列表
*/
@Override
public IPage<TzProdCommVo> selectPageList(TzProdCommBo bo, PageQuery pageQuery) {
bo.setDelFlag(1);
bo.setStatus(1);
LambdaQueryWrapper<TzProdComm> lqw = buildQueryWrapper(bo);
IPage<TzProdCommVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
// 获取评论用户头像
for(TzProdCommVo vo : page.getRecords()) {
TzUser user = userMapper.selectById(vo.getUserId());
if(user != null) {
vo.setUserAvatar(user.getPic());
vo.setUserName(user.getRealName());
}
TzProd prod = prodMapper.selectById(vo.getProdId());
if(prod != null) {
vo.setGuidingPrice(prod.getGuidingPrice());
vo.setPrice(prod.getPrice());
}
}
return page;
}
/**
* 查询符合条件的商品评论列表
*
@@ -111,6 +151,7 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<TzProdComm> lqw = Wrappers.lambdaQuery();
lqw.eq(bo.getProdId() != null, TzProdComm::getProdId, bo.getProdId());
lqw.like(StringUtils.isNotBlank(bo.getProdName()), TzProdComm::getProdName, bo.getProdName());
lqw.eq(bo.getOrderId() != null, TzProdComm::getOrderId, bo.getOrderId());
lqw.eq(bo.getOrderItemId() != null, TzProdComm::getOrderItemId, bo.getOrderItemId());
lqw.eq(bo.getUserId() != null, TzProdComm::getUserId, bo.getUserId());
@@ -121,7 +162,13 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
lqw.eq(bo.getIsAnonymous() != null, TzProdComm::getIsAnonymous, bo.getIsAnonymous());
lqw.eq(bo.getStatus() != null, TzProdComm::getStatus, bo.getStatus());
lqw.eq(bo.getDelFlag() != null, TzProdComm::getDelFlag, bo.getDelFlag());
lqw.orderByDesc(TzProdComm::getId);
if(bo.getSort() != null){
if(bo.getSort() == 1){
lqw.orderByDesc(TzProdComm::getCreateTime);
}else if (bo.getSort() == 2){
lqw.orderByDesc(TzProdComm::getNum);
}
}
return lqw;
}
@@ -134,6 +181,7 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
@Override
public Boolean insertByBo(TzProdCommBo bo) {
//更新订单状态为已完成
if (bo.getOrderItemId() != null) {
HyOrderItem orderItem = orderItemMapper.selectById(bo.getOrderItemId());
orderItem.setStatus(5);
orderItemMapper.updateById(orderItem);
@@ -145,6 +193,10 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
order.setStatus(5);
orderMapper.updateById(order);
}
}
// 根据商品ID查询商品信息
TzProd prod = prodMapper.selectById(bo.getProdId());
bo.setProdName(prod.getProdName());
TzProdComm add = MapstructUtils.convert(bo, TzProdComm.class);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
@@ -189,14 +241,13 @@ public class TzProdCommServiceImpl implements ITzProdCommService {
IPage<TzProdCommVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
// 获取评论列表中的商品信息
page.getRecords().forEach(comment -> {
/*page.getRecords().forEach(comment -> {
// 根据商品ID查询商品信息
TzProd prod = prodMapper.selectById(comment.getProdId());
if (prod != null) {
comment.setProdName(prod.getProdName());
}
});
});*/
return page;
}
}

View File

@@ -172,6 +172,7 @@ public class TzProdServiceImpl extends MPJBaseServiceImpl<TzProdMapper,TzProd> i
private MPJLambdaWrapper<TzProd> buildQueryMPJWrapper(TzProdBo bo) {
Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<TzProd> lqw = new MPJLambdaWrapper<>();
lqw.eq(bo.getProdId() != null, TzProd::getProdId, bo.getProdId());
lqw.eq(StringUtils.isNotBlank(bo.getTenantId()), TzProd::getTenantId, bo.getTenantId());
lqw.like(StringUtils.isNotBlank(bo.getProdName()), TzProd::getProdName, bo.getProdName());
lqw.like(StringUtils.isNotBlank(bo.getTenantName()), SysTenant::getCompanyName, bo.getTenantName());
@@ -182,7 +183,21 @@ public class TzProdServiceImpl extends MPJBaseServiceImpl<TzProdMapper,TzProd> i
lqw.like(StringUtils.isNotBlank(bo.getFactoryAddress()), TzProd::getFactoryAddress, bo.getFactoryAddress());
lqw.eq(bo.getStatus() != null, TzProd::getStatus, bo.getStatus());
lqw.eq(bo.getExamineFlag() != null, TzProd::getExamineFlag, bo.getExamineFlag());
// lqw.like(bo.getCategoryId() != null, TzProd::getCategoryId, bo.getCategoryId());
if(bo.getEnvLevel() != null){
/*//根据逗号分割解析该字符串
String[] split = bo.getEnvLevel().split(",");
for (String s : split) {
lqw.or().like(TzProd::getEnvLevel, s);
}*/
lqw.in(TzProd::getEnvLevel, bo.getEnvLevel());
}
if(bo.getFireLevel() != null){
lqw.in(TzProd::getFireLevel, bo.getFireLevel());
}
if(bo.getTrialScenario() != null){
lqw.in(TzProd::getTrialScenario, bo.getTrialScenario());
}
if(bo.getCategoryId() != null){
lqw.or().apply("FIND_IN_SET({0}, t.category_id)", bo.getCategoryId());
}
@@ -439,9 +454,9 @@ public class TzProdServiceImpl extends MPJBaseServiceImpl<TzProdMapper,TzProd> i
}
@Override
public IPage<TzProdVo> getSearchProdPageByProdName(PageQuery pageQuery, Long categoryId, String prodName, Integer floor, Integer sort, Integer orderBy) {
public IPage<TzProdVo> getSearchProdPageByProdName(PageQuery pageQuery, Long categoryId, String prodName, String envLevel, String fireLevel, String trialScenario, Integer label, Integer floor, Integer sort, Integer orderBy) {
IPage<TzProdBo> page = new Page<>(pageQuery.getPageNum(), pageQuery.getPageSize());
return baseMapper.getSearchProdPageByProdName(page, categoryId, prodName, floor, sort, orderBy);
return baseMapper.getSearchProdPageByProdName(page, categoryId, prodName, envLevel, fireLevel, trialScenario, label, floor, sort, orderBy);
}
/**

View File

@@ -70,11 +70,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="floor == 1">
and p.is_floor = 1
</if>
<if test="label != null">
and p.label = #{label}
</if>
<if test="prodName != null and prodName != ''">
and p.prod_name like concat('%',#{prodName} ,'%')
or
p.prod_code like concat('%',#{prodName} ,'%')
</if>
<if test="envLevel != null and envLevel != ''">
and FIND_IN_SET(p.env_level, #{envLevel}) > 0
</if>
<if test="fireLevel != null and fireLevel != ''">
and FIND_IN_SET(p.fire_level, #{fireLevel}) > 0
</if>
<if test="trialScenario != null and trialScenario != ''">
and FIND_IN_SET(p.trial_scenario, #{trialScenario}) > 0
</if>
<if test="sort == 0">
ORDER BY RAND()