tag
This commit is contained in:
7
pom.xml
7
pom.xml
@@ -294,7 +294,12 @@
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.alipay.sdk/alipay-easysdk -->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-easysdk</artifactId>
|
||||
<version>2.2.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class MusicRecommendController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('system:recommend:remove')")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(musicRecommendService.deleteMusicRecommendByIds(ids));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.web.controller.back;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.OrderInfo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.service.IOrderInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/back/info")
|
||||
public class OrderInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderInfo orderInfo)
|
||||
{
|
||||
startPage();
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:export')")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OrderInfo orderInfo)
|
||||
{
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
ExcelUtil<OrderInfo> util = new ExcelUtil<OrderInfo>(OrderInfo.class);
|
||||
util.exportExcel(response, list, "【请填写功能名称】数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(orderInfoService.selectOrderInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:add')")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OrderInfo orderInfo)
|
||||
{
|
||||
return toAjax(orderInfoService.insertOrderInfo(orderInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:edit')")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OrderInfo orderInfo)
|
||||
{
|
||||
return toAjax(orderInfoService.updateOrderInfo(orderInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:remove')")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(orderInfoService.deleteOrderInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.web.controller.client;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.entity.OrderInfo;
|
||||
import com.ruoyi.system.service.IOrderInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/client/order")
|
||||
public class ClientOrderInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
|
||||
// 创建订单
|
||||
@PostMapping("/create")
|
||||
public void crateOrder(@RequestBody OrderInfo orderInfo){
|
||||
|
||||
orderInfoService.createOrder(orderInfo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -16,7 +16,7 @@ ruoyi:
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8081
|
||||
port: 8080
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
||||
@@ -185,7 +185,11 @@
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.alipay.sdk/alipay-easysdk -->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-easysdk</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.common.config;
|
||||
|
||||
import com.alipay.easysdk.factory.Factory;
|
||||
import com.alipay.easysdk.kernel.Config;
|
||||
import lombok.Getter;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 描述:
|
||||
*
|
||||
* @author menxipeng by 2023/12/15
|
||||
*/
|
||||
@Getter
|
||||
@Component
|
||||
public class AliPayConfig {
|
||||
|
||||
@Value("${alipay.gateway}")
|
||||
private String aliPayGateway;
|
||||
@Value("${alipay.appid}")
|
||||
private String aliPayAppid;
|
||||
@Value("${alipay.privateKey}")
|
||||
private String aliPayPrivateKey;
|
||||
@Value("${alipay.publicKey}")
|
||||
private String aliPayPublicKey;
|
||||
@Value("${alipay.merchantCertPath}")
|
||||
private String merchantCertPath;
|
||||
@Value("${alipay.alipayCertPath}")
|
||||
private String alipayCertPath;
|
||||
@Value("${alipay.alipayRootCertPath}")
|
||||
private String alipayRootCertPath;
|
||||
@Value("${alipay.notifyUrl}")
|
||||
private String aliPayNotifyUrl;
|
||||
@Value("${alipay.authUrl}")
|
||||
private String aliPayAuthUrl;
|
||||
@Value("${alipay.timeout}")
|
||||
private Integer aliTimeOut;
|
||||
|
||||
|
||||
@Bean
|
||||
public void init() {
|
||||
Config config = new Config();
|
||||
config.protocol = "https";
|
||||
config.gatewayHost = "openapi.alipay.com";
|
||||
config.signType = "RSA2";
|
||||
|
||||
config.appId = aliPayAppid;
|
||||
// 为避免私钥随源码泄露,推荐从文件中读取私钥字符串而不是写入源码中
|
||||
config.merchantPrivateKey = aliPayPrivateKey;
|
||||
//注:证书文件路径支持设置为文件系统中的路径或CLASS_PATH中的路径,优先从文件系统中加载,加载失败后会继续尝试从CLASS_PATH中加载
|
||||
config.merchantCertPath = merchantCertPath;
|
||||
config.alipayCertPath = alipayCertPath;
|
||||
config.alipayRootCertPath = alipayRootCertPath;
|
||||
//注:如果采用非证书模式,则无需赋值上面的三个证书路径,改为赋值如下的支付宝公钥字符串即可
|
||||
//可设置异步通知接收服务地址(可选)
|
||||
config.notifyUrl = aliPayNotifyUrl;
|
||||
|
||||
Factory.setOptions(config);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
//package com.ruoyi.common.config;
|
||||
//
|
||||
//import com.lvcai.lvcaibiwebstarter.constant
|
||||
// .IStatusCode;
|
||||
//import com.lvcai.lvcaibiwebstarter.enums.GenericStatusCode;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import lombok.Data;
|
||||
//import lombok.Setter;
|
||||
//
|
||||
///**
|
||||
// * 描述:
|
||||
// *
|
||||
// * @author menxipeng by 2023/12/15
|
||||
// */
|
||||
//
|
||||
//@AllArgsConstructor
|
||||
//public enum PayStatusCode {
|
||||
//
|
||||
// /**
|
||||
// * 稍后再试
|
||||
// */
|
||||
// TRY_AGAIN_LATER(902, "稍后再试"),
|
||||
//
|
||||
// /**
|
||||
// * 支付方式错误
|
||||
// */
|
||||
// PAY_TYPE_ERROR(990, "支付方式错误"),
|
||||
//
|
||||
// PAY_ERROR(991, "支付失败"),
|
||||
// /**
|
||||
// * 支付宝预创建订单失败
|
||||
// */
|
||||
// ALI_PRE_CREATE_FAIL(992, "支付宝预创建订单失败"),
|
||||
//
|
||||
// // 重复上传
|
||||
// REPEAT_UPLOAD(993, "重复上传"),
|
||||
// ;
|
||||
//
|
||||
// public int codeValue;
|
||||
// public String msg;
|
||||
//
|
||||
// @Override
|
||||
// public int getCodeSegment() {
|
||||
// return 15;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getCodeValue() {
|
||||
// return this.codeValue;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getMsg() {
|
||||
// return this.msg;
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,331 @@
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 order_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-03
|
||||
*/
|
||||
public class OrderInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private String id;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private Long orderId;
|
||||
|
||||
/** 订单名称 */
|
||||
@Excel(name = "订单名称")
|
||||
private String orderName;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 金额 分 */
|
||||
@Excel(name = "金额 分")
|
||||
private Long amount;
|
||||
|
||||
/** 支付方式 aliPay / wechatPay / applePay */
|
||||
@Excel(name = "支付方式 aliPay / wechatPay / applePay ")
|
||||
private String payType;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTime;
|
||||
|
||||
/** 支付状态 1 创建订单 2 待出货 3 已完成 */
|
||||
@Excel(name = "支付状态 1 创建订单 2 待出货 3 已完成")
|
||||
private Long payStatus;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 截止时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 1删除 */
|
||||
@Excel(name = "1删除")
|
||||
private Long idDel;
|
||||
|
||||
/** 回调时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "回调时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date callTime;
|
||||
|
||||
/** 套餐类型 1 包月 3 包季度 6 半年 12 一年 */
|
||||
@Excel(name = "套餐类型 1 包月 3 包季度 6 半年 12 一年")
|
||||
private String packageType;
|
||||
|
||||
/** 回调内容 */
|
||||
@Excel(name = "回调内容")
|
||||
private String callbackContent;
|
||||
|
||||
/** 第三方支付交易号 */
|
||||
@Excel(name = "第三方支付交易号")
|
||||
private String tradeNo;
|
||||
|
||||
/** 已退款金额(单位:分) */
|
||||
@Excel(name = "已退款金额(单位:分)")
|
||||
private Long refundAmount;
|
||||
|
||||
/** 退款时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date refundTime;
|
||||
|
||||
/** 下单用户ip */
|
||||
@Excel(name = "下单用户ip")
|
||||
private String clientIp;
|
||||
|
||||
/** 设备类型 */
|
||||
@Excel(name = "设备类型")
|
||||
private String deviceType;
|
||||
|
||||
/** 乐观锁版本号 */
|
||||
@Excel(name = "乐观锁版本号")
|
||||
private Long version;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderName(String orderName)
|
||||
{
|
||||
this.orderName = orderName;
|
||||
}
|
||||
|
||||
public String getOrderName()
|
||||
{
|
||||
return orderName;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setAmount(Long amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Long getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setPayType(String payType)
|
||||
{
|
||||
this.payType = payType;
|
||||
}
|
||||
|
||||
public String getPayType()
|
||||
{
|
||||
return payType;
|
||||
}
|
||||
|
||||
public void setPayTime(Date payTime)
|
||||
{
|
||||
this.payTime = payTime;
|
||||
}
|
||||
|
||||
public Date getPayTime()
|
||||
{
|
||||
return payTime;
|
||||
}
|
||||
|
||||
public void setPayStatus(Long payStatus)
|
||||
{
|
||||
this.payStatus = payStatus;
|
||||
}
|
||||
|
||||
public Long getPayStatus()
|
||||
{
|
||||
return payStatus;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setIdDel(Long idDel)
|
||||
{
|
||||
this.idDel = idDel;
|
||||
}
|
||||
|
||||
public Long getIdDel()
|
||||
{
|
||||
return idDel;
|
||||
}
|
||||
|
||||
public void setCallTime(Date callTime)
|
||||
{
|
||||
this.callTime = callTime;
|
||||
}
|
||||
|
||||
public Date getCallTime()
|
||||
{
|
||||
return callTime;
|
||||
}
|
||||
|
||||
public void setPackageType(String packageType)
|
||||
{
|
||||
this.packageType = packageType;
|
||||
}
|
||||
|
||||
public String getPackageType()
|
||||
{
|
||||
return packageType;
|
||||
}
|
||||
|
||||
public void setCallbackContent(String callbackContent)
|
||||
{
|
||||
this.callbackContent = callbackContent;
|
||||
}
|
||||
|
||||
public String getCallbackContent()
|
||||
{
|
||||
return callbackContent;
|
||||
}
|
||||
|
||||
public void setTradeNo(String tradeNo)
|
||||
{
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
|
||||
public String getTradeNo()
|
||||
{
|
||||
return tradeNo;
|
||||
}
|
||||
|
||||
public void setRefundAmount(Long refundAmount)
|
||||
{
|
||||
this.refundAmount = refundAmount;
|
||||
}
|
||||
|
||||
public Long getRefundAmount()
|
||||
{
|
||||
return refundAmount;
|
||||
}
|
||||
|
||||
public void setRefundTime(Date refundTime)
|
||||
{
|
||||
this.refundTime = refundTime;
|
||||
}
|
||||
|
||||
public Date getRefundTime()
|
||||
{
|
||||
return refundTime;
|
||||
}
|
||||
|
||||
public void setClientIp(String clientIp)
|
||||
{
|
||||
this.clientIp = clientIp;
|
||||
}
|
||||
|
||||
public String getClientIp()
|
||||
{
|
||||
return clientIp;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType)
|
||||
{
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getDeviceType()
|
||||
{
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("orderName", getOrderName())
|
||||
.append("userId", getUserId())
|
||||
.append("amount", getAmount())
|
||||
.append("payType", getPayType())
|
||||
.append("payTime", getPayTime())
|
||||
.append("payStatus", getPayStatus())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("idDel", getIdDel())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("callTime", getCallTime())
|
||||
.append("packageType", getPackageType())
|
||||
.append("callbackContent", getCallbackContent())
|
||||
.append("tradeNo", getTradeNo())
|
||||
.append("refundAmount", getRefundAmount())
|
||||
.append("refundTime", getRefundTime())
|
||||
.append("clientIp", getClientIp())
|
||||
.append("deviceType", getDeviceType())
|
||||
.append("version", getVersion())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public enum PayStatusEnum {
|
||||
|
||||
// `pay_status` int DEFAULT NULL COMMENT '支付状态 1 待支付 2 待出货 3 待退款 4 已退款 5 已完成',
|
||||
CREATE(1, "待支付"),
|
||||
PENDING(2,"待出货"),
|
||||
WAIT_REFUND(3,"待退款"),
|
||||
REFUND(4,"已退款"),
|
||||
COMPLETE(5,"已完成")
|
||||
;
|
||||
|
||||
public long status;
|
||||
public String desc;
|
||||
|
||||
}
|
||||
@@ -68,4 +68,6 @@ public interface CategoryInfoMapper
|
||||
|
||||
|
||||
int deleteCategoryInfoBycategoryId(String categoryId);
|
||||
|
||||
int deleteCategoryInfoBycategoryIds(String[] ids);
|
||||
}
|
||||
|
||||
@@ -58,5 +58,5 @@ public interface MusicRecommendMapper
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicRecommendByIds(String[] ids);
|
||||
public int deleteMusicRecommendByIds(Long[] ids);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.OrderInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-03
|
||||
*/
|
||||
public interface OrderInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public OrderInfo selectOrderInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByIds(String[] ids);
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public interface IMusicRecommendService
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicRecommendByIds(String[] ids);
|
||||
public int deleteMusicRecommendByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.OrderInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-03
|
||||
*/
|
||||
public interface IOrderInfoService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public OrderInfo selectOrderInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoById(String id);
|
||||
|
||||
AjaxResult createOrder(OrderInfo orderInfo);
|
||||
}
|
||||
@@ -23,6 +23,7 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
@Autowired
|
||||
private CategoryInfoMapper categoryInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
@@ -83,6 +84,7 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
@Override
|
||||
public int deleteCategoryInfoByIds(String[] ids)
|
||||
{
|
||||
categoryInfoMapper.deleteCategoryInfoBycategoryIds(ids);
|
||||
return categoryInfoMapper.deleteCategoryInfoByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public class MusicRecommendServiceImpl implements IMusicRecommendService
|
||||
@Autowired
|
||||
private MusicRecommendMapper musicRecommendMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
@@ -75,8 +76,9 @@ public class MusicRecommendServiceImpl implements IMusicRecommendService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicRecommendByIds(String[] ids)
|
||||
public int deleteMusicRecommendByIds(Long[] ids)
|
||||
{
|
||||
// 删除关联数据
|
||||
return musicRecommendMapper.deleteMusicRecommendByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.OrderInfo;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.mapper.OrderInfoMapper;
|
||||
import com.ruoyi.system.service.IOrderInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-03
|
||||
*/
|
||||
@Service
|
||||
public class OrderInfoServiceImpl implements IOrderInfoService
|
||||
{
|
||||
@Autowired
|
||||
private OrderInfoMapper orderInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public OrderInfo selectOrderInfoById(String id)
|
||||
{
|
||||
return orderInfoMapper.selectOrderInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo)
|
||||
{
|
||||
return orderInfoMapper.selectOrderInfoList(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrderInfo(OrderInfo orderInfo)
|
||||
{
|
||||
orderInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return orderInfoMapper.insertOrderInfo(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param orderInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrderInfo(OrderInfo orderInfo)
|
||||
{
|
||||
orderInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return orderInfoMapper.updateOrderInfo(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInfoByIds(String[] ids)
|
||||
{
|
||||
return orderInfoMapper.deleteOrderInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInfoById(String id)
|
||||
{
|
||||
return orderInfoMapper.deleteOrderInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult createOrder(OrderInfo orderInfo) {
|
||||
LoginUser userInfo = SecurityUtils.getLoginUser();
|
||||
|
||||
if (userInfo != null){
|
||||
//orderInfo.setPayStatus();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -93,6 +93,7 @@ public class RecommendInfoServiceImpl implements IRecommendInfoService
|
||||
@Override
|
||||
public int deleteRecommendInfoByIds(Long[] ids)
|
||||
{
|
||||
musicRecommendMapper.deleteMusicRecommendByIds(ids);
|
||||
return recommendInfoMapper.deleteRecommendInfoByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,4 +102,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<delete id="deleteCategoryInfoBycategoryId">
|
||||
DELETE FROM music_category where category_id =#{categoryId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCategoryInfoBycategoryIds">
|
||||
delete from music_category where category_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.OrderInfoMapper">
|
||||
|
||||
<resultMap type="OrderInfo" id="OrderInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="orderName" column="order_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="payType" column="pay_type" />
|
||||
<result property="payTime" column="pay_time" />
|
||||
<result property="payStatus" column="pay_status" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="idDel" column="id_del" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="callTime" column="call_time" />
|
||||
<result property="packageType" column="package_type" />
|
||||
<result property="callbackContent" column="callback_content" />
|
||||
<result property="tradeNo" column="trade_no" />
|
||||
<result property="refundAmount" column="refund_amount" />
|
||||
<result property="refundTime" column="refund_time" />
|
||||
<result property="clientIp" column="client_ip" />
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="version" column="version" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderInfoVo">
|
||||
select id, order_id, order_name, user_id, amount, pay_type, pay_time, pay_status, start_time, end_time, create_time, id_del, update_time, call_time, package_type, callback_content, trade_no, refund_amount, refund_time, client_ip, device_type, version from order_info
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderInfoList" parameterType="OrderInfo" resultMap="OrderInfoResult">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="orderName != null and orderName != ''"> and order_name like concat('%', #{orderName}, '%')</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="amount != null "> and amount = #{amount}</if>
|
||||
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
|
||||
<if test="payTime != null "> and pay_time = #{payTime}</if>
|
||||
<if test="payStatus != null "> and pay_status = #{payStatus}</if>
|
||||
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="idDel != null "> and id_del = #{idDel}</if>
|
||||
<if test="callTime != null "> and call_time = #{callTime}</if>
|
||||
<if test="packageType != null and packageType != ''"> and package_type = #{packageType}</if>
|
||||
<if test="callbackContent != null and callbackContent != ''"> and callback_content = #{callbackContent}</if>
|
||||
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
|
||||
<if test="refundAmount != null "> and refund_amount = #{refundAmount}</if>
|
||||
<if test="refundTime != null "> and refund_time = #{refundTime}</if>
|
||||
<if test="clientIp != null and clientIp != ''"> and client_ip = #{clientIp}</if>
|
||||
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
|
||||
<if test="version != null "> and version = #{version}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderInfoById" parameterType="String" resultMap="OrderInfoResult">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderInfo" parameterType="OrderInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into order_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="orderName != null">order_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="payType != null">pay_type,</if>
|
||||
<if test="payTime != null">pay_time,</if>
|
||||
<if test="payStatus != null">pay_status,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="idDel != null">id_del,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="callTime != null">call_time,</if>
|
||||
<if test="packageType != null">package_type,</if>
|
||||
<if test="callbackContent != null">callback_content,</if>
|
||||
<if test="tradeNo != null">trade_no,</if>
|
||||
<if test="refundAmount != null">refund_amount,</if>
|
||||
<if test="refundTime != null">refund_time,</if>
|
||||
<if test="clientIp != null">client_ip,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="version != null">version,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="orderName != null">#{orderName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="payType != null">#{payType},</if>
|
||||
<if test="payTime != null">#{payTime},</if>
|
||||
<if test="payStatus != null">#{payStatus},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="idDel != null">#{idDel},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="callTime != null">#{callTime},</if>
|
||||
<if test="packageType != null">#{packageType},</if>
|
||||
<if test="callbackContent != null">#{callbackContent},</if>
|
||||
<if test="tradeNo != null">#{tradeNo},</if>
|
||||
<if test="refundAmount != null">#{refundAmount},</if>
|
||||
<if test="refundTime != null">#{refundTime},</if>
|
||||
<if test="clientIp != null">#{clientIp},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="version != null">#{version},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrderInfo" parameterType="OrderInfo">
|
||||
update order_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="orderName != null">order_name = #{orderName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="payType != null">pay_type = #{payType},</if>
|
||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="idDel != null">id_del = #{idDel},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="callTime != null">call_time = #{callTime},</if>
|
||||
<if test="packageType != null">package_type = #{packageType},</if>
|
||||
<if test="callbackContent != null">callback_content = #{callbackContent},</if>
|
||||
<if test="tradeNo != null">trade_no = #{tradeNo},</if>
|
||||
<if test="refundAmount != null">refund_amount = #{refundAmount},</if>
|
||||
<if test="refundTime != null">refund_time = #{refundTime},</if>
|
||||
<if test="clientIp != null">client_ip = #{clientIp},</if>
|
||||
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||
<if test="version != null">version = #{version},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderInfoById" parameterType="String">
|
||||
delete from order_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderInfoByIds" parameterType="String">
|
||||
delete from order_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user