更改
This commit is contained in:
parent
ccb2e47b19
commit
72053a0b6e
@ -1,15 +1,18 @@
|
|||||||
package cn.iocoder.yudao.module.base.controller.admin;
|
package cn.iocoder.yudao.module.base.controller.admin;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.base.entity.DriveSchoolAddress;
|
||||||
import cn.iocoder.yudao.module.base.service.DriveSchoolAddressService;
|
import cn.iocoder.yudao.module.base.service.DriveSchoolAddressService;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
@ -36,5 +39,64 @@ public class DriveSchoolAddressController {
|
|||||||
return success(addressService.getList(type, subject, null));
|
return success(addressService.getList(type, subject, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询地址
|
||||||
|
* @param pageReqVO 请求参数
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 每页条数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
public CommonResult<?> page(@Valid DriveSchoolAddress pageReqVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<DriveSchoolAddress> page = new Page<>(pageNo, pageSize);
|
||||||
|
Page<DriveSchoolAddress> resultPage = addressService.page(page, Wrappers.<DriveSchoolAddress>lambdaQuery());
|
||||||
|
return success(resultPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询地址
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/get/{id}")
|
||||||
|
public CommonResult<?> getById(@PathVariable("id") String id) {
|
||||||
|
DriveSchoolAddress address = addressService.getById(id);
|
||||||
|
return success(address);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增地址
|
||||||
|
* @param address 新增的地址信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public CommonResult<?> add(@RequestBody @Valid DriveSchoolAddress address) {
|
||||||
|
addressService.save(address);
|
||||||
|
return success(address);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改地址
|
||||||
|
* @param address 修改后的地址信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public CommonResult<?> update(@RequestBody @Valid DriveSchoolAddress address) {
|
||||||
|
addressService.updateById(address);
|
||||||
|
return success(address);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除地址
|
||||||
|
* @param id id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public CommonResult<?> delete(@PathVariable("id") String id) {
|
||||||
|
addressService.removeById(id);
|
||||||
|
return success(null);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,11 +1,14 @@
|
|||||||
package cn.iocoder.yudao.module.course.controller.admin;
|
package cn.iocoder.yudao.module.course.controller.admin;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||||
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderExportVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -17,8 +20,12 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 驾照报名订单")
|
@Tag(name = "管理后台 - 驾照报名订单")
|
||||||
@ -95,6 +102,17 @@ public class SchoolCourseOrderController {
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出
|
||||||
|
*/
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
public void export(HttpServletResponse response, SchoolCourseOrderVO pageReqVO) throws IOException {
|
||||||
|
Page<SchoolCommissionVO> page = new Page<>(1, 100000);
|
||||||
|
IPage<SchoolCourseOrderVO> schoolCourseOrderVOIPage = schoolCourseOrderService.queryPage(page, pageReqVO);
|
||||||
|
List<SchoolCourseOrderExportVO> schoolCourseOrderExportVOS = BeanUtil.copyToList(schoolCourseOrderVOIPage.getRecords(), SchoolCourseOrderExportVO.class);
|
||||||
|
ExcelUtils.write(response, "订单信息.xls", "订单信息", SchoolCourseOrderExportVO.class, schoolCourseOrderExportVOS);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 快速创建订单
|
* 快速创建订单
|
||||||
*
|
*
|
||||||
|
@ -0,0 +1,139 @@
|
|||||||
|
package cn.iocoder.yudao.module.course.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.annotation.Excel;
|
||||||
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 驾照报名订单 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class SchoolCourseOrderExportVO {
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
@Excel(name = "订单号")
|
||||||
|
private String orderNo;
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 用户姓名
|
||||||
|
*/
|
||||||
|
@Excel(name = "用户姓名")
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 用户手机号
|
||||||
|
*/
|
||||||
|
@Excel(name = "用户手机号")
|
||||||
|
private String userPhone;
|
||||||
|
/**
|
||||||
|
* 用户身份证号
|
||||||
|
*/
|
||||||
|
@Excel(name = "用户身份证号")
|
||||||
|
private String userNo;
|
||||||
|
/**
|
||||||
|
* 用户性别
|
||||||
|
*/
|
||||||
|
@Excel(name = "用户性别", readConverterExp = "男=0,女=1")
|
||||||
|
private String userSex;
|
||||||
|
/**
|
||||||
|
* 课程id
|
||||||
|
*/
|
||||||
|
private String courseId;
|
||||||
|
/**
|
||||||
|
* 课程名字
|
||||||
|
*/
|
||||||
|
@Excel(name = "课程名字")
|
||||||
|
private String courseName;
|
||||||
|
/**
|
||||||
|
* 主负责教练ID
|
||||||
|
*/
|
||||||
|
private Integer coachUserId;
|
||||||
|
/**
|
||||||
|
* 主负责教练姓名
|
||||||
|
*/
|
||||||
|
@Excel(name = "主负责教练姓名")
|
||||||
|
private String coachUserName;
|
||||||
|
/**
|
||||||
|
* 订金金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "订金金额")
|
||||||
|
private BigDecimal reserveMoney;
|
||||||
|
/**
|
||||||
|
* 课程类型
|
||||||
|
*/
|
||||||
|
@Excel(name = "课程类型")
|
||||||
|
private String courseType;
|
||||||
|
/**
|
||||||
|
* 是否终止(0 未终止|1已终止)
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否终止", readConverterExp = "0=未终止,1=已终止")
|
||||||
|
private Boolean ifEnd;
|
||||||
|
/**
|
||||||
|
* 终止原因
|
||||||
|
*/
|
||||||
|
@Excel(name = "终止原因")
|
||||||
|
private String endReason;
|
||||||
|
/**
|
||||||
|
* 终止时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "终止时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
/**
|
||||||
|
* 订单状态 0:待支付 1:已取消 :2:已支付(已报名) 3:待面签 4:已面签 5:已完成 6: 申请退款 7:退款中 8:退款成功
|
||||||
|
*/
|
||||||
|
@Excel(name = "订单状态", readConverterExp = "0=待支付,1=已取消,2=已支付(已报名),3=待面签,4=已面签,5=已完成,6=申请退款,7=退款中,8=退款成功")
|
||||||
|
private String paymentStatus;
|
||||||
|
/**
|
||||||
|
* 是否已面签 0:否 1: 是
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否已面签", readConverterExp = "0=否,1=是")
|
||||||
|
private Integer isSign;
|
||||||
|
/**
|
||||||
|
* 尾款
|
||||||
|
*/
|
||||||
|
@Excel(name = "尾款")
|
||||||
|
private BigDecimal restMoney;
|
||||||
|
/**
|
||||||
|
* 支付类型 1:定金 2:全款
|
||||||
|
*/
|
||||||
|
@Excel(name = "支付类型", readConverterExp = "1=定金,2=全款")
|
||||||
|
private String payType;
|
||||||
|
/**
|
||||||
|
* 是否分配教练 0:否 1:是
|
||||||
|
*/
|
||||||
|
private Integer ifAssignmentCoach;
|
||||||
|
/**
|
||||||
|
* 旧订单id
|
||||||
|
*/
|
||||||
|
private String oldOrderId;
|
||||||
|
/**
|
||||||
|
* 拿证时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "拿证时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date passTime;
|
||||||
|
/**
|
||||||
|
* 毕业时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "毕业时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date gradTime;
|
||||||
|
|
||||||
|
private Boolean isCreated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程封面图
|
||||||
|
*/
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.jx.controller.admin;
|
package cn.iocoder.yudao.module.jx.controller.admin;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.base.service.SchoolFeedbackService;
|
||||||
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
|
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
||||||
import cn.iocoder.yudao.module.jx.service.IDriveSchoolFeedbackService;
|
import cn.iocoder.yudao.module.jx.service.IDriveSchoolFeedbackService;
|
||||||
@ -22,6 +23,9 @@ public class DriveSchoolFeedbackController extends BaseController
|
|||||||
@Resource
|
@Resource
|
||||||
private IDriveSchoolFeedbackService driveSchoolFeedbackService;
|
private IDriveSchoolFeedbackService driveSchoolFeedbackService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SchoolFeedbackService schoolFeedbackService;
|
||||||
|
|
||||||
@GetMapping("/insertData/{content}")
|
@GetMapping("/insertData/{content}")
|
||||||
public void insertData(@PathVariable("content") String content) {
|
public void insertData(@PathVariable("content") String content) {
|
||||||
driveSchoolFeedbackService.insertData(content);
|
driveSchoolFeedbackService.insertData(content);
|
||||||
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.jx.controller.admin;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
import cn.iocoder.yudao.module.company.entity.Company;
|
||||||
|
import cn.iocoder.yudao.module.company.service.CompanyService;
|
||||||
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
|
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
|
||||||
import cn.iocoder.yudao.module.jx.payment.vo.PayVo;
|
import cn.iocoder.yudao.module.jx.payment.vo.PayVo;
|
||||||
@ -29,6 +31,8 @@ public class DriveSchoolInfoController extends BaseController
|
|||||||
private IDriveSchoolInfoService driveSchoolInfoService;
|
private IDriveSchoolInfoService driveSchoolInfoService;
|
||||||
@Resource
|
@Resource
|
||||||
private AdminUserApi userApi;
|
private AdminUserApi userApi;
|
||||||
|
@Resource
|
||||||
|
private CompanyService companyService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询自己的订单
|
* 查询自己的订单
|
||||||
@ -81,7 +85,7 @@ public class DriveSchoolInfoController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据机构id获取驾校信息详细信息
|
* 查询驾校信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getSchoolInfoByDeptId")
|
@GetMapping("/getSchoolInfoByDeptId")
|
||||||
public CommonResult getSchoolInfoByDeptId()
|
public CommonResult getSchoolInfoByDeptId()
|
||||||
@ -89,7 +93,15 @@ public class DriveSchoolInfoController extends BaseController
|
|||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
AdminUserRespDTO sysUser = userApi.getUser(userId);
|
AdminUserRespDTO sysUser = userApi.getUser(userId);
|
||||||
Long deptId = sysUser.getDeptId();
|
Long deptId = sysUser.getDeptId();
|
||||||
return success(driveSchoolInfoService.getSchoolInfoByDeptId(deptId));
|
Company company = new Company();
|
||||||
|
company.setServiceCodes("jiaxiao");
|
||||||
|
IPage<Company> companyPageByServer = companyService.getCompanyPageByServer(company, new Page<Company>(1, 10000));
|
||||||
|
if (companyPageByServer.getTotal() > 0) {
|
||||||
|
// 找出
|
||||||
|
Company company1 = companyPageByServer.getRecords().stream().filter(companyNew -> "jiaxiao".equals(companyNew.getServiceCodes())).findFirst().get();
|
||||||
|
return success(company1);
|
||||||
|
}
|
||||||
|
return success(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.jx.mapper;
|
package cn.iocoder.yudao.module.jx.mapper;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.base.vo.SchoolFeedBackVO;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -32,7 +33,7 @@ public interface DriveSchoolFeedbackMapper
|
|||||||
* @return 反馈集合
|
* @return 反馈集合
|
||||||
*/
|
*/
|
||||||
public IPage<DriveSchoolFeedback> selectDriveSchoolFeedbackList(@Param("entity") DriveSchoolFeedback driveSchoolFeedback, Page<DriveSchoolFeedback> page);
|
public IPage<DriveSchoolFeedback> selectDriveSchoolFeedbackList(@Param("entity") DriveSchoolFeedback driveSchoolFeedback, Page<DriveSchoolFeedback> page);
|
||||||
public List<DriveSchoolFeedback> selectDriveSchoolFeedbackListAll(@Param("entity") DriveSchoolFeedback driveSchoolFeedback);
|
public List<SchoolFeedBackVO> selectDriveSchoolFeedbackListAll(@Param("entity") DriveSchoolFeedback driveSchoolFeedback);
|
||||||
public Integer likeOne(DriveSchoolFeedback driveSchoolFeedback);
|
public Integer likeOne(DriveSchoolFeedback driveSchoolFeedback);
|
||||||
public Integer likeTwo(DriveSchoolFeedback driveSchoolFeedback);
|
public Integer likeTwo(DriveSchoolFeedback driveSchoolFeedback);
|
||||||
public Integer likeThree(DriveSchoolFeedback driveSchoolFeedback);
|
public Integer likeThree(DriveSchoolFeedback driveSchoolFeedback);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.jx.service;
|
package cn.iocoder.yudao.module.jx.service;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.base.vo.SchoolFeedBackVO;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -31,7 +32,7 @@ public interface IDriveSchoolFeedbackService
|
|||||||
* @return 反馈集合
|
* @return 反馈集合
|
||||||
*/
|
*/
|
||||||
public IPage<DriveSchoolFeedback> selectDriveSchoolFeedbackList(DriveSchoolFeedback driveSchoolFeedback, Page<DriveSchoolFeedback> page);
|
public IPage<DriveSchoolFeedback> selectDriveSchoolFeedbackList(DriveSchoolFeedback driveSchoolFeedback, Page<DriveSchoolFeedback> page);
|
||||||
public List<DriveSchoolFeedback> selectDriveSchoolFeedbackListAll(DriveSchoolFeedback driveSchoolFeedback);
|
public List<SchoolFeedBackVO> selectDriveSchoolFeedbackListAll(DriveSchoolFeedback driveSchoolFeedback);
|
||||||
public Map<Object,Object> like(DriveSchoolFeedback driveSchoolFeedback);
|
public Map<Object,Object> like(DriveSchoolFeedback driveSchoolFeedback);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.jx.service.impl;
|
package cn.iocoder.yudao.module.jx.service.impl;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.SchoolFeedBackVO;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback;
|
||||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
|
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
|
||||||
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolFeedbackMapper;
|
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolFeedbackMapper;
|
||||||
@ -62,16 +63,16 @@ public class DriveSchoolFeedbackServiceImpl implements IDriveSchoolFeedbackServi
|
|||||||
@Override
|
@Override
|
||||||
public IPage<DriveSchoolFeedback> selectDriveSchoolFeedbackList(DriveSchoolFeedback driveSchoolFeedback, Page<DriveSchoolFeedback> page)
|
public IPage<DriveSchoolFeedback> selectDriveSchoolFeedbackList(DriveSchoolFeedback driveSchoolFeedback, Page<DriveSchoolFeedback> page)
|
||||||
{
|
{
|
||||||
Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
// Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
||||||
//Long deptId = SecurityUtils.getDeptId();
|
// //Long deptId = SecurityUtils.getDeptId();
|
||||||
if(deptId !=100L){
|
// if(deptId !=100L){
|
||||||
driveSchoolFeedback.setJxId(deptId);
|
// driveSchoolFeedback.setJxId(deptId);
|
||||||
}
|
// }
|
||||||
return driveSchoolFeedbackMapper.selectDriveSchoolFeedbackList(driveSchoolFeedback,page);
|
return driveSchoolFeedbackMapper.selectDriveSchoolFeedbackList(driveSchoolFeedback,page);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DriveSchoolFeedback> selectDriveSchoolFeedbackListAll(DriveSchoolFeedback driveSchoolFeedback)
|
public List<SchoolFeedBackVO> selectDriveSchoolFeedbackListAll(DriveSchoolFeedback driveSchoolFeedback)
|
||||||
{
|
{
|
||||||
Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
||||||
//Long deptId = SecurityUtils.getDeptId();
|
//Long deptId = SecurityUtils.getDeptId();
|
||||||
|
@ -26,26 +26,64 @@
|
|||||||
select * from drive_school_feedback
|
select * from drive_school_feedback
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDriveSchoolFeedbackList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultMap="DriveSchoolFeedbackResult">
|
<select id="selectDriveSchoolFeedbackList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultType="cn.iocoder.yudao.module.base.vo.SchoolFeedBackVO">
|
||||||
<include refid="selectDriveSchoolFeedbackVo"/>
|
SELECT
|
||||||
|
f.id AS feedback_id,
|
||||||
|
f.user_id,
|
||||||
|
f.user_name,
|
||||||
|
f.busi_id,
|
||||||
|
f.evaluate_type,
|
||||||
|
f.rate,
|
||||||
|
f.content,
|
||||||
|
f.teach_content,
|
||||||
|
f.service_content,
|
||||||
|
f.tenant_id,
|
||||||
|
f.deleted,
|
||||||
|
f.creator,
|
||||||
|
f.create_time,
|
||||||
|
f.updater,
|
||||||
|
f.update_time,
|
||||||
|
-- 以下根据 evaluate_type 选择连接不同的表
|
||||||
|
CASE
|
||||||
|
WHEN f.evaluate_type = '0' THEN t.course_name -- 对应训练评价
|
||||||
|
WHEN f.evaluate_type = '1' THEN e.batch_id -- 对应考试评价
|
||||||
|
ELSE NULL
|
||||||
|
END AS related_info,
|
||||||
|
-- 获取教练信息
|
||||||
|
CASE
|
||||||
|
WHEN f.evaluate_type = '0' THEN t.coach_name -- 训练评价时获取教练名称
|
||||||
|
WHEN f.evaluate_type = '1' THEN eb.coach_name -- 考试评价时获取教练名称
|
||||||
|
ELSE NULL
|
||||||
|
END AS coach_name
|
||||||
|
FROM
|
||||||
|
drive_school_feedback f
|
||||||
|
LEFT JOIN drive_school_train t ON f.busi_id = t.id AND f.evaluate_type = '0'
|
||||||
|
LEFT JOIN drive_school_exam_batch_item e ON f.busi_id = e.id AND f.evaluate_type = '1'
|
||||||
|
LEFT JOIN drive_school_exam_batch eb ON e.batch_id = eb.id AND f.evaluate_type = '1' -- 连接考试批次表
|
||||||
|
|
||||||
<where>
|
<where>
|
||||||
deleted = 0
|
f.deleted = b'0' -- 只查询未删除的记录
|
||||||
<if test="entity.userId != null "> and userId = #{entity.userId}</if>
|
<if test="entity.jlName != null and entity.jlName != ''">
|
||||||
<if test="entity.jxName != null and entity.jxName != ''"> and jxName like concat('%',#{entity.jxName},'%') </if>
|
AND (
|
||||||
<if test="entity.jlName != null and entity.jlName != ''"> and jlName like concat('%',#{entity.jlName},'%')</if>
|
t.coach_name LIKE CONCAT('%', #{entity.jlName}, '%')
|
||||||
<if test="entity.evaluateType != null "> and evaluateType = #{entity.evaluateType}</if>
|
OR eb.coach_name LIKE CONCAT('%', #{entity.jlName}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="entity.evaluateType != null and entity.evaluateType != ''">
|
||||||
|
AND f.evaluate_type = #{entity.evaluateType}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDriveSchoolFeedbackListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultMap="DriveSchoolFeedbackResult">
|
<select id="selectDriveSchoolFeedbackListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultType="cn.iocoder.yudao.module.base.vo.SchoolFeedBackVO">
|
||||||
<include refid="selectDriveSchoolFeedbackVo"/>
|
<include refid="selectDriveSchoolFeedbackVo"/>
|
||||||
<where>
|
<where>
|
||||||
deleted = 0
|
deleted = 0
|
||||||
<if test="entity.userId != null "> and userId = #{entity.userId}</if>
|
<if test="entity.userId != null "> and userId = #{entity.userId}</if>
|
||||||
<if test="entity.jxName != null and entity.jxName != ''"> and jxName like concat('%',#{entity.jxName},'%') </if>
|
<if test="entity.jxName != null and entity.jxName != ''"> and jxName like concat('%',#{entity.jxName},'%') </if>
|
||||||
<if test="entity.jlName != null and entity.jlName != ''"> and jlName like concat('%',#{entity.jlName},'%')</if>
|
<if test="entity.jlName != null and entity.jlName != ''"> and jlName like concat('%',#{entity.jlName},'%')</if>
|
||||||
<if test="entity.evaluateType != null "> and evaluateType = #{entity.evaluateType}</if>
|
<if test="entity.evaluateType != null "> and evaluate_type = #{entity.evaluateType}</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@ -33,9 +33,15 @@
|
|||||||
<if test="entity.userId != null and entity.userId != ''">
|
<if test="entity.userId != null and entity.userId != ''">
|
||||||
and dsrc.user_id =#{entity.userId}
|
and dsrc.user_id =#{entity.userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="entity.userName != null and entity.userName != ''">
|
||||||
|
and dsrc.user_name LIKE (CONCAT('%',#{entity.userName},'%'))
|
||||||
|
</if>
|
||||||
<if test="entity.coachId != null and entity.coachId != ''">
|
<if test="entity.coachId != null and entity.coachId != ''">
|
||||||
and dsrc.coach_id =#{entity.coachId}
|
and dsrc.coach_id =#{entity.coachId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="entity.coachName != null and entity.coachName != ''">
|
||||||
|
and dsrc.coach_name LIKE (CONCAT('%',#{entity.coachName},'%'))
|
||||||
|
</if>
|
||||||
<if test="entity.courseId != null and entity.courseId != ''">
|
<if test="entity.courseId != null and entity.courseId != ''">
|
||||||
and dsrc.course_id =#{entity.courseId}
|
and dsrc.course_id =#{entity.courseId}
|
||||||
</if>
|
</if>
|
||||||
|
Loading…
Reference in New Issue
Block a user