xuhy
2025-11-06 b6e0e127ad02913ee3efd28a4f7f78d2abf0c4ea
后台接口
8个文件已添加
17个文件已修改
792 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppealServicesController.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseController.java 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseOrderController.java 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditCourseOrderRefundDTO.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/dto/HandleAppealServicesDTO.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TAppealServicesMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TCourseMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TCourseOrderMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TAppealServices.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TCourseOrder.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TAppealServicesQuery.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TCourseOrderQuery.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TCourseQuery.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TAppealServicesService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TCourseOrderService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TCourseService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TAppealServicesServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCourseOrderServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCourseServiceImpl.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TAppealServicesVO.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TCourseOrderVO.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TCourseVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TAppealServicesMapper.xml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TCourseMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TCourseOrderMapper.xml 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppealServicesController.java
@@ -1,9 +1,24 @@
package com.ruoyi.web.controller.api;
import org.springframework.web.bind.annotation.RequestMapping;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.HandleAppealServicesDTO;
import com.ruoyi.system.model.TAppealServices;
import com.ruoyi.system.query.TAppealServicesQuery;
import com.ruoyi.system.service.TAppealServicesService;
import com.ruoyi.system.vo.TAppealServicesVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
import java.util.List;
/**
 * <p>
@@ -13,9 +28,87 @@
 * @author xiaochen
 * @since 2025-11-06
 */
