0327
This commit is contained in:
parent
5e66db1455
commit
925191a753
@ -0,0 +1,71 @@
|
||||
package cn.iocoder.yudao.module.app.company.controller;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.company.entity.Company;
|
||||
import cn.iocoder.yudao.module.company.service.CompanyService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 用于需要获取企业信息的地方
|
||||
* 如维修的附近修理厂
|
||||
*
|
||||
* @author 小李
|
||||
* @date 14:04 2024/9/23
|
||||
**/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/userClient/base/companySmallProgram")
|
||||
@Tag(name = "API - BASE 小程序驾校查询")
|
||||
@Validated
|
||||
public class CompanySmallProgramAPI {
|
||||
|
||||
@Resource
|
||||
private CompanyService companyService;
|
||||
|
||||
/**
|
||||
* 通过服务名称查能提供服务的企业 分页(不拼接租户ID)
|
||||
*
|
||||
* @author 小李
|
||||
* @date 14:09 2024/9/23
|
||||
* @param company 企业对象,主要是serverCodes
|
||||
* @param pageNO 页码
|
||||
* @param pageSize 条数
|
||||
**/
|
||||
@GetMapping("/pageNoTenantId")
|
||||
@Operation(summary = "通过服务名称查能提供服务的企业 分页-小程序")
|
||||
@TenantIgnore
|
||||
@PermitAll
|
||||
public CommonResult<?> getCompanyPageNoTenantIdByServer(Company company,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNO,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
||||
Page<Company> page = new Page<>(pageNO, pageSize);
|
||||
return success(companyService.getCompanyPageByServer(company, page));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查企业能提供的业务
|
||||
*
|
||||
* @author 小李
|
||||
* @date 10:21 2024/9/24
|
||||
* @param id 企业ID
|
||||
**/
|
||||
@GetMapping("/noTenantIdGet")
|
||||
@Operation(summary = "查企业能提供的业务-小程序")
|
||||
@TenantIgnore
|
||||
public CommonResult<?> getCompanyServerNoTenantIdById(@RequestParam("id") String id){
|
||||
return success(companyService.getCompanyServerById(id));
|
||||
}
|
||||
}
|
@ -76,8 +76,8 @@ public class WechatServiceImpl implements WechatService {
|
||||
|
||||
/**
|
||||
* 获取openId
|
||||
* @author vinjor-M
|
||||
* @date 23:56 2024/9/23
|
||||
* @author vinjor-M
|
||||
* @date 23:56 2024/9/23
|
||||
* @param code (静默/非静默)授权拿到的code
|
||||
* @return java.util.Map<java.lang.String,java.lang.String>
|
||||
**/
|
||||
@ -148,6 +148,7 @@ public class WechatServiceImpl implements WechatService {
|
||||
dataFrom = SystemEnum.INSPECTION.getDataFrom();
|
||||
}else if(SystemEnum.SCHOOL.getCode().equals(sysCode)){
|
||||
//驾校业务系统
|
||||
user.setDriverOpenId(openId);
|
||||
dataFrom = SystemEnum.SCHOOL.getDataFrom();
|
||||
}else if(SystemEnum.RESCUE.getCode().equals(sysCode)){
|
||||
//救援业务系统
|
||||
|
@ -109,4 +109,4 @@ public class DlDriveSchoolCourseController {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.base.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCoachService;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "小程序 - 驾校教练")
|
||||
@RestController
|
||||
@RequestMapping("/dl-drive-school-coach-small")
|
||||
@Validated
|
||||
public class DlDriveSchoolCoachSmallProgramController {
|
||||
|
||||
@Resource
|
||||
private DlDriveSchoolCoachService dlDriveSchoolCoachService;
|
||||
|
||||
/**
|
||||
* 驾校教练、普通员工列表
|
||||
*
|
||||
* @param pageReqVO {@link DlDriveSchoolCoachPageReqVO}
|
||||
* @param pageNo 分页参数第几页
|
||||
* @param pageSize 分页参数每页多少条数据
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < ?>>
|
||||
* @author PQZ
|
||||
* @date 14:58 2025/1/16
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得驾校教练分页")
|
||||
@TenantIgnore
|
||||
@PermitAll
|
||||
public CommonResult<IPage<?>> getDlDriveSchoolCoachPage(DlDriveSchoolCoachPageReqVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<DlDriveSchoolCoachRespVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(dlDriveSchoolCoachService.queryListPage(pageReqVO, page));
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.base.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.jx.payment.vo.PayVo;
|
||||
import cn.iocoder.yudao.module.jx.service.DrivePayService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/small/driving")
|
||||
public class DrivePaySmallProgramController {
|
||||
|
||||
@Resource
|
||||
private DrivePayService drivePayService;
|
||||
|
||||
@GetMapping("/findSelfInfo")
|
||||
@TenantIgnore
|
||||
@PermitAll
|
||||
public PayVo findSelfInfo() {
|
||||
return drivePayService.findSelfInfo();
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package cn.iocoder.yudao.module.base.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCourseService;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCourseVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "驾校课程")
|
||||
@RestController
|
||||
@RequestMapping("/dl-drive-school-course-small")
|
||||
@Validated
|
||||
public class DriveSchoolCourseSmallController {
|
||||
|
||||
@Resource
|
||||
private DlDriveSchoolCourseService courseService;
|
||||
|
||||
/**
|
||||
* 分页获取课程信息
|
||||
*
|
||||
* @param pageReqVO {@link DlDriveSchoolCourseVO}
|
||||
* @param pageNo 分页参数-第几页
|
||||
* @param pageSize 分页参数-当前页有多少条数据
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < ?>>
|
||||
* @author PQZ
|
||||
* @date 22:20 2025/1/16
|
||||
**/
|
||||
@GetMapping("/noTenantIdPage")
|
||||
@Operation(summary = "分页获取课程信息")
|
||||
@TenantIgnore
|
||||
@PermitAll
|
||||
public CommonResult<IPage<?>> getDlDriveSchoolCourseNoTenantIdPage(DlDriveSchoolCourseVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<DlDriveSchoolCourseVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(courseService.queryListPage(pageReqVO, page));
|
||||
}
|
||||
|
||||
/**
|
||||
* 不分页获取课程信息
|
||||
*
|
||||
* @param pageReqVO {@link DlDriveSchoolCourseVO}
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.util.List < ?>>
|
||||
* @author PQZ
|
||||
* @date 22:22 2025/1/16
|
||||
**/
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "不分页获取课程信息")
|
||||
@TenantIgnore
|
||||
public CommonResult<List<?>> getDlDriveSchoolCourseList(DlDriveSchoolCourseVO pageReqVO) {
|
||||
return success(courseService.queryList(pageReqVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取课程信息
|
||||
*
|
||||
* @param id 课程id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO>
|
||||
* @author PQZ
|
||||
* @date 22:26 2025/1/16
|
||||
**/
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取课程信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@TenantIgnore
|
||||
public CommonResult<DlDriveSchoolCourseVO> getDlDriveSchoolCoach(@RequestParam("id") String id) {
|
||||
return success(courseService.queryDetailById(id));
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.base.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolContract;
|
||||
import cn.iocoder.yudao.module.jx.service.IDriveContractTestService;
|
||||
import cn.iocoder.yudao.module.jx.service.IDriveSchoolContractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/small/driveSchool/obtainContract")
|
||||
public class ObtainDriveContractController {
|
||||
|
||||
@Autowired
|
||||
private IDriveContractTestService driveContractTestService;
|
||||
|
||||
@Autowired
|
||||
private IDriveSchoolContractService driveSchoolContractService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取合同模板详细信息
|
||||
*/
|
||||
@GetMapping(value = "/tenantId/{tenantId}")
|
||||
@TenantIgnore
|
||||
public CommonResult getInfoByTenantId(@PathVariable("tenantId") String tenantId)
|
||||
{
|
||||
return CommonResult.success(driveContractTestService.selectDriveContractTestByTenantId(tenantId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增驾校合同
|
||||
*/
|
||||
@PostMapping
|
||||
public CommonResult add(@RequestBody DriveSchoolContract driveSchoolContract)
|
||||
{
|
||||
return CommonResult.success(driveSchoolContractService.insertDriveSchoolContractNew(driveSchoolContract));
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package cn.iocoder.yudao.module.base.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "小程序 - 驾照报名订单")
|
||||
@RestController
|
||||
@RequestMapping("/small/drive/school-course-order")
|
||||
@Validated
|
||||
public class SchoolCourseOrderSmallProgramController {
|
||||
|
||||
@Resource
|
||||
private SchoolCourseOrderService schoolCourseOrderService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建驾照报名订单")
|
||||
@TenantIgnore
|
||||
public CommonResult<String> createSchoolCourseOrder(@Valid @RequestBody SchoolCourseOrderVO createReqVO) {
|
||||
return success(schoolCourseOrderService.createSchoolCourseOrder(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新驾照报名订单")
|
||||
@TenantIgnore
|
||||
public CommonResult<Boolean> updateSchoolCourseOrder(@Valid @RequestBody SchoolCourseOrderVO updateReqVO) {
|
||||
schoolCourseOrderService.updateSchoolCourseOrder(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@TenantIgnore
|
||||
@Operation(summary = "获得驾照报名订单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<SchoolCourseOrderVO> getSchoolCourseOrder(@RequestParam("id") String id) {
|
||||
SchoolCourseOrder schoolCourseOrder = schoolCourseOrderService.getSchoolCourseOrder(id);
|
||||
return success(BeanUtils.toBean(schoolCourseOrder, SchoolCourseOrderVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得驾照报名订单分页
|
||||
*
|
||||
* @param pageReqVO {@link SchoolCourseOrderVO}
|
||||
* @param pageNo 分页参数
|
||||
* @param pageSize 分页参数
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < ?>>
|
||||
* @author PQZ
|
||||
* @date 10:08 2025/2/25
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@TenantIgnore
|
||||
@Operation(summary = "获得驾照报名订单分页")
|
||||
@PermitAll
|
||||
public CommonResult<IPage<?>> getSchoolCourseOrderPage(SchoolCourseOrderVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<SchoolCommissionVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(schoolCourseOrderService.queryPage(page,pageReqVO));
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.base.controller.app;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.infra.controller.app.file.vo.AppFileUploadReqVO;
|
||||
import cn.iocoder.yudao.module.infra.service.file.FileService;
|
||||
import cn.iocoder.yudao.module.jx.service.DrivePayService;
|
||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/small-upload")
|
||||
public class SmallProgramSwiperController {
|
||||
|
||||
@Resource
|
||||
private FileService fileService;
|
||||
|
||||
@Autowired
|
||||
private DrivePayService drivePayService;
|
||||
|
||||
@PostMapping({"/common/uploadImg","/common/upload"})
|
||||
@Operation(summary = "上传文件")
|
||||
@TenantIgnore
|
||||
public CommonResult uploadFile(AppFileUploadReqVO uploadReqVO) throws Exception {
|
||||
MultipartFile file = uploadReqVO.getFile();
|
||||
String path = uploadReqVO.getPath();
|
||||
String url = fileService.createFile(file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream()));
|
||||
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("url", url);
|
||||
map.put("fileName", file.getName());
|
||||
map.put("newFileName", FileUtil.getName(url));
|
||||
map.put("originalFilename", file.getOriginalFilename());
|
||||
|
||||
return success(map);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/idOcr")
|
||||
public CommonResult idOcr(@RequestParam("imagePath") String imagePath) throws TencentCloudSDKException {
|
||||
return success(drivePayService.infoCardOCR(imagePath));
|
||||
}
|
||||
}
|
@ -26,6 +26,14 @@ public interface DriveContractTestMapper
|
||||
*/
|
||||
public DriveContractTest selectDriveContractTestById(Long id);
|
||||
|
||||
/**
|
||||
* 查询合同模板
|
||||
*
|
||||
* @param tenantId 合同模板租户id
|
||||
* @return 合同模板
|
||||
*/
|
||||
public DriveContractTest selectDriveContractTestByTenantId(String tenantId);
|
||||
|
||||
/**
|
||||
* 查询合同模板列表
|
||||
*
|
||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.jx.payment.api;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse;
|
||||
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCoachMapper;
|
||||
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCourseMapper;
|
||||
@ -71,6 +72,8 @@ public class JxOrderController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* type:h5、jsapi、app、native、sub_jsapi
|
||||
* @param type
|
||||
|
@ -0,0 +1,359 @@
|
||||
package cn.iocoder.yudao.module.jx.payment.app;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse;
|
||||
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCourseMapper;
|
||||
import cn.iocoder.yudao.module.jx.payment.entity.PayEntity;
|
||||
import cn.iocoder.yudao.module.jx.payment.mapper.DrivePayMapper;
|
||||
import cn.iocoder.yudao.module.jx.payment.utils.AesUtil;
|
||||
import cn.iocoder.yudao.module.jx.payment.utils.WechatPayRequests;
|
||||
import cn.iocoder.yudao.module.jx.service.DrivePayService;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import cn.iocoder.yudao.util.WechatPayConfig;
|
||||
import cn.iocoder.yudao.util.WechatPayUrlEnum;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alibaba.fastjson2.TypeReference;
|
||||
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/small/jxInfo")
|
||||
public class SmallProgramJxOrderController {
|
||||
|
||||
@Resource
|
||||
private DrivePayService drivePayService;
|
||||
@Resource
|
||||
private WechatPayConfig wechatPayConfigs;
|
||||
@Resource
|
||||
private WechatPayRequests wechatPayRequests;
|
||||
@Resource
|
||||
private DrivePayMapper drivePayMapper;
|
||||
@Resource
|
||||
private DriveSchoolCourseMapper driveSchoolCourseMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
@Resource
|
||||
private SchoolCourseOrderService schoolCourseOrderService;
|
||||
|
||||
|
||||
@PostMapping("/offLinePay")
|
||||
public CommonResult offLinePay(@RequestBody SchoolCourseOrder schoolCourseOrder) {
|
||||
SchoolCourseOrderVO schoolCourseOrderVO = BeanUtils.toBean(schoolCourseOrder, SchoolCourseOrderVO.class);
|
||||
schoolCourseOrderVO.setPaymentStatus("0");
|
||||
boolean exists = false;
|
||||
String orderNo;
|
||||
int retryCount = 0;
|
||||
int maxRetry = 5;
|
||||
|
||||
do {
|
||||
// 1. 生成订单号(示例:时间戳 + 随机数)
|
||||
orderNo = "ORD" + System.currentTimeMillis() +
|
||||
ThreadLocalRandom.current().nextInt(100, 999);
|
||||
|
||||
// 2. 检查订单号是否已存在
|
||||
exists = schoolCourseOrderService.lambdaQuery()
|
||||
.eq(SchoolCourseOrder::getOrderNo, orderNo)
|
||||
.exists();
|
||||
|
||||
retryCount++;
|
||||
} while (exists);
|
||||
schoolCourseOrderVO.setOrderNo(orderNo);
|
||||
schoolCourseOrderService.createSchoolCourseOrder(schoolCourseOrderVO);
|
||||
return CommonResult.success("ok");
|
||||
}
|
||||
|
||||
@PostMapping("/onLinePay")
|
||||
public Map<String,String> userPayOnLine(@RequestBody SchoolCourseOrder schoolCourseOrder) {
|
||||
SchoolCourseOrderVO schoolCourseOrderVO = BeanUtils.toBean(schoolCourseOrder, SchoolCourseOrderVO.class);
|
||||
schoolCourseOrderVO.setPaymentStatus("0");
|
||||
|
||||
// 生成 14 位订单号
|
||||
Random random = new Random();
|
||||
StringBuilder number = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < 14; i++) {
|
||||
int randomDigit = random.nextInt(10);
|
||||
number.append(randomDigit);
|
||||
}
|
||||
String randomNumber = number.toString();
|
||||
schoolCourseOrderVO.setOrderNo(randomNumber);
|
||||
log.info("随机数为 ====================>>> {}", randomNumber);
|
||||
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
log.info("当前用户id ============>,{}", userId);
|
||||
schoolCourseOrderVO.setUserId(Math.toIntExact(userId));
|
||||
|
||||
|
||||
String orderId = schoolCourseOrderService.createSchoolCourseOrder(schoolCourseOrderVO);
|
||||
SchoolCourseOrder dbSchoolCourseOrder = schoolCourseOrderService.getSchoolCourseOrder(orderId);
|
||||
String orderNo = dbSchoolCourseOrder.getOrderNo();
|
||||
Map<String,String> resMap = new HashMap<>();
|
||||
resMap.put("orderNo",orderNo);
|
||||
resMap.put("orderId",orderId);
|
||||
|
||||
return resMap;
|
||||
}
|
||||
|
||||
@GetMapping("/prepayment")
|
||||
public Map<String,Object> transactions(String type, String orderId, String orderNo, String payType) throws SignatureException, NoSuchAlgorithmException, InvalidKeyException, IOException {
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
AdminUserRespDTO user = userApi.getUser(userId);
|
||||
|
||||
SchoolCourseOrder dbSchoolCourseOrder = schoolCourseOrderService.getSchoolCourseOrder(orderId);
|
||||
|
||||
// 统一参数封装
|
||||
Map<String, Object> params = new HashMap<>(8);
|
||||
params.put("appid", wechatPayConfigs.getJxAppId());
|
||||
params.put("mchid", wechatPayConfigs.getMchId());
|
||||
params.put("description", dbSchoolCourseOrder.getCourseName());
|
||||
params.put("out_trade_no", orderNo);
|
||||
params.put("notify_url", wechatPayConfigs.getNotifyUrl());
|
||||
Map<String, Object> amountMap = new HashMap<>(4);
|
||||
|
||||
Double amount = 0.0;
|
||||
// 金额单位为分
|
||||
amount = dbSchoolCourseOrder.getReserveMoney().doubleValue()*100;
|
||||
if (payType.equals("2")){
|
||||
amount = dbSchoolCourseOrder.getReserveMoney().doubleValue()*100;
|
||||
}
|
||||
amountMap.put("total", amount.intValue());
|
||||
//人民币
|
||||
amountMap.put("currency", "CNY");
|
||||
params.put("amount", amountMap);
|
||||
|
||||
// 场景信息
|
||||
Map<String, Object> sceneInfoMap = new HashMap<>(4);
|
||||
// 客户端IP
|
||||
sceneInfoMap.put("payer_client_ip", "127.0.0.1");
|
||||
// 商户端设备号(门店号或收银设备ID)
|
||||
sceneInfoMap.put("device_id", "127.0.0.1");
|
||||
// 除H5与JSAPI有特殊参数外,其他的支付方式都一样
|
||||
if (type.equals(WechatPayUrlEnum.H5.getType())) {
|
||||
Map<String, Object> h5InfoMap = new HashMap<>(4);
|
||||
// 场景类型:iOS, Android, Wap
|
||||
h5InfoMap.put("type", "IOS");
|
||||
sceneInfoMap.put("h5_info", h5InfoMap);
|
||||
} else if (type.equals(WechatPayUrlEnum.JSAPI.getType()) || type.equals(WechatPayUrlEnum.SUB_JSAPI.getType())) {
|
||||
Map<String, Object> payerMap = new HashMap<>(4);
|
||||
payerMap.put("openid", user.getDriverOpenId());
|
||||
params.put("payer", payerMap);
|
||||
}
|
||||
params.put("scene_info", sceneInfoMap);
|
||||
String paramsStr = JSON.toJSONString(params);
|
||||
log.info("请求参数 ===> {}" + paramsStr);
|
||||
String resStr = wechatPayRequests.wechatHttpPost("https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi",paramsStr);
|
||||
Map<String, Object> resMap = JSONObject.parseObject(resStr, new TypeReference<Map<String, Object>>(){});
|
||||
Map<String, Object> signMap = paySignMsg(resMap.get("prepay_id").toString(), wechatPayConfigs.getAppId(),null);
|
||||
return signMap;
|
||||
}
|
||||
|
||||
String buildMessage(String appId, String timestamp,String nonceStr,String prepay_id) {
|
||||
|
||||
return appId + "\n"
|
||||
+ timestamp + "\n"
|
||||
+ nonceStr + "\n"
|
||||
+ prepay_id + "\n";
|
||||
}
|
||||
|
||||
String sign(byte[] message,String privateKeyStr) throws NoSuchAlgorithmException, SignatureException, IOException, InvalidKeyException {
|
||||
//签名方式
|
||||
Signature sign = Signature.getInstance("SHA256withRSA");
|
||||
//私钥,通过MyPrivateKey来获取,这是个静态类可以接调用方法 ,需要的是_key.pem文件的绝对路径配上文件名
|
||||
PrivateKey privateKey =null;
|
||||
if (StringUtils.isNotEmpty(privateKeyStr)){
|
||||
privateKey = PemUtil.loadPrivateKey(privateKeyStr);
|
||||
}else {
|
||||
privateKey = wechatPayConfigs.getPrivateKey(wechatPayConfigs.getKeyPemPath());
|
||||
}
|
||||
|
||||
sign.initSign(privateKey);
|
||||
sign.update(message);
|
||||
return Base64.getEncoder().encodeToString(sign.sign());
|
||||
}
|
||||
|
||||
private Map<String, Object> paySignMsg(String prepayId,String appId,String privateKeyStr) throws IOException, NoSuchAlgorithmException, InvalidKeyException, SignatureException {
|
||||
long timeMillis = System.currentTimeMillis();
|
||||
String timeStamp = timeMillis/1000+"";
|
||||
String nonceStr = timeMillis+"";
|
||||
String packageStr = "prepay_id="+prepayId;
|
||||
// 公共参数
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
resMap.put("nonceStr",nonceStr);
|
||||
resMap.put("timeStamp",timeStamp);
|
||||
resMap.put("appId",appId);
|
||||
resMap.put("package", packageStr);
|
||||
// 使用字段appId、timeStamp、nonceStr、package进行签名
|
||||
//从下往上依次生成
|
||||
String message = buildMessage(appId, timeStamp, nonceStr, packageStr);
|
||||
//签名
|
||||
String paySign = sign(message.getBytes("utf-8"), privateKeyStr);
|
||||
resMap.put("paySign", paySign);
|
||||
resMap.put("signType", "RSA");
|
||||
return resMap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*@PostMapping("/insertPay")
|
||||
public String UserPay(@RequestBody SchoolCourseOrder schoolCourseOrder) {
|
||||
drivePayService.insertPayInfoNew(schoolCourseOrder);
|
||||
return SchoolCourseOrder.getOrderNo();
|
||||
|
||||
}*/
|
||||
|
||||
/**
|
||||
* type:h5、jsapi、app、native、sub_jsapi
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
/*@GetMapping("/prepayment")
|
||||
public Map<String,Object> transactions(String type, Long orderNo, String payType) throws SignatureException, NoSuchAlgorithmException, InvalidKeyException, IOException {
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
AdminUserRespDTO user = userApi.getUser(userId);
|
||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// OrderInfo orderInfo = orderInfoService.getById(orderId);
|
||||
// 钱, 商品名称
|
||||
// PayVo payVoList = drivePayMapper.findPayListByUserId(SecurityFrameworkUtils.getLoginUserId());
|
||||
|
||||
DriveSchoolCourse driveSchoolCourse = driveSchoolCourseMapper.findSchoolCourseByOrderNumber(orderNo);
|
||||
// DriveSchoolInfo driveSchoolInfo = driveSchoolInfoMapper.selectDriveSchoolInfoById(Long.valueOf(payVoList.getJxId()));
|
||||
// DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectDriveSchoolCoachById(Long.valueOf(payVoList.getJlId()));
|
||||
|
||||
// 统一参数封装
|
||||
Map<String, Object> params = new HashMap<>(8);
|
||||
params.put("appid", wechatPayConfigs.getAppId());
|
||||
params.put("mchid", wechatPayConfigs.getMchId());
|
||||
params.put("description", driveSchoolCourse.getName());
|
||||
params.put("out_trade_no", orderNo.toString());
|
||||
params.put("notify_url", wechatPayConfigs.getNotifyUrl());
|
||||
Map<String, Object> amountMap = new HashMap<>(4);
|
||||
|
||||
Double amount = 0.0;
|
||||
// 金额单位为分
|
||||
amount = driveSchoolCourse.getReserveMoney().doubleValue()*100;
|
||||
if (payType.equals("2")){
|
||||
amount = driveSchoolCourse.getPrice().doubleValue()*100;
|
||||
}
|
||||
amountMap.put("total", amount.intValue());
|
||||
//人民币
|
||||
amountMap.put("currency", "CNY");
|
||||
params.put("amount", amountMap);
|
||||
|
||||
// 场景信息
|
||||
Map<String, Object> sceneInfoMap = new HashMap<>(4);
|
||||
// 客户端IP
|
||||
sceneInfoMap.put("payer_client_ip", "127.0.0.1");
|
||||
// 商户端设备号(门店号或收银设备ID)
|
||||
sceneInfoMap.put("device_id", "127.0.0.1");
|
||||
// 除H5与JSAPI有特殊参数外,其他的支付方式都一样
|
||||
if (type.equals(WechatPayUrlEnum.H5.getType())) {
|
||||
Map<String, Object> h5InfoMap = new HashMap<>(4);
|
||||
// 场景类型:iOS, Android, Wap
|
||||
h5InfoMap.put("type", "IOS");
|
||||
sceneInfoMap.put("h5_info", h5InfoMap);
|
||||
} else if (type.equals(WechatPayUrlEnum.JSAPI.getType()) || type.equals(WechatPayUrlEnum.SUB_JSAPI.getType())) {
|
||||
Map<String, Object> payerMap = new HashMap<>(4);
|
||||
//payerMap.put("openid", user.getJcOpenId());
|
||||
params.put("payer", payerMap);
|
||||
}
|
||||
params.put("scene_info", sceneInfoMap);
|
||||
String paramsStr = JSON.toJSONString(params);
|
||||
log.info("请求参数 ===> {}" + paramsStr);
|
||||
String resStr = wechatPayRequests.wechatHttpPost("https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi",paramsStr);
|
||||
Map<String, Object> resMap = JSONObject.parseObject(resStr, new TypeReference<Map<String, Object>>(){});
|
||||
Map<String, Object> signMap = paySignMsg(resMap.get("prepay_id").toString(), wechatPayConfigs.getAppId(),null);
|
||||
return signMap;
|
||||
}
|
||||
|
||||
String buildMessage(String appId, String timestamp,String nonceStr,String prepay_id) {
|
||||
|
||||
return appId + "\n"
|
||||
+ timestamp + "\n"
|
||||
+ nonceStr + "\n"
|
||||
+ prepay_id + "\n";
|
||||
}
|
||||
|
||||
String sign(byte[] message,String privateKeyStr) throws NoSuchAlgorithmException, SignatureException, IOException, InvalidKeyException {
|
||||
//签名方式
|
||||
Signature sign = Signature.getInstance("SHA256withRSA");
|
||||
//私钥,通过MyPrivateKey来获取,这是个静态类可以接调用方法 ,需要的是_key.pem文件的绝对路径配上文件名
|
||||
PrivateKey privateKey =null;
|
||||
if (StringUtils.isNotEmpty(privateKeyStr)){
|
||||
privateKey = PemUtil.loadPrivateKey(privateKeyStr);
|
||||
}else {
|
||||
privateKey = wechatPayConfigs.getPrivateKey(wechatPayConfigs.getKeyPemPath());
|
||||
}
|
||||
|
||||
sign.initSign(privateKey);
|
||||
sign.update(message);
|
||||
return Base64.getEncoder().encodeToString(sign.sign());
|
||||
}
|
||||
|
||||
private Map<String, Object> paySignMsg(String prepayId,String appId,String privateKeyStr) throws IOException, NoSuchAlgorithmException, InvalidKeyException, SignatureException {
|
||||
long timeMillis = System.currentTimeMillis();
|
||||
String timeStamp = timeMillis/1000+"";
|
||||
String nonceStr = timeMillis+"";
|
||||
String packageStr = "prepay_id="+prepayId;
|
||||
// 公共参数
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
resMap.put("nonceStr",nonceStr);
|
||||
resMap.put("timeStamp",timeStamp);
|
||||
resMap.put("appId",appId);
|
||||
resMap.put("package", packageStr);
|
||||
// 使用字段appId、timeStamp、nonceStr、package进行签名
|
||||
//从下往上依次生成
|
||||
String message = buildMessage(appId, timeStamp, nonceStr, packageStr);
|
||||
//签名
|
||||
String paySign = sign(message.getBytes("utf-8"), privateKeyStr);
|
||||
resMap.put("paySign", paySign);
|
||||
resMap.put("signType", "RSA");
|
||||
return resMap;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/payNotify")
|
||||
public Map<String, String> payNotify(@RequestBody JSONObject jsonObject) throws GeneralSecurityException, IOException {
|
||||
String key = wechatPayConfigs.getApiV3Key();
|
||||
String json = jsonObject.toString();
|
||||
String associated_data = (String) JSONUtil.getByPath(JSONUtil.parse(json), "resource.associated_data");
|
||||
String ciphertext = (String) JSONUtil.getByPath(JSONUtil.parse(json), "resource.ciphertext");
|
||||
String nonce = (String) JSONUtil.getByPath(JSONUtil.parse(json), "resource.nonce");
|
||||
|
||||
String decryptData = new AesUtil(key.getBytes(StandardCharsets.UTF_8)).decryptToString(associated_data.getBytes(StandardCharsets.UTF_8), nonce.getBytes(StandardCharsets.UTF_8), ciphertext);
|
||||
//验签成功
|
||||
JSONObject decryptDataObj = JSONObject.parseObject(decryptData, JSONObject.class);
|
||||
|
||||
String orderNo = decryptDataObj.get("out_trade_no").toString();
|
||||
|
||||
drivePayMapper.updatePayByOrderNumber(orderNo);
|
||||
|
||||
Map<String, String> res = new HashMap<>();
|
||||
res.put("code", "SUCCESS");
|
||||
res.put("message", "成功");
|
||||
return res;
|
||||
}*/
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.jx.service;
|
||||
|
||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||
import cn.iocoder.yudao.module.jx.payment.entity.PayEntity;
|
||||
import cn.iocoder.yudao.module.jx.payment.vo.PayNumberVo;
|
||||
import cn.iocoder.yudao.module.jx.payment.vo.PayVo;
|
||||
@ -30,5 +31,7 @@ public interface DrivePayService {
|
||||
void insertBookingInfo(String currentDate, Integer period, Integer jlId);
|
||||
JSONObject infoCardOCR(String imagePath) throws TencentCloudSDKException;
|
||||
|
||||
Integer insterOffLinePayInfo(SchoolCourseOrder schoolCourseOrder);
|
||||
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,14 @@ public interface IDriveContractTestService
|
||||
*/
|
||||
public DriveContractTest selectDriveContractTestById(Long id);
|
||||
|
||||
/**
|
||||
* 查询合同模板
|
||||
*
|
||||
* @param tenantId 合同模板租户id
|
||||
* @return 合同模板
|
||||
*/
|
||||
public DriveContractTest selectDriveContractTestByTenantId(String tenantId);
|
||||
|
||||
/**
|
||||
* 查询合同模板列表
|
||||
*
|
||||
|
@ -37,6 +37,7 @@ public interface IDriveSchoolContractService
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDriveSchoolContract(DriveSchoolContract driveSchoolContract);
|
||||
public int insertDriveSchoolContractNew(DriveSchoolContract driveSchoolContract);
|
||||
|
||||
/**
|
||||
* 修改驾校合同
|
||||
|
@ -35,6 +35,18 @@ public class DriveContractTestServiceImpl implements IDriveContractTestService
|
||||
return driveContractTestMapper.selectDriveContractTestById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询合同模板
|
||||
*
|
||||
* @param tenantId 合同模板租户id
|
||||
* @return 合同模板
|
||||
*/
|
||||
@Override
|
||||
public DriveContractTest selectDriveContractTestByTenantId(String tenantId)
|
||||
{
|
||||
return driveContractTestMapper.selectDriveContractTestByTenantId(tenantId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询合同模板列表
|
||||
*
|
||||
|
@ -2,6 +2,9 @@ package cn.iocoder.yudao.module.jx.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCourse;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCourseService;
|
||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||
import cn.iocoder.yudao.module.jx.payment.entity.PayEntity;
|
||||
import cn.iocoder.yudao.module.jx.payment.mapper.DrivePayMapper;
|
||||
import cn.iocoder.yudao.module.jx.payment.utils.PhoneValidator;
|
||||
@ -59,6 +62,9 @@ public class DrivePayServiceImpl implements DrivePayService {
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
@Resource
|
||||
private DlDriveSchoolCourseService courseService;
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject infoCardOCR(String imagePath) throws TencentCloudSDKException {
|
||||
@ -120,6 +126,8 @@ public class DrivePayServiceImpl implements DrivePayService {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<PayVo> findPayListAll(Integer state) {
|
||||
|
||||
@ -343,6 +351,14 @@ public class DrivePayServiceImpl implements DrivePayService {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 线下支付
|
||||
*/
|
||||
@Override
|
||||
public Integer insterOffLinePayInfo(SchoolCourseOrder schoolCourseOrder) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,6 +122,16 @@ public class DriveSchoolContractServiceImpl implements IDriveSchoolContractServi
|
||||
return driveSchoolContractMapper.insertDriveSchoolContract(driveSchoolContract);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增驾校合同
|
||||
*
|
||||
* @param driveSchoolContract 驾校合同
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDriveSchoolContractNew(DriveSchoolContract driveSchoolContract){
|
||||
return driveSchoolContractMapper.insertDriveSchoolContract(driveSchoolContract);
|
||||
}
|
||||
/**
|
||||
* 修改驾校合同
|
||||
*
|
||||
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<resultMap type="cn.iocoder.yudao.module.jx.domain.DriveContractTest" id="DriveContractTestResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creator" column="creator" />
|
||||
@ -15,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDriveContractTestVo">
|
||||
select id, dept_id, content, create_time, creator, update_time, updater from drive_contract_test
|
||||
select id, tenant_id, dept_id, content, create_time, creator, update_time, updater from drive_contract_test
|
||||
</sql>
|
||||
|
||||
<select id="selectDriveContractTestList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveContractTest" resultMap="DriveContractTestResult">
|
||||
@ -32,6 +33,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectDriveContractTestByTenantId" parameterType="String" resultMap="DriveContractTestResult">
|
||||
<include refid="selectDriveContractTestVo"/>
|
||||
where tenant_id = #{tenantId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDriveContractTest" parameterType="cn.iocoder.yudao.module.jx.domain.DriveContractTest" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into drive_contract_test
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -62,5 +62,7 @@ public class AdminUserRespDTO {
|
||||
private Integer sex;
|
||||
private String repairOpenId;
|
||||
|
||||
private String driverOpenId;
|
||||
|
||||
|
||||
}
|
||||
|
@ -110,4 +110,9 @@ public class UserSaveReqVO {
|
||||
*/
|
||||
private String repairOpenId;
|
||||
|
||||
/**
|
||||
* 驾校小程序openID
|
||||
*/
|
||||
private String driverOpenId;
|
||||
|
||||
}
|
||||
|
@ -113,6 +113,7 @@ public class AdminUserDO extends TenantBaseDO {
|
||||
|
||||
private Long inviteId;
|
||||
private String repairOpenId;
|
||||
private String driverOpenId;
|
||||
|
||||
/**
|
||||
* 当前用户的角色code,多个以英文逗号隔开
|
||||
|
Loading…
Reference in New Issue
Block a user