@Api(tags = "诉求服务管理")
@RestController
@RequestMapping("/t-appeal-services")
public class TAppealServicesController {
    private final TAppealServicesService appealServicesService;
    private final TokenService tokenService;
    @Autowired
    public TAppealServicesController(TAppealServicesService appealServicesService, TokenService tokenService) {
        this.appealServicesService = appealServicesService;
        this.tokenService = tokenService;
    }
    /**
     * 获取诉求服务管理管理列表
     */
    @ApiOperation(value = "获取诉求服务管理分页列表")
    @PostMapping(value = "/pageList")
    public R<PageInfo<TAppealServicesVO>> pageList(@RequestBody TAppealServicesQuery query) {
        return R.ok(appealServicesService.pageList(query));
    }
    /**
     * 获取诉求服务管理管理列表
     */
    @ApiOperation(value = "获取诉求服务管理列表")
    @PostMapping(value = "/list")
    public R<List<TAppealServices>> list() {
        return R.ok(appealServicesService.list(Wrappers.lambdaQuery(TAppealServices.class).orderByDesc(TAppealServices::getCreateTime)));
    }
    /**
     * 查看诉求服务管理详情
     */
    @ApiOperation(value = "查看诉求服务管理详情")
    @GetMapping(value = "/getDetailById")
    public R<TAppealServices> getDetailById(@RequestParam String id) {
        return R.ok(appealServicesService.getById(id));
    }
    /**
     * 删除诉求服务管理
     */
    @Log(title = "诉求服务管理信息-删除诉求服务管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除诉求服务管理")
    @DeleteMapping(value = "/deleteById")
    public R<Boolean> deleteById(@RequestParam String id) {
        return R.ok(appealServicesService.removeById(id));
    }
    /**
     * 批量删除诉求服务管理
     */
    @Log(title = "诉求服务管理信息-删除诉求服务管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除诉求服务管理")
    @DeleteMapping(value = "/deleteByIds")
    public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
        return R.ok(appealServicesService.removeByIds(ids));
    }
    /**
     * 处理诉求
     */
    @Log(title = "诉求服务管理信息-处理诉求", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "处理诉求")
    @PostMapping(value = "/handleAppealServices")
    public R<String> handleAppealServices(@RequestBody HandleAppealServicesDTO dto) {
        Long userId = tokenService.getLoginUser().getUserId();
        String nickName = tokenService.getLoginUser().getUser().getNickName();
        TAppealServices appealServices = appealServicesService.getById(dto.getId());
        appealServices.setStatus(2);
        appealServices.setUserId(userId);
        appealServices.setProcessPersonName(nickName);
        appealServices.setProcessTime(LocalDateTime.now());
        appealServices.setProcessRemark(dto.getProcessRemark());
        appealServices.setProcessPictures(dto.getProcessPictures());
        appealServicesService.updateById(appealServices);
        return R.ok();
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseController.java
@@ -1,9 +1,25 @@
package com.ruoyi.web.controller.api;
import org.springframework.web.bind.annotation.RequestMapping;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.model.TCourse;
import com.ruoyi.system.model.TCourseOrder;
import com.ruoyi.system.query.TCourseQuery;
import com.ruoyi.system.service.TCourseOrderService;
import com.ruoyi.system.service.TCourseService;
import com.ruoyi.system.vo.TCourseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * <p>
@@ -13,9 +29,105 @@
 * @author xiaochen
 * @since 2025-11-06
 */
@Api(tags = "课程管理")
@RestController
@RequestMapping("/t-course")
public class TCourseController {
    private final TCourseService courseService;
    private final TCourseOrderService courseOrderService;
    private final TokenService tokenService;
    @Autowired
    public TCourseController(TCourseService courseService, TCourseOrderService courseOrderService, TokenService tokenService) {
        this.courseService = courseService;
        this.courseOrderService = courseOrderService;
        this.tokenService = tokenService;
    }
    /**
     * 获取课程管理管理列表
     */
    @ApiOperation(value = "获取课程管理分页列表")
    @PostMapping(value = "/pageList")
    public R<PageInfo<TCourseVO>> pageList(@RequestBody TCourseQuery query) {
        return R.ok(courseService.pageList(query));
    }
    /**
     * 获取课程管理管理列表
     */
    @ApiOperation(value = "获取课程管理列表")
    @PostMapping(value = "/list")
    public R<List<TCourse>> list() {
        return R.ok(courseService.list(Wrappers.lambdaQuery(TCourse.class).orderByDesc(TCourse::getCreateTime)));
    }
    /**
     * 添加课程管理管理
     */
    @Log(title = "课程管理信息-新增课程管理", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加课程管理")
    @PostMapping(value = "/add")
    public R<Boolean> add(@Validated @RequestBody TCourse dto) {
        if (courseService.isExit(dto)) {
            return R.fail("课程标题已存在");
        }
        return R.ok(courseService.save(dto));
    }
    /**
     * 修改课程管理
     */
    @Log(title = "课程管理信息-修改课程管理", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改课程管理")
    @PostMapping(value = "/update")
    public R<Boolean> update(@Validated @RequestBody TCourse dto) {
        if (courseService.isExit(dto)) {
            return R.fail("课程标题已存在");
        }
        return R.ok(courseService.updateById(dto));
    }
    /**
     * 查看课程管理详情
     */
    @ApiOperation(value = "查看课程管理详情")
    @GetMapping(value = "/getDetailById")
    public R<TCourse> getDetailById(@RequestParam String id) {
        return R.ok(courseService.getById(id));
    }
    /**
     * 删除课程管理
     */
    @Log(title = "课程管理信息-删除课程管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除课程管理")
    @DeleteMapping(value = "/deleteById")
    public R<Boolean> deleteById(@RequestParam String id) {
        // 判断课程是否有人报名
        long count = courseOrderService.count(Wrappers.lambdaQuery(TCourseOrder.class)
                .eq(TCourseOrder::getCourseId, id));
        if (count > 0) {
            return R.fail("该课程有报名信息,请先处理报名信息");
        }
        return R.ok(courseService.removeById(id));
    }
    /**
     * 批量删除课程管理
     */
    @Log(title = "课程管理信息-删除课程管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除课程管理")
    @DeleteMapping(value = "/deleteByIds")
    public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
        // 判断课程是否有人报名
        long count = courseOrderService.count(Wrappers.lambdaQuery(TCourseOrder.class)
                .in(TCourseOrder::getCourseId, ids));
        if (count > 0) {
            return R.fail("该课程有报名信息,请先处理报名信息");
        }
        return R.ok(courseService.removeByIds(ids));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseOrderController.java
@@ -1,9 +1,29 @@
package com.ruoyi.web.controller.api;
import org.springframework.web.bind.annotation.RequestMapping;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.dto.AuditCourseOrderRefundDTO;
import com.ruoyi.system.model.TCourse;
import com.ruoyi.system.model.TCourseOrder;
import com.ruoyi.system.query.TCourseOrderQuery;
import com.ruoyi.system.query.TCourseQuery;
import com.ruoyi.system.service.TCourseOrderService;
import com.ruoyi.system.service.TCourseService;
import com.ruoyi.system.vo.TCourseOrderVO;
import com.ruoyi.system.vo.TCourseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * <p>
@@ -13,9 +33,109 @@
 * @author xiaochen
 * @since 2025-11-06
 */
@Api(tags = "课程订单管理")
@RestController
@RequestMapping("/t-course-order")
public class TCourseOrderController {
    private final TCourseService courseService;
    private final TCourseOrderService courseOrderService;
    private final TokenService tokenService;
    @Autowired
    public TCourseOrderController(TCourseService courseService, TCourseOrderService courseOrderService, TokenService tokenService) {
        this.courseService = courseService;
        this.courseOrderService = courseOrderService;
        this.tokenService = tokenService;
    }
    /**
     * 获取课程订单管理管理列表
     */
    @ApiOperation(value = "获取课程报名记录分页列表")
    @PostMapping(value = "/pageList")
    public R<PageInfo<TCourseOrderVO>> pageList(@RequestBody TCourseOrderQuery query) {
        return R.ok(courseOrderService.pageList(query));
    }
    /**
     * 获取课程申请退款记录分页列表
     */
    @ApiOperation(value = "获取课程申请退款记录分页列表")
    @PostMapping(value = "/refundPageList")
    public R<PageInfo<TCourseOrderVO>> refundPageList(@RequestBody TCourseOrderQuery query) {
        return R.ok(courseOrderService.refundPageList(query));
    }
    /**
     * 获取课程订单管理管理列表
     */
    @ApiOperation(value = "获取课程订单管理列表")
    @PostMapping(value = "/list")
    public R<List<TCourseOrder>> list() {
        return R.ok(courseOrderService.list(Wrappers.lambdaQuery(TCourseOrder.class).orderByDesc(TCourseOrder::getCreateTime)));
    }
    /**
     * 查看课程订单管理详情
     */
    @ApiOperation(value = "查看课程订单管理详情")
    @GetMapping(value = "/getDetailById")
    public R<TCourseOrderVO> getDetailById(@RequestParam String id) {
        TCourseOrder courseOrder = courseOrderService.getById(id);
        TCourseOrderVO courseOrderVO = new TCourseOrderVO();
        BeanUtils.copyProperties(courseOrder, courseOrderVO);
        // 查询课程信息
        TCourse course = courseService.getById(courseOrder.getCourseId());
        courseOrderVO.setCourseTitle(course.getCourseTitle());
        courseOrderVO.setCourseCost(course.getCourseCost());
        courseOrderVO.setCourseLecturer(course.getCourseLecturer());
        courseOrderVO.setCourseCover(course.getCourseCover());
        courseOrderVO.setCourseType(course.getCourseType());
        courseOrderVO.setReleaseTime(course.getCreateTime());
        return R.ok(courseOrderVO);
    }
    /**
     * 审核课程订单管理退款申请
     */
    @Log(title = "课程订单管理信息-审核课程订单管理退款申请", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "审核课程订单管理退款申请")
    @PostMapping(value = "/auditCourseOrderRefund")
    public R<String> auditCourseOrderRefund(@Validated @RequestBody AuditCourseOrderRefundDTO dto) {
        TCourseOrder courseOrder = courseOrderService.getById(dto.getId());
        courseOrder.setRefundStatus(dto.getRefundStatus());
        if(dto.getRefundStatus() == 2){
            // 通过
            courseOrder.setRefundVoucher(dto.getRefundVoucher());
            // 修改支付状态为已退款
            courseOrder.setPayStatus(3);
        }
        if(dto.getRefundStatus() == 3){
            // 驳回
            courseOrder.setRejectReason(dto.getRejectReason());
        }
        courseOrderService.updateById(courseOrder);
        return R.ok();
    }
    /**
     * 删除课程订单管理
     */
    @Log(title = "课程订单管理信息-删除课程订单管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除课程订单管理")
    @DeleteMapping(value = "/deleteById")
    public R<Boolean> deleteById(@RequestParam String id) {
        return R.ok(courseOrderService.removeById(id));
    }
    /**
     * 批量删除课程订单管理
     */
    @Log(title = "课程订单管理信息-删除课程订单管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除课程订单管理")
    @DeleteMapping(value = "/deleteByIds")
    public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
        return R.ok(courseService.removeByIds(ids));
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/dto/AuditCourseOrderRefundDTO.java
New file
@@ -0,0 +1,28 @@
package com.ruoyi.system.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
@ApiModel(value = "审核课程订单退款信息AuditCourseOrderRefundDTO")
public class AuditCourseOrderRefundDTO implements Serializable {
    @NotBlank(message = "记录id不能为空")
    private String id;
    @NotNull(message = "退款审核状态不能为空")
    @ApiModelProperty(value = "退款审核状态 1=待审核 2=通过 3=驳回")
    private Integer refundStatus;
    @ApiModelProperty(value = "退款凭证")
    private String refundVoucher;
    @ApiModelProperty(value = "驳回原因")
    private String rejectReason;
}
ruoyi-system/src/main/java/com/ruoyi/system/dto/HandleAppealServicesDTO.java
New file
@@ -0,0 +1,28 @@
package com.ruoyi.system.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
@ApiModel(value = "处理诉求服务DTO")
public class HandleAppealServicesDTO implements Serializable {
    @NotBlank(message = "诉求服务id不能为空")
    @ApiModelProperty(value = "诉求服务id")
    private String id;
    @NotBlank(message = "处理备注不能为空")
    @ApiModelProperty(value = "处理备注")
    @TableField("process_remark")
    private String processRemark;
    @ApiModelProperty(value = "处理凭证")
    @TableField("process_pictures")
    private String processPictures;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TAppealServicesMapper.java
@@ -1,7 +1,13 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TAppealServices;
import com.ruoyi.system.query.TAppealServicesQuery;
import com.ruoyi.system.vo.TAppealServicesVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * <p>
@@ -13,4 +19,8 @@
 */
public interface TAppealServicesMapper extends BaseMapper<TAppealServices> {
    /**
     * 获取诉求服务管理分页列表
     */
    List<TAppealServicesVO> pageList(@Param("query") TAppealServicesQuery query, @Param("pageInfo")PageInfo<TAppealServicesVO> pageInfo);
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TCourseMapper.java
@@ -1,7 +1,13 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TCourse;
import com.ruoyi.system.query.TCourseQuery;
import com.ruoyi.system.vo.TCourseVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * <p>
@@ -13,4 +19,12 @@
 */
public interface TCourseMapper extends BaseMapper<TCourse> {
    /**
     * 获取课程管理分页列表
     * @param query
     * @param pageInfo
     * @return
     */
    List<TCourseVO> pageList(@Param("query") TCourseQuery query, @Param("pageInfo")PageInfo<TCourseVO> pageInfo);
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TCourseOrderMapper.java
@@ -1,7 +1,13 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TCourseOrder;
import com.ruoyi.system.query.TCourseOrderQuery;
import com.ruoyi.system.vo.TCourseOrderVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * <p>
@@ -13,4 +19,14 @@
 */
public interface TCourseOrderMapper extends BaseMapper<TCourseOrder> {
    /**
     * 获取课程订单管理分页列表
     */
    List<TCourseOrderVO> pageList(@Param("query") TCourseOrderQuery query, @Param("pageInfo")PageInfo<TCourseOrderVO> pageInfo);
    /**
     * 获取课程订单申请退款管理分页列表
     */
    List<TCourseOrderVO> refundPageList(@Param("query") TCourseOrderQuery query, @Param("pageInfo")PageInfo<TCourseOrderVO> pageInfo);
}
ruoyi-system/src/main/java/com/ruoyi/system/model/TAppealServices.java
@@ -73,6 +73,10 @@
    @TableField("process_remark")
    private String processRemark;
    @ApiModelProperty(value = "处理凭证")
    @TableField("process_pictures")
    private String processPictures;
    @ApiModelProperty(value = "处理时间")
    @TableField("process_time")
    private LocalDateTime processTime;
ruoyi-system/src/main/java/com/ruoyi/system/model/TCourseOrder.java
@@ -52,6 +52,14 @@
    @TableField("pay_money")
    private BigDecimal payMoney;
    @ApiModelProperty(value = "订单编号")
    @TableField("order_number")
    private String orderNumber;
    @ApiModelProperty(value = "支付流水号")
    @TableField("transaction_id")
    private String transactionId;
    @ApiModelProperty(value = "真实姓名")
    @TableField("real_name")
    private String realName;
@@ -85,6 +93,14 @@
    @TableField("refund_reason_pictures")
    private String refundReasonPictures;
    @ApiModelProperty(value = "退款单号")
    @TableField("refund_number")
    private String refundNumber;
    @ApiModelProperty(value = "退款流水号")
    @TableField("refund_transaction_id")
    private String refundTransactionId;
    @ApiModelProperty(value = "银行卡号")
    @TableField("bank_card_number")
    private String bankCardNumber;
ruoyi-system/src/main/java/com/ruoyi/system/query/TAppealServicesQuery.java
New file
@@ -0,0 +1,24 @@
package com.ruoyi.system.query;
import com.ruoyi.common.core.domain.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "诉求服务查询参数TAppealServicesQuery")
public class TAppealServicesQuery extends BasePage {
    @ApiModelProperty(value = "联系人")
    private String contactPerson;
    @ApiModelProperty(value = "联系电话")
    private String contactPhone;
    @ApiModelProperty(value = "状态 1=待处理 2=已处理")
    private Integer status;
    @ApiModelProperty(value = "诉求类型 1=群众诉求服务 2=随心拍")
    private Integer appealType;
}
ruoyi-system/src/main/java/com/ruoyi/system/query/TCourseOrderQuery.java
New file
@@ -0,0 +1,27 @@
package com.ruoyi.system.query;
import com.ruoyi.common.core.domain.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "课程订单信息查询参数TCourseOrderQuery")
public class TCourseOrderQuery extends BasePage {
    @ApiModelProperty(value = "课程标题")
    private String courseTitle;
    @ApiModelProperty(value = "课程类型 1=社区大学课程 2=暑期青少年工艺培训班")
    private Integer courseType;
    @ApiModelProperty(value = "真实姓名")
    private String realName;
    @ApiModelProperty(value = "联系电话")
    private String userPhone;
    @ApiModelProperty(value = "支付状态 1=待支付 2=已支付 3=已退款")
    private Integer payStatus;
}
ruoyi-system/src/main/java/com/ruoyi/system/query/TCourseQuery.java
New file
@@ -0,0 +1,19 @@
package com.ruoyi.system.query;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "课程管理查询参数TCourseQuery")
public class TCourseQuery extends BasePage {
    @ApiModelProperty(value = "课程标题")
    private String courseTitle;
    @ApiModelProperty(value = "课程类型 1=社区大学课程 2=暑期青少年工艺培训班")
    private Integer courseType;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TAppealServicesService.java
@@ -1,7 +1,10 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TAppealServices;
import com.ruoyi.system.query.TAppealServicesQuery;
import com.ruoyi.system.vo.TAppealServicesVO;
/**
 * <p>
@@ -13,4 +16,10 @@
 */
public interface TAppealServicesService extends IService<TAppealServices> {
    /**
     * 获取诉求服务管理分页列表
     * @param query
     * @return
     */
    PageInfo<TAppealServicesVO> pageList(TAppealServicesQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TCourseOrderService.java
@@ -1,7 +1,10 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TCourseOrder;
import com.ruoyi.system.query.TCourseOrderQuery;
import com.ruoyi.system.vo.TCourseOrderVO;
/**
 * <p>
@@ -13,4 +16,17 @@
 */
public interface TCourseOrderService extends IService<TCourseOrder> {
    /**
     * 获取课程订单管理分页列表
     * @param query
     * @return
     */
    PageInfo<TCourseOrderVO> pageList(TCourseOrderQuery query);
    /**
     * 获取课程申请退款记录分页列表
     * @param query
     * @return
     */
    PageInfo<TCourseOrderVO> refundPageList(TCourseOrderQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TCourseService.java
@@ -1,7 +1,10 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.model.TCourse;
import com.ruoyi.system.query.TCourseQuery;
import com.ruoyi.system.vo.TCourseVO;
/**
 * <p>
@@ -13,4 +16,18 @@
 */
public interface TCourseService extends IService<TCourse> {
    /**
     * 判断数据是否存在
     * @param dto
     * @return
     */
    boolean isExit(TCourse dto);
    /**
     * 获取课程管理分页列表
     * @param query
     * @return
     */
    PageInfo<TCourseVO> pageList(TCourseQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TAppealServicesServiceImpl.java
@@ -1,10 +1,16 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.mapper.TAppealServicesMapper;
import com.ruoyi.system.model.TAppealServices;
import com.ruoyi.system.query.TAppealServicesQuery;
import com.ruoyi.system.service.TAppealServicesService;
import com.ruoyi.system.vo.TAppealServicesVO;
import com.ruoyi.system.vo.TCourseVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
@@ -17,4 +23,11 @@
@Service
public class TAppealServicesServiceImpl extends ServiceImpl<TAppealServicesMapper, TAppealServices> implements TAppealServicesService {
    @Override
    public PageInfo<TAppealServicesVO> pageList(TAppealServicesQuery query) {
        PageInfo<TAppealServicesVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        List<TAppealServicesVO> list = this.baseMapper.pageList(query,pageInfo);
        pageInfo.setRecords(list);
        return pageInfo;
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCourseOrderServiceImpl.java
@@ -1,10 +1,16 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.mapper.TCourseOrderMapper;
import com.ruoyi.system.model.TCourseOrder;
import com.ruoyi.system.query.TCourseOrderQuery;
import com.ruoyi.system.service.TCourseOrderService;
import com.ruoyi.system.vo.TCourseOrderVO;
import com.ruoyi.system.vo.TCourseVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
@@ -17,4 +23,19 @@
@Service
public class TCourseOrderServiceImpl extends ServiceImpl<TCourseOrderMapper, TCourseOrder> implements TCourseOrderService {
    @Override
    public PageInfo<TCourseOrderVO> pageList(TCourseOrderQuery query) {
        PageInfo<TCourseOrderVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        List<TCourseOrderVO> list = this.baseMapper.pageList(query,pageInfo);
        pageInfo.setRecords(list);
        return pageInfo;
    }
    @Override
    public PageInfo<TCourseOrderVO> refundPageList(TCourseOrderQuery query) {
        PageInfo<TCourseOrderVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        List<TCourseOrderVO> list = this.baseMapper.refundPageList(query,pageInfo);
        pageInfo.setRecords(list);
        return pageInfo;
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCourseServiceImpl.java
@@ -1,10 +1,19 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.TCourseMapper;
import com.ruoyi.system.model.TCourse;
import com.ruoyi.system.model.TCourse;
import com.ruoyi.system.query.TCourseQuery;
import com.ruoyi.system.service.TCourseService;
import com.ruoyi.system.vo.TCourseVO;
import com.ruoyi.system.vo.TPartyBuildingVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
@@ -17,4 +26,22 @@
@Service
public class TCourseServiceImpl extends ServiceImpl<TCourseMapper, TCourse> implements TCourseService {
    @Override
    public boolean isExit(TCourse dto) {
        if(StringUtils.isNotEmpty(dto.getId())){
            // 修改
            return this.count(Wrappers.lambdaQuery(TCourse.class).ne(TCourse::getId, dto.getId()).eq(TCourse::getCourseTitle, dto.getCourseTitle())) > 0;
        }else {
            // 新增
            return this.count(Wrappers.lambdaQuery(TCourse.class).eq(TCourse::getCourseTitle, dto.getCourseTitle())) > 0;
        }
    }
    @Override
    public PageInfo<TCourseVO> pageList(TCourseQuery query) {
        PageInfo<TCourseVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        List<TCourseVO> list = this.baseMapper.pageList(query,pageInfo);
        pageInfo.setRecords(list);
        return pageInfo;
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/TAppealServicesVO.java
New file
@@ -0,0 +1,13 @@
package com.ruoyi.system.vo;
import com.ruoyi.system.model.TAppealServices;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "诉求服务返回TAppealServicesVO")
public class TAppealServicesVO extends TAppealServices {
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/TCourseOrderVO.java
New file
@@ -0,0 +1,35 @@
package com.ruoyi.system.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.model.TCourseOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@ApiModel(value = "课程订单信息TCourseOrderVO")
public class TCourseOrderVO extends TCourseOrder {
    @ApiModelProperty(value = "课程标题")
    private String courseTitle;
    @ApiModelProperty(value = "课程类型 1=社区大学课程 2=暑期青少年工艺培训班")
    private Integer courseType;
    @ApiModelProperty(value = "课程费用")
    private BigDecimal courseCost;
    @ApiModelProperty(value = "课程封面")
    private String courseCover;
    @ApiModelProperty(value = "讲师")
    private String courseLecturer;
    @ApiModelProperty(value = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime releaseTime;
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/TCourseVO.java
New file
@@ -0,0 +1,10 @@
package com.ruoyi.system.vo;
import com.ruoyi.system.model.TCourse;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "课程管理VO对象")
public class TCourseVO extends TCourse {
}
ruoyi-system/src/main/resources/mapper/system/TAppealServicesMapper.xml
@@ -17,6 +17,7 @@
        <result column="process_person_name" property="processPersonName" />
        <result column="process_remark" property="processRemark" />
        <result column="process_time" property="processTime" />
        <result column="process_pictures" property="processPictures" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="create_by" property="createBy" />
@@ -26,7 +27,30 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, app_user_id, appeal_type, appeal_description, pictures, contact_person, contact_phone, address, status, user_id, process_person_name, process_remark, process_time, create_time, update_time, create_by, update_by, disabled
        id, app_user_id, appeal_type, appeal_description, pictures, contact_person, contact_phone,
          address, status, user_id, process_person_name, process_remark, process_time,process_pictures,
          create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TAppealServicesVO">
        SELECT
        <include refid="Base_Column_List"/>
            FROM t_appeal_services
        <where>
            <if test="query.contactPerson != null and query.contactPerson != ''">
                and contact_person LIKE CONCAT('%',#{query.contactPerson},'%')
            </if>
            <if test="query.contactPhone != null and query.contactPhone != ''">
                and contact_phone LIKE CONCAT('%',#{query.contactPhone},'%')
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.appealType != null">
                and appeal_type = #{query.appealType}
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
</mapper>
ruoyi-system/src/main/resources/mapper/system/TCourseMapper.xml
@@ -25,5 +25,20 @@
    <sql id="Base_Column_List">
        id, course_title, course_type, course_cost, course_cover, course_carousel, people_limit, course_detail, course_lecturer, status, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TCourseVO">
        SELECT
        <include refid="Base_Column_List"/>
            FROM t_course
        <where>
            <if test="query.courseTitle != null and query.courseTitle != ''">
                AND course_title LIKE concat('%',#{query.courseTitle},'%')
            </if>
            <if test="query.courseType != null">
                AND course_type = #{query.courseType}
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
</mapper>
ruoyi-system/src/main/resources/mapper/system/TCourseOrderMapper.xml
@@ -10,6 +10,8 @@
        <result column="pay_type" property="payType" />
        <result column="pay_time" property="payTime" />
        <result column="pay_money" property="payMoney" />
        <result column="order_number" property="orderNumber" />
        <result column="transaction_id" property="transactionId" />
        <result column="real_name" property="realName" />
        <result column="user_phone" property="userPhone" />
        <result column="id_card" property="idCard" />
@@ -18,6 +20,8 @@
        <result column="refund_money" property="refundMoney" />
        <result column="refund_reason" property="refundReason" />
        <result column="refund_reason_pictures" property="refundReasonPictures" />
        <result column="refund_number" property="refundNumber" />
        <result column="refund_transaction_id" property="refundTransactionId" />
        <result column="bank_card_number" property="bankCardNumber" />
        <result column="cardholder_name" property="cardholderName" />
        <result column="bank_name" property="bankName" />
@@ -33,7 +37,68 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, course_id, app_user_id, pay_type, pay_time, pay_money, real_name, user_phone, id_card, pay_status, request_refund_time, refund_money, refund_reason, refund_reason_pictures, bank_card_number, cardholder_name, bank_name, refund_status, refund_voucher, reject_reason, create_time, update_time, create_by, update_by, disabled
        id, course_id, app_user_id, pay_type, pay_time, pay_money, order_number,transaction_id,
          real_name, user_phone, id_card, pay_status, request_refund_time, refund_money, refund_reason,
          refund_reason_pictures,refund_number, refund_transaction_id, bank_card_number, cardholder_name,
          bank_name, refund_status, refund_voucher, reject_reason, create_time, update_time, create_by,
          update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TCourseOrderVO">
        select tco.id, tco.course_id, tco.app_user_id, tco.pay_type, tco.pay_time, tco.pay_money, tco.order_number,tco.transaction_id,
               tco.real_name, tco.user_phone, tco.id_card, tco.pay_status, tco.request_refund_time, tco.refund_money, tco.refund_reason,
               tco.refund_reason_pictures,tco.refund_number, tco.refund_transaction_id, tco.bank_card_number, tco.cardholder_name,
               tco.bank_name, tco.refund_status, tco.refund_voucher, tco.reject_reason, tco.create_time, tco.update_time, tco.create_by,
               tco.update_by, tco.disabled,tc.course_title,tc.course_type
        from t_course_order tco
        left join t_course tc on tc.id = tco.course_id
        <where>
            <if test="query.courseTitle != null and query.courseTitle != ''">
                AND tc.course_title LIKE concat('%',#{query.courseTitle},'%')
            </if>
            <if test="query.courseType != null">
                AND tc.course_type = #{query.courseType}
            </if>
            <if test="query.realName != null and query.realName != ''">
                AND tco.real_name LIKE concat('%',#{query.realName},'%')
            </if>
            <if test="query.userPhone != null and query.userPhone != ''">
                AND tco.user_phone LIKE concat('%',#{query.userPhone},'%')
            </if>
            <if test="query.payStatus != null">
                AND tco.pay_status = #{query.payStatus}
            </if>
            AND tco.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tco.create_time DESC
    </select>
    <select id="refundPageList" resultType="com.ruoyi.system.vo.TCourseOrderVO">
        select tco.id, tco.course_id, tco.app_user_id, tco.pay_type, tco.pay_time, tco.pay_money, tco.order_number,tco.transaction_id,
        tco.real_name, tco.user_phone, tco.id_card, tco.pay_status, tco.request_refund_time, tco.refund_money, tco.refund_reason,
        tco.refund_reason_pictures,tco.refund_number, tco.refund_transaction_id, tco.bank_card_number, tco.cardholder_name,
        tco.bank_name, tco.refund_status, tco.refund_voucher, tco.reject_reason, tco.create_time, tco.update_time, tco.create_by,
        tco.update_by, tco.disabled,tc.course_title,tc.course_type
        from t_course_order tco
        left join t_course tc on tc.id = tco.course_id
        <where>
            <if test="query.courseTitle != null and query.courseTitle != ''">
                AND tc.course_title LIKE concat('%',#{query.courseTitle},'%')
            </if>
            <if test="query.courseType != null">
                AND tc.course_type = #{query.courseType}
            </if>
            <if test="query.realName != null and query.realName != ''">
                AND tco.real_name LIKE concat('%',#{query.realName},'%')
            </if>
            <if test="query.userPhone != null and query.userPhone != ''">
                AND tco.user_phone LIKE concat('%',#{query.userPhone},'%')
            </if>
            <if test="query.payStatus != null">
                AND tco.pay_status = #{query.payStatus}
            </if>
            AND tco.bank_card_number IS NOT NULL
            AND tco.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tco.create_time DESC
    </select>
</mapper>