This commit is contained in:
xiao-fajia 2024-08-28 20:40:08 +08:00
commit a084d5987a
63 changed files with 368 additions and 71 deletions

View File

@ -40,6 +40,8 @@ public class DriveSchoolCarController extends BaseController
@GetMapping("/list")
public CommonResult<IPage<?>> list(DriveSchoolCar driveSchoolCar)
{
driveSchoolCar.setPageNum(1);
driveSchoolCar.setPageSize(10);
Page<DriveSchoolCar> page = new Page<>(driveSchoolCar.getPageNum(), driveSchoolCar.getPageSize());
IPage<DriveSchoolCar> driveSchoolCarIPage = driveSchoolCarService.selectDriveSchoolCarList(driveSchoolCar, page);
return CommonResult.success(driveSchoolCarIPage);

View File

@ -182,9 +182,9 @@ public class DriveSchoolReservationCourseController extends BaseController
* 获取首页预约记录
*/
@GetMapping(value = "/applet/getReservationCourseList")
public CommonResult getReservationCourseList()
{
return success(driveSchoolReservationCourseService.getReservationCourseList());
public CommonResult getReservationCourseList(@RequestParam(required = false,defaultValue = "1") Integer pageNum,@RequestParam(required = false,defaultValue = "10") Integer pageSize)
{ Page page =new Page(pageNum,pageSize);
return success(driveSchoolReservationCourseService.getReservationCourseList(page));
}
/**

View File

@ -0,0 +1,78 @@
package cn.iocoder.yudao.module.jx.controller.admin;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo;
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCoachMapper;
import cn.iocoder.yudao.module.jx.service.IDriveSchoolInfoService;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
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.RestController;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@Tag(name = "管理后台 - 认证")
@RestController
@RequestMapping("/jx/auth")
@Validated
@Slf4j
public class JxAuthController {
@Resource
private AdminUserService userService;
@Resource
private PermissionService permissionService;
@Resource
private DriveSchoolCoachMapper driveSchoolCoachMapper;
@Resource
private IDriveSchoolInfoService driveSchoolInfoService;
/**
* 获取
*
* @return 用户信息
*/
@GetMapping("/getJxInfo")
public CommonResult getJxInfo()
{
LoginUser user = SecurityFrameworkUtils.getLoginUser();
// 获取当前登录用户角色编码
Set<String> roles = permissionService.getRolePermission(user.getId());
//获取驾校的
Long userId = user.getId();
AdminUserDO sysUser = userService.getUser(userId);
String phonenumber = sysUser.getMobile();
//根据手机号查询驾校教练
DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectByPhonenumber(phonenumber);
if (ObjectUtils.isNotEmpty(driveSchoolCoach)){
sysUser.setAvatar(driveSchoolCoach.getImage());
}
DriveSchoolInfo driveSchoolInfo = driveSchoolInfoService.getSchoolInfoByDeptId();
Map<String,Object> result = new HashMap<>();
result.put("user", sysUser);
result.put("roles", roles);
result.put("schoolInfo", driveSchoolInfo);
return CommonResult.success(result);
}
}

View File

@ -71,5 +71,7 @@ public class DriveSchoolCoach extends TenantBaDO
/* 学员人数 */
private Integer student;
private Integer pageNum =1;
private Integer pageSize =10;
}

View File

@ -67,7 +67,7 @@ public interface DriveSchoolExamPassMapper
List<DriveSchoolExamPass> selectDriveSchoolExamPassByUserId(Long userId);
IPage<DriveSchoolExamPass> checkList(@Param("Page") Long userId, Page<DriveSchoolExamPass> page);
IPage<DriveSchoolExamPass> checkList(@Param("userId") Long userId, Page<DriveSchoolExamPass> page);
IPage<DriveSchoolExamPass> getBalanceList(@Param("entity") DriveSchoolExamPass driveSchoolExamPass,Page<DriveSchoolExamPass> page);
DriveSchoolExamPass getBalance(DriveSchoolExamPass driveSchoolExamPass);

View File

@ -82,7 +82,7 @@ public interface DriveSchoolReservationCourseMapper
Integer getPaydNumber(Long deptId);
Integer getSignedNumber(Long deptId);
List<DriveSchoolReservationCourse> getReservationCourseList(Long deptId);
IPage<DriveSchoolReservationCourse> getReservationCourseList(Page page,@Param("deptId") Long deptId);
public List<DriveSchoolReservationCourse> selectDriveSchoolReservationGetListUser(DriveSchoolReservationCourse driveSchoolReservationCourse);

View File

@ -56,7 +56,7 @@ public class DriveSchoolPayController extends BaseController
int number = 0;
int numbers = 0;
int allNumber = 0;
DriveSchoolInfoVO schoolInfo = driveSchoolInfoService.getSchoolInfoByDeptId();
DriveSchoolInfoVO schoolInfo = driveSchoolInfoService.getSchoolInfoByDeptId();
if (schoolInfo != null) {
driveSchoolPay.setJxId(schoolInfo.getId());

View File

@ -104,8 +104,8 @@ public class DriveSchoolPay extends TenantBaDO
private double returnMoney;
//备注
// @Excel(name = "备注")
// private String remark;
@Excel(name = "备注")
private String remark;
//转账凭证1
private String proofOne;

View File

@ -69,7 +69,7 @@ public interface IDriveSchoolReservationCourseService
StatisticsVo getHomeData();
List<DriveSchoolReservationCourse> getReservationCourseList();
IPage<DriveSchoolReservationCourse> getReservationCourseList(Page page);
List<DriveSchoolReservationCourse> selectDriveSchoolReservationGetListUser(DriveSchoolReservationCourse driveSchoolReservationCourse);

View File

@ -62,6 +62,9 @@ public class DriveSchoolCarRepairServiceImpl implements IDriveSchoolCarRepairSer
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolCarRepair.setDeptId(deptId);
if (deptId == 100){
driveSchoolCarRepair.setDeptId(null);
}
IPage<DriveSchoolCarRepair> driveSchoolCarRepairIPage = driveSchoolCarRepairMapper.selectDriveSchoolCarRepairList(driveSchoolCarRepair, page);
List<DriveSchoolCarRepair> driveSchoolCarRepairs = driveSchoolCarRepairIPage.getRecords();
for (DriveSchoolCarRepair schoolCarRepair : driveSchoolCarRepairs) {

View File

@ -60,6 +60,9 @@ public class DriveSchoolCheckServiceImpl implements IDriveSchoolCheckService
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolCheck.setDeptId(deptId);
if (deptId == 100){
driveSchoolCheck.setDeptId(null);
}
IPage<DriveSchoolCheck> driveSchoolCheckIPage = driveSchoolCheckMapper.selectDriveSchoolCheckList(driveSchoolCheck, page);
List<DriveSchoolCheck> driveSchoolChecks = driveSchoolCheckIPage.getRecords();
for (DriveSchoolCheck schoolCheck : driveSchoolChecks) {

View File

@ -75,11 +75,18 @@ public class DriveSchoolCourseServiceImpl implements IDriveSchoolCourseService
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolCourse.setDeptId(deptId);
if (deptId == 100){
driveSchoolCourse.setDeptId(null);
}
IPage<DriveSchoolCourse> driveSchoolCourseIPage = driveSchoolCourseMapper.selectDriveSchoolCourseList(driveSchoolCourse, page);
List<DriveSchoolCourse> driveSchoolCourses = driveSchoolCourseIPage.getRecords();
for (DriveSchoolCourse driveSchoolCours : driveSchoolCourses) {
DriveSchoolInfo driveSchoolInfo = driveSchoolInfoMapper.getSchoolInfoByDeptId(driveSchoolCours.getDeptId());
driveSchoolCours.setPhone(driveSchoolInfo.getPhone());
// update by pqz 2024年8月28日 解决空指针
DriveSchoolInfo driveSchoolInfo = driveSchoolInfoMapper.getSchoolInfoByDeptId(driveSchoolCours.getDeptId() == null ? 100:driveSchoolCours.getDeptId());
// update by pqz 2024年8月28日 解决空指针
if (null != driveSchoolInfo){
driveSchoolCours.setPhone(driveSchoolInfo.getPhone());
}
}
if (ObjectUtils.isNotEmpty(driveSchoolCourse.getPayType()) && driveSchoolCourse.getPayType().equals("2")){
driveSchoolCourses.forEach(item ->{

View File

@ -55,6 +55,9 @@ public class DriveSchoolDeductServiceImpl implements IDriveSchoolDeductService
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolDeduct.setDeptId(deptId);
if (deptId == 100){
driveSchoolDeduct.setDeptId(null);
}
return driveSchoolDeductMapper.selectDriveSchoolDeductList(driveSchoolDeduct,page);
}

View File

@ -55,6 +55,9 @@ public class DriveSchoolDialServiceImpl implements IDriveSchoolDialService
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolDial.setDeptId(deptId);
if (deptId == 100){
driveSchoolDial.setDeptId(null);
}
return driveSchoolDialMapper.selectDriveSchoolDialList(driveSchoolDial,page);
}

View File

@ -90,7 +90,9 @@ public class DriveSchoolExamPassServiceImpl implements IDriveSchoolExamPassServi
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
deptId = 227L;
if (deptId == 100){
deptId = 227L;
}
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(deptId);
driveSchoolExamPass.setJxId(schoolInfoByDeptId.getId());
return driveSchoolExamPassMapper.selectDriveSchoolExamPassList(driveSchoolExamPass, page);
@ -209,7 +211,9 @@ public class DriveSchoolExamPassServiceImpl implements IDriveSchoolExamPassServi
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
deptId = 227L;
if (deptId == 100){
deptId = null;
}
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(deptId);
driveSchoolExamPass.setJxId(schoolInfoByDeptId.getId());
}

View File

@ -59,6 +59,9 @@ public class DriveSchoolFacilityServiceImpl implements IDriveSchoolFacilityServi
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolFacility.setDeptId(deptId);
if (deptId ==100){
driveSchoolFacility.setDeptId(null);
}
return driveSchoolFacilityMapper.selectDriveSchoolFacilityList(driveSchoolFacility,page);
}

View File

@ -276,7 +276,7 @@ public class DriveSchoolInfoServiceImpl implements IDriveSchoolInfoService
jlId = driveSchoolCoach.getId();
}
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(227L);
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(100L);
schoolInfoByDeptId.setJlId(jlId);
return schoolInfoByDeptId;
}

View File

@ -61,6 +61,9 @@ public class DriveSchoolInsuranceServiceImpl implements IDriveSchoolInsuranceSer
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolInsurance.setDeptId(deptId);
if (deptId==100){
driveSchoolInsurance.setDeptId(null);
}
IPage<DriveSchoolInsurance> driveSchoolInsuranceIPage = driveSchoolInsuranceMapper.selectDriveSchoolInsuranceList(driveSchoolInsurance, page);
List<DriveSchoolInsurance> driveSchoolInsurances = driveSchoolInsuranceIPage.getRecords();

View File

@ -55,6 +55,9 @@ public class DriveSchoolNoticeServiceImpl implements IDriveSchoolNoticeService
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolNotice.setDeptId(deptId);
if (deptId == 100){
driveSchoolNotice.setDeptId(null);
}
return driveSchoolNoticeMapper.selectDriveSchoolNoticeList(driveSchoolNotice,page);
}

View File

@ -58,6 +58,9 @@ public class DriveSchoolPhoneServiceImpl implements IDriveSchoolPhoneService
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolPhone.setDeptId(deptId);
if (deptId==100){
driveSchoolPhone.setDeptId(null);
}
return driveSchoolPhoneMapper.selectDriveSchoolPhoneList(driveSchoolPhone,page);
}

View File

@ -129,6 +129,9 @@ public class DriveSchoolReservationCourseServiceImpl implements IDriveSchoolRese
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolReservationCourse.setDeptId(deptId);
if (deptId == 100){
driveSchoolReservationCourse.setDeptId(null);
}
IPage<DriveSchoolReservationCourse> driveSchoolReservationCourseIPage = driveSchoolReservationCourseMapper.selectDriveSchoolReservationCourseList(driveSchoolReservationCourse, page);
List<DriveSchoolReservationCourse> courseList = driveSchoolReservationCourseIPage.getRecords();
@ -468,12 +471,12 @@ public class DriveSchoolReservationCourseServiceImpl implements IDriveSchoolRese
}
@Override
public List<DriveSchoolReservationCourse> getReservationCourseList() {
public IPage<DriveSchoolReservationCourse> getReservationCourseList(Page page) {
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
List<DriveSchoolReservationCourse> reservationCourseList = driveSchoolReservationCourseMapper.getReservationCourseList(deptId);
for (DriveSchoolReservationCourse driveSchoolReservationCourse : reservationCourseList) {
IPage<DriveSchoolReservationCourse> reservationCourseList = driveSchoolReservationCourseMapper.getReservationCourseList(page,deptId);
for (DriveSchoolReservationCourse driveSchoolReservationCourse : reservationCourseList.getRecords()) {
AdminUserRespDTO sysUserData = userApi.getUser(userId);
//SysUser sysUserData = sysUserMapper.findSysUserById(driveSchoolReservationCourse.getUserId());

View File

@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveCarBindList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveCarBind" resultMap="DriveCarBindResult">
<include refid="selectDriveCarBindVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.carId != null "> and car_id = #{entity.carId}</if>
<if test="entity.driveSchoolCoachId != null "> and drive_school_coach_id = #{entity.driveSchoolCoachId}</if>

View File

@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveContractTestList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveContractTest" resultMap="DriveContractTestResult">
<include refid="selectDriveContractTestVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>
</where>

View File

@ -24,27 +24,27 @@
<!-- </insert>-->
<select id="findPayListAll" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where userId = #{userId}
select * from drive_school_pay where deleted = 0 and userId = #{userId}
</select>
<select id="findDriveSchoolByJxId" resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo">
select * from drive_school_info where id = #{jxId}
select * from drive_school_info where deleted = 0 and id = #{jxId}
</select>
<select id="findDriveSchoolCourse" resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse">
select * from drive_school_course where id = #{courseId}
select * from drive_school_course where deleted = 0 and id = #{courseId}
</select>
<select id="findPayById" resultType="cn.iocoder.yudao.module.jx.payment.entity.PayEntity">
select * from drive_school_pay where id = #{userId}
select * from drive_school_pay where deleted = 0 and id = #{userId}
</select>
<select id="findPayByPhoneList" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where phone = #{phone}
select * from drive_school_pay where deleted = 0 and phone = #{phone}
</select>
<select id="findPayByUserIdList" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where userId = #{userId}
select * from drive_school_pay where deleted = 0 and userId = #{userId}
</select>
<select id="findPayListAllNumber" resultType="java.lang.Integer">
@ -52,30 +52,30 @@
</select>
<select id="findPayListAfternoonNumber" resultType="java.lang.Integer">
select count(*) from drive_school_pay where afternoon = 1
select count(*) from drive_school_pay where deleted = 0 and afternoon = 1
</select>
<select id="findPayByUserId" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where userId = #{userId} and jlId is not null
select * from drive_school_pay where deleted = 0 and userId = #{userId} and jlId is not null
order by createTime desc
limit 1
</select>
<select id="findCurrentJlCount" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where jlId = #{jlId}
select * from drive_school_pay where deleted = 0 and jlId = #{jlId}
</select>
<select id="findStuCount" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where jlId = #{jlId}
select * from drive_school_pay where deleted = 0 and jlId = #{jlId}
</select>
<select id="findPayListByUserId" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where userId = #{userId}
select * from drive_school_pay where deleted = 0 and userId = #{userId}
</select>
<select id="findPayByUserIdOne" resultType="cn.iocoder.yudao.module.jx.payment.vo.PayVo">
select * from drive_school_pay where userId = #{userId} group by createTime
select * from drive_school_pay where deleted = 0 and userId = #{userId} group by createTime
</select>
<select id="selectByUserId" resultType="Integer">
select jlId from drive_school_pay where userId = #{userId} limit 1
select jlId from drive_school_pay where deleted = 0 and userId = #{userId} limit 1
</select>

View File

@ -19,6 +19,7 @@
<select id="selectDriveSchoolBookingList" parameterType="cn.iocoder.yudao.module.jx.payment.entity.DriveSchoolBooking" resultMap="DriveSchoolBookingResult">
<include refid="selectDriveSchoolBookingVo"/>
<where>
deleted = 0
<if test="entity.jlId != null "> and jlId = #{entity.jlId}</if>
<if test="entity.jxId != null "> and jxId = #{entity.jxId}</if>
<if test="entity.isMorning != null "> and isMorning = #{entity.isMorning}</if>

View File

@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCarList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCar" resultMap="DriveSchoolCarResult">
<include refid="selectDriveSchoolCarVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.brand != null and entity.brand != ''"> and brand = #{entity.brand}</if>
<if test="entity.carModel != null and entity.carModel != ''"> and car_model = #{entity.carModel}</if>
@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCarListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCar" resultMap="DriveSchoolCarResult">
<include refid="selectDriveSchoolCarVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.brand != null and entity.brand != ''"> and brand = #{entity.brand}</if>
<if test="entity.carModel != null and entity.carModel != ''"> and car_model = #{entity.carModel}</if>
@ -175,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByCarNo" parameterType="String" resultMap="DriveSchoolCarResult">
<include refid="selectDriveSchoolCarVo"/>
where car_no = #{carNo}
where deleted = 0 and car_no = #{carNo}
</select>

View File

@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCarRepairList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCarRepair" resultMap="DriveSchoolCarRepairResult">
<include refid="selectDriveSchoolCarRepairVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null "> and user_name like concat('%',#{entity.userName},'%')</if>
@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCarRepairListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCarRepair" resultMap="DriveSchoolCarRepairResult">
<include refid="selectDriveSchoolCarRepairVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null "> and user_name like concat('%',#{entity.userName},'%')</if>

View File

@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCheckList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCheck" resultMap="DriveSchoolCheckResult">
<include refid="selectDriveSchoolCheckVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null and entity.userName != ''"> and user_name like concat('%', #{entity.userName}, '%')</if>

View File

@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCoachList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach" resultMap="DriveSchoolCoachResult">
<include refid="selectDriveSchoolCoachVo"/>
<where>
deleted = 0
<if test="entity.id != null "> and id = #{entity.id}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.image != null and entity.image != ''"> and image = #{entity.image}</if>
@ -59,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCoachListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach" resultMap="DriveSchoolCoachResult">
<include refid="selectDriveSchoolCoachVo"/>
<where>
deleted = 0
<if test="entity.id != null "> and id = #{entity.id}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.image != null and entity.image != ''"> and image = #{entity.image}</if>
@ -84,18 +86,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
dsc.*
from drive_school_pay dsp join drive_school_coach dsc on dsp.jlId = dsc.id
where dsp.userId = #{userId} and jlId is not null
where dsp.deleted = 0 and dsp.userId = #{userId} and jlId is not null
order by dsp.createTime desc
limit 1
</select>
<select id="findCoachByCoachName" resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach">
select * from drive_school_coach where instructor_name = #{coachName}
select * from drive_school_coach where deleted = 0 and instructor_name = #{coachName}
</select>
<select id="findInfoByJxId" resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach">
select * from drive_school_info where id = #{jxId}
</select>
<select id="findJlByDeptId" resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach">
select * from drive_school_coach where dept_id = #{deptId}
select * from drive_school_coach where deleted = 0 and dept_id = #{deptId}
</select>
<insert id="insertDriveSchoolCoach" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCoach">
@ -195,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByPhonenumber" parameterType="String" resultMap="DriveSchoolCoachResult">
<include refid="selectDriveSchoolCoachVo"/>
where phone = #{phonenumber}
where deleted = 0 and phone = #{phonenumber}
</select>
</mapper>

View File

@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolContractList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolContract" resultMap="DriveSchoolContractResult">
<include refid="selectDriveSchoolContractVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>

View File

@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCourseList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse" resultMap="DriveSchoolCourseResult">
<include refid="selectDriveSchoolCourseVo"/>
<where>
deleted = 0
<if test="entity.id != null "> and id = #{entity.id}</if>
<if test="entity.automatic != null "> and automatic = #{entity.automatic}</if>
<if test="entity.license != null "> and license = #{entity.license}</if>
@ -50,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCourseAppletList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse" resultMap="DriveSchoolCourseResult">
<include refid="selectDriveSchoolCourseVo"/>
<where>
deleted = 0
<if test="entity.id != null "> and id = #{entity.id}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.type != null and entity.type != ''"> and type = #{entity.type}</if>
@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCourseAppletListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse" resultMap="DriveSchoolCourseResult">
<include refid="selectDriveSchoolCourseVo"/>
<where>
deleted = 0
<if test="entity.id != null "> and id = #{entity.id}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.type != null and entity.type != ''"> and type = #{entity.type}</if>
@ -82,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCourseAppletFavorableListList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse" resultMap="DriveSchoolCourseResult">
<include refid="selectDriveSchoolCourseVo"/>
<where>
deleted = 0
<if test="id != null "> and id = #{id}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
@ -103,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findSchoolCourseByOrderNumber"
resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCourse">
select dsc.* from drive_school_pay dsp join
drive_school_course dsc on dsp.courseId = dsc.id where dsp.orderNumber like concat('%', #{concat}, '%')
drive_school_course dsc on dsp.courseId = dsc.id where dsp.deleted = 0 and dsp.orderNumber like concat('%', #{concat}, '%')
</select>

View File

@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCourseOrderList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCourseOrder" resultMap="DriveSchoolCourseOrderResult">
<include refid="selectDriveSchoolCourseOrderVo"/>
<where>
deleted = 0
<if test="entity.orderNo != null and entity.orderNo != ''"> and order_no = #{entity.orderNo}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>

View File

@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolCredentialsList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCredentials" resultMap="DriveSchoolCredentialsResult">
<include refid="selectDriveSchoolCredentialsVo"/>
<where>
deleted = 0
<if test="entity.schoolName != null and entity.schoolName != ''"> and school_name like concat('%', #{entity.schoolName}, '%')</if>
<if test="entity.businessLicenseNumber != null and entity.businessLicenseNumber != ''"> and business_license_number = #{entity.businessLicenseNumber}</if>
<if test="entity.legalRepresentative != null and entity.legalRepresentative != ''"> and legal_representative like concat('%', #{entity.legalRepresentative}, '%')</if>

View File

@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolDailyManagementList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDailyManagement" resultMap="DriveSchoolDailyManagementResult">
<include refid="selectDriveSchoolDailyManagementVo"/>
<where>
deleted = 0
<if test="entity.logName != null and entity.logName != ''"> and log_name like concat('%', #{entity.logName}, '%')</if>
<if test="entity.completionStatus != null and entity.completionStatus != ''"> and completion_status = #{entity.completionStatus}</if>
<if test="entity.completionCover != null and entity.completionCover != ''"> and completion_cover = #{entity.completionCover}</if>

View File

@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolDeductList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct" resultMap="DriveSchoolDeductResult">
<include refid="selectDriveSchoolDeductVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.deduct != null "> and deduct = #{entity.deduct}</if>
<if test="entity.courseSubject != null and entity.courseSubject != ''"> and course_subject = #{entity.courseSubject}</if>
@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolDeductListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct" resultMap="DriveSchoolDeductResult">
<include refid="selectDriveSchoolDeductVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.deduct != null "> and deduct = #{entity.deduct}</if>
<if test="entity.courseSubject != null and entity.courseSubject != ''"> and course_subject = #{entity.courseSubject}</if>
@ -94,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByCondition" resultMap="DriveSchoolDeductResult">
select * from drive_school_deduct
<where>
deleted = 0
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="courseSubject != null and courseSubject != ''"> and course_subject = #{courseSubject}</if>
</where>

View File

@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolDialList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDial" resultMap="DriveSchoolDialResult">
<include refid="selectDriveSchoolDialVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>
@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolDialListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDial" resultMap="DriveSchoolDialResult">
<include refid="selectDriveSchoolDialVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>

View File

@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolDynamicList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDynamic" resultMap="DriveSchoolDynamicResult">
<include refid="selectDriveSchoolDynamicVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.cover != null and entity.cover != ''"> and cover = #{entity.cover}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolDynamicListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDynamic" resultMap="DriveSchoolDynamicResult">
<include refid="selectDriveSchoolDynamicVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.cover != null and entity.cover != ''"> and cover = #{entity.cover}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>

View File

@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolExamPassList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolExamPass" resultMap="DriveSchoolExamPassResult">
<include refid="selectDriveSchoolExamPassVo"/>
<where>
deleted = 0
<if test="entity.jxId != null "> and jxId = #{entity.jxId}</if>
<if test="entity.name != null and entity.name != ''"> and name like concat('%', #{entity.name}, '%')</if>
<if test="entity.phone != null and entity.phone != ''"> and phone = #{entity.phone}</if>
@ -143,12 +144,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolExamPassByUserId" parameterType="Long" resultMap="DriveSchoolExamPassResult">
<include refid="selectDriveSchoolExamPassVo"/>
where userId = #{userId}
where deleted = 0 and userId = #{userId}
</select>
<select id="checkList" parameterType="Long" resultMap="DriveSchoolExamPassResult">
select * from drive_school_exam_pass
where jlId = #{userId}
where deleted = 0 and jlId = #{userId}
order by create_time desc
</select>
@ -156,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT id,jlName,sum(deduct) deduct,payd_time,jlId
from drive_school_exam_pass
<where>
deleted = 0 and
payState = 1
and status = 1
<if test="entity.payStartTimes != null and entity.payEndTimes != null"> and payd_time between #{entity.payStartTimes} and #{entity.payEndTimes}</if>
@ -170,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT id,jlName,sum(deduct) deduct,payd_time,jlId
from drive_school_exam_pass
<where>
deleted = 0 and
payState = 1
<if test="payStartTimes != null and payEndTimes != null"> and payd_time between #{payStartTimes} and #{payEndTimes}</if>
<if test="jlName != null and jlName != ''"> and jlName like concat('%', #{jlName}, '%')</if>
@ -183,6 +186,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT id,jlName,sum(deduct) deduct,payd_time,jlId
from drive_school_exam_pass
<where>
deleted = 0 and
payState = 1
<if test="payStartTimes != null and payEndTimes != null"> and payd_time between #{payStartTimes} and #{payEndTimes}</if>
<if test="jlName != null and jlName != ''"> and jlName like concat('%', #{jlName}, '%')</if>
@ -195,6 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT id,jlName,sum(deduct) deduct,payd_time,jlId
from drive_school_exam_pass
<where>
deleted = 0 and
payState = '0'
<if test="payStartTimes != null and payEndTimes != null"> payd_time between #{payStartTimes} and #{payEndTimes}</if>
<if test="jlName != null and jlName != ''"> and jlName like concat('%', #{jlName}, '%')</if>
@ -210,6 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT id,jlName,sum(deduct) deduct,payd_time,jlId
from drive_school_exam_pass
<where>
deleted = 0 and
payState = '0'
<if test="payStartTimes != null and payEndTimes != null"> payd_time between #{payStartTimes} and #{payEndTimes}</if>
<if test="jlName != null and jlName != ''"> and jlName like concat('%', #{jlName}, '%')</if>

View File

@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolFacilityList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFacility" resultMap="DriveSchoolFacilityResult">
<include refid="selectDriveSchoolFacilityVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.facilityName != null and entity.facilityName != ''"> and facility_name like concat('%', #{entity.facilityName}, '%')</if>
<if test="entity.facilityNumber != null "> and facility_number = #{entity.facilityNumber}</if>

View File

@ -29,6 +29,7 @@
<select id="selectDriveSchoolFeedbackList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultMap="DriveSchoolFeedbackResult">
<include refid="selectDriveSchoolFeedbackVo"/>
<where>
deleted = 0
<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.jlName != null and entity.jlName != ''"> and jlName like concat('%',#{entity.jlName},'%')</if>
@ -40,6 +41,7 @@
<select id="selectDriveSchoolFeedbackListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultMap="DriveSchoolFeedbackResult">
<include refid="selectDriveSchoolFeedbackVo"/>
<where>
deleted = 0
<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.jlName != null and entity.jlName != ''"> and jlName like concat('%',#{entity.jlName},'%')</if>
@ -51,6 +53,7 @@
<select id="likeOne" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultType="Integer">
select count(1) total from drive_school_feedback
<where>
deleted = 0 and
likes = '1'
<if test="jxId != null "> and jxId = #{jxId}</if>
</where>
@ -60,6 +63,7 @@
<select id="likeTwo" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFeedback" resultType="Integer">
select count(1) total from drive_school_feedback
<where>
deleted = 0 and
likes = '2'
<if test="jxId != null "> and jxId = #{jxId}</if>
</where>
@ -69,6 +73,7 @@
<include refid="selectDriveSchoolFeedbackVo"/>
select count(1) total from drive_school_feedback
<where>
deleted = 0 and
likes = '3'
<if test="jxId != null "> and jxId = #{jxId}</if>
</where>

View File

@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolFileList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFile" resultMap="DriveSchoolFileResult">
<include refid="selectDriveSchoolFileVo"/>
<where>
deleted = 0
<if test="entity.fileType != null and entity.fileType != ''"> and file_type = #{entity.fileType}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.fileAddress != null and entity.fileAddress != ''"> and file_address = #{entity.fileAddress}</if>
@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolFileListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolFile" resultMap="DriveSchoolFileResult">
<include refid="selectDriveSchoolFileVo"/>
<where>
deleted = 0
<if test="entity.fileType != null and entity.fileType != ''"> and file_type = #{entity.fileType}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.fileAddress != null and entity.fileAddress != ''"> and file_address = #{entity.fileAddress}</if>
@ -94,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getOneFile" parameterType="Long" resultMap="DriveSchoolFileResult">
<include refid="selectDriveSchoolFileVo"/>
<where>
deleted = 0
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="fileAddress != null and fileAddress != ''"> and file_address = #{fileAddress}</if>

View File

@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolInfoList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolInfo" resultMap="DriveSchoolInfoResult">
<include refid="selectDriveSchoolInfoVo"/>
<where>
deleted = 0
<if test="id != null "> and id = #{id}</if>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.schoolName != null and entity.schoolName != ''"> and school_name like concat('%', #{entity.schoolName}, '%')</if>
@ -151,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getSchoolInfoByDeptId" parameterType="Long" resultMap="DriveSchoolInfoVOResult">
<include refid="selectDriveSchoolInfoVo"/>
where dept_id = #{deptId}
where deleted = 0 and dept_id = #{deptId}
</select>
<select id="findInfoByJxId" parameterType="Long" resultMap="DriveSchoolInfoVOResult">

View File

@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolInsuranceList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolInsurance" resultMap="DriveSchoolInsuranceResult">
<include refid="selectDriveSchoolInsuranceVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null "> and user_name = #{entity.userName}</if>

View File

@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolNewsList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNews" resultMap="DriveSchoolNewsResult">
<include refid="selectDriveSchoolNewsVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.cover != null and entity.cover != ''"> and cover = #{entity.cover}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolNewsListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNews" resultMap="DriveSchoolNewsResult">
<include refid="selectDriveSchoolNewsVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.cover != null and entity.cover != ''"> and cover = #{entity.cover}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>

View File

@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolNoticeList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice" resultMap="DriveSchoolNoticeResult">
<include refid="selectDriveSchoolNoticeVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>
@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolNoticeListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice" resultMap="DriveSchoolNoticeResult">
<include refid="selectDriveSchoolNoticeVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>

View File

@ -49,6 +49,7 @@
<select id="selectDriveSchoolPayList" parameterType="cn.iocoder.yudao.module.jx.payment.entity.DriveSchoolPay" resultMap="DriveSchoolPayResult">
<include refid="selectDriveSchoolPayVo"/>
<where>
deleted = 0
<if test="entity.name != null and entity.name != ''"> and `name` like concat('%', #{entity.name}, '%')</if>
<if test="entity.phone != null and entity.phone != ''"> and phone like concat('%', #{entity.phone}, '%')</if>
<if test="entity.identity != null and entity.identity != ''"> and identity = #{entity.identity}</if>
@ -74,6 +75,7 @@
FROM
drive_school_pay
<where>
deleted = 0 and
identity IS NOT NULL
<if test="entity.type != null and entity.type != ''"> and course_subject = #{entity.type}</if>
<if test="entity.name != null and entity.name != ''"> and `name` like concat('%', #{entity.name}, '%')</if>
@ -101,6 +103,7 @@
drive_school_pay dcp
inner join drive_school_exam_pass dsep on dcp.phone = dsep.phone
<where>
deleted = 0 and
identity IS NOT NULL
<if test="entity.type != null and entity.type != ''"> and course_subject = #{entity.type}</if>
<if test="entity.name != null and entity.name != ''"> and `name` like concat('%', #{entity.name}, '%')</if>
@ -128,6 +131,7 @@
drive_school_pay dcp
inner join drive_school_exam_pass dsep on dcp.phone = dsep.phone
<where>
deleted = 0 and
identity IS NOT NULL
<if test="entity.type != null and entity.type != ''"> and course_subject = #{entity.type}</if>
<if test="entity.name != null and entity.name != ''"> and `name` like concat('%', #{entity.name}, '%')</if>
@ -291,6 +295,7 @@
left join drive_school_course dsc
on dsp.courseId = dsc.id
<where>
dsp.deleted = 0
<if test="entity.name != null and entity.name != ''"> and dsp.`name` like concat('%', #{entity.name}, '%')</if>
<if test="entity.phone != null and entity.phone != ''"> and dsp.phone like concat('%', #{entity.phone}, '%')</if>
<if test="entity.identity != null and entity.identity != ''"> and dsp.identity = #{entity.identity}</if>
@ -317,6 +322,7 @@
drive_school_pay dsp
left join drive_school_course dsc on dsp.courseId = dsc.id
<where>
dsp.deleted = 0
<if test="entity.jxId != null "> and jxId = #{entity.jxId}</if>
</where>
order by createTime desc
@ -328,12 +334,12 @@
</select>
<select id="getAllMoney" parameterType="Long" resultType="double">
select count(money) money from drive_school_pay
select count(money) money from drive_school_pay where deleted = 0
</select>
<select id="getInfoByUserIndenty" parameterType="String" resultMap="DriveSchoolPayResult">
<include refid="selectDriveSchoolPayVo"/>
where identity = #{userId}
where deleted = 0 and identity = #{userId}
</select>
<select id="getDeductByUserInfo"
@ -343,6 +349,7 @@
FROM
drive_school_pay
<where>
deleted = 0 and
state != '0'
<if test="name != null and name != ''"> and `name` like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
@ -355,18 +362,18 @@
<select id="selectByCoachId" parameterType="Long" resultType="Integer">
select count(1) count from drive_school_pay
where jlId = #{userId}
where deleted = 0 and jlId = #{userId}
</select>
<select id="selectByUserId" parameterType="Long" resultMap="DriveSchoolPayResult">
<include refid="selectDriveSchoolPayVo"/>
where userId = #{userId}
where deleted = 0 and userId = #{userId}
limit 1
</select>
<select id="selectByPhone" parameterType="String" resultMap="DriveSchoolPayResult">
<include refid="selectDriveSchoolPayVo"/>
where phone = #{phone}
where deleted = 0 and phone = #{phone}
limit 1
</select>
</mapper>

View File

@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolPhoneList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolPhone" resultMap="DriveSchoolPhoneResult">
<include refid="selectDriveSchoolPhoneVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null and entity.userName != ''"> and user_name like concat('%', #{entity.userName}, '%')</if>
@ -76,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteDriveSchoolPhoneById" parameterType="Long">
delete from drive_school_phone where id = #{id}
delete from drive_school_phone where deleted = 0 and id = #{id}
</delete>
<delete id="deleteDriveSchoolPhoneByIds" parameterType="String">
@ -88,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getPhone" resultMap="DriveSchoolPhoneResult">
<include refid="selectDriveSchoolPhoneVo"/>
where dept_id = #{deptId}
where deleted = 0 and dept_id = #{deptId}
ORDER BY RAND()
LIMIT 1;
</select>

View File

@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolReimbursementList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolReimbursement" resultMap="DriveSchoolReimbursementResult">
<include refid="selectDriveSchoolReimbursementVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null and entity.userName != ''"> and user_name like concat('%', #{entity.userName}, '%')</if>

View File

@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolReservationCourseList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolReservationCourse" resultMap="DriveSchoolReservationCourseResult">
<include refid="selectDriveSchoolReservationCourseVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null and entity.userName != ''"> and user_name like concat('%', #{entity.userName}, '%')</if>
@ -56,11 +57,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findCourseByCurrentTimeAndJlName"
resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolReservationCourse">
select * from drive_school_reservation_course dsrc
join drive_school_coach dsc on dsrc.coach_name = dsc.instructor_name where dsrc.order_time like concat('%', #{currentDate}, '%') and dsc.id = #{jlId}
join drive_school_coach dsc on dsrc.coach_name = dsc.instructor_name where dsrc.deleted = 0 and dsrc.order_time like concat('%', #{currentDate}, '%') and dsc.id = #{jlId}
</select>
<select id="findCourseByUserId"
resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolReservationCourse">
select * from drive_school_reservation_course where user_id = #{userId}
select * from drive_school_reservation_course where deleted = 0 and user_id = #{userId}
</select>
<insert id="insertDriveSchoolReservationCourse" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolReservationCourse">
@ -146,39 +147,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getReservationNumber"
resultType="Integer">
select count(1) number from drive_school_reservation_course where dept_id = #{deptId} and account_type = '2'
select count(1) number from drive_school_reservation_course where deleted = 0 and dept_id = #{deptId} and account_type = '2'
</select>
<select id="getReservationNumberThree"
resultType="Integer">
select count(1) number from drive_school_reservation_course where dept_id = #{deptId} and account_type = '3'
select count(1) number from drive_school_reservation_course where deleted = 0 and dept_id = #{deptId} and account_type = '3'
</select>
<select id="getIsRecdNumber"
resultType="Integer">
select count(1) number from drive_school_pay where jxId = #{deptId} and state = '3' or jxId = #{deptId} and state = '0'
select count(1) number from drive_school_pay where deleted = 0 and jxId = #{deptId} and state = '3' or jxId = #{deptId} and state = '0'
</select>
<select id="getPaydNumber"
resultType="Integer">
select count(1) number from drive_school_pay where jxId = #{deptId} and state = '3'
select count(1) number from drive_school_pay where deleted = 0 and jxId = #{deptId} and state = '3'
</select>
<select id="getSignedNumber"
resultType="Integer">
select count(1) number from drive_school_pay where jxId = #{deptId} and isSign = '1' and state = '3'
select count(1) number from drive_school_pay where deleted = 0 and jxId = #{deptId} and isSign = '1' and state = '3'
</select>
<select id="getReservationCourseList"
resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolReservationCourse">
select * from drive_school_reservation_course
where dept_id = #{deptId}
where deleted = 0 and dept_id = #{deptId}
</select>
<select id="selectDriveSchoolReservationGetListUser" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolReservationCourse" resultMap="DriveSchoolReservationCourseResult">
<include refid="selectDriveSchoolReservationCourseVo"/>
<where>
deleted = 0
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
@ -198,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
drive_school_reservation_course
<where>
deleted = 0
<if test="userId != null "> and dept_id = #{deptId}</if>
</where>
</select>
@ -206,6 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT *
FROM drive_school_reservation_course
<where>
deleted = 0
create_time >= NOW() - INTERVAL 1 MONTH
<if test="userId != null "> and coach_id = #{userId}</if>
</where>
@ -217,7 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT *
FROM drive_school_reservation_course
<where>
deleted = 0
<if test="userId != null "> and user_id = #{userId}</if>
</where>
order by create_time desc
@ -227,6 +231,7 @@ order by create_time desc
SELECT *
FROM drive_school_reservation_course
<where>
deleted = 0 and
audit_status = 0
<if test="userId != null "> and coach_id = #{userId}</if>
</where>
@ -237,6 +242,7 @@ order by create_time desc
SELECT *
FROM drive_school_reservation_course
<where>
deleted = 0 and
audit_status != 0
<if test="userId != null "> and coach_id = #{userId}</if>
</where>
@ -244,7 +250,7 @@ order by create_time desc
</select>
<select id="getReservationNumberByUserId" resultType="Integer">
select distinct count(1) number from drive_school_reservation_course where coach_id = #{userId} and stu_sign_state !='2' or coach_id = #{userId} and coach_sign_state !='2'
select distinct count(1) number from drive_school_reservation_course where deleted = 0 and coach_id = #{userId} and stu_sign_state !='2' or coach_id = #{userId} and coach_sign_state !='2'
</select>

View File

@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolSeparateList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolSeparate" resultMap="DriveSchoolSeparateResult">
<include refid="selectDriveSchoolSeparateVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.deptName != null and entity.deptName != ''"> and dept_name like concat('%', #{entity.deptName}, '%')</if>
<if test="entity.money != null "> and money = #{entity.money}</if>

View File

@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolSwiperList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolSwiper" resultMap="DriveSchoolSwiperResult">
<include refid="selectDriveSchoolSwiperVo"/>
<where>
deleted = 0
<if test="swiperName != null and swiperName != ''"> and swiper_name like concat('%', #{swiperName}, '%')</if>
<if test="swiperPicture != null and swiperPicture != ''"> and swiper_picture = #{swiperPicture}</if>
<if test="jumpUrl != null and jumpUrl != ''"> and jump_url = #{jumpUrl}</if>

View File

@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolTextList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolText" resultMap="DriveSchoolTextResult">
<include refid="selectDriveSchoolTextVo"/>
<where>
deleted = 0
<if test="entity.title != null and entity.title != ''"> and title like concat('%', #{entity.title}, '%') </if>
</where>
order by create_time desc

View File

@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDriveSchoolUpkeepList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolUpkeep" resultMap="DriveSchoolUpkeepResult">
<include refid="selectDriveSchoolUpkeepVo"/>
<where>
deleted = 0
<if test="entity.carId != null "> and car_id = #{entity.carId}</if>
<if test="entity.maintenanceDate != null "> and maintenance_date = #{entity.maintenanceDate}</if>
<if test="entity.maintenanceMileage != null "> and maintenance_mileage = #{entity.maintenanceMileage}</if>

View File

@ -5,6 +5,6 @@
<mapper namespace="cn.iocoder.yudao.module.jx.mapper.LJRegionMapper">
<select id="selectByMap" resultType="cn.iocoder.yudao.module.jx.domain.LJRegion">
select * from mt_region
select * from mt_region where deleted = 0
</select>
</mapper>

View File

@ -29,7 +29,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSopeNessList" parameterType="cn.iocoder.yudao.module.jx.domain.SopeNess" resultMap="SopeNessResult">
<include refid="selectSopeNessVo"/>
<where>
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId} </if>
<if test="entity.businessType != null and entity.businessType != ''"> and business_type like concat('%', #{entity.businessType}, '%')</if>
<if test="entity.description != null and entity.description != ''"> and description = #{entity.description}</if>
<if test="entity.licenseNumber != null and licenseNumber != ''"> and license_number = #{entity.licenseNumber}</if>
<if test="entity.licenseIssueDate != null "> and license_issue_date = #{entity.licenseIssueDate}</if>
<if test="entity.licenseExpiryDate != null "> and license_expiry_date = #{entity.licenseExpiryDate}</if>
<if test="entity.price != null "> and price = #{entity.price}</if>
<if test="entity.duration != null and entity.duration != ''"> and duration = #{entity.duration}</if>
<if test="entity.notes != null and entity.notes != ''"> and notes = #{notes}</if>
<if test="entity.licenseCover != null and entity.licenseCover != ''"> and license_cover = #{entity.licenseCover}</if>
or deleted = 0 and dept_id = 100
<if test="entity.deptId != null "> and dept_id = #{entity.deptId} </if>
<if test="entity.businessType != null and entity.businessType != ''"> and business_type like concat('%', #{entity.businessType}, '%')</if>
<if test="entity.description != null and entity.description != ''"> and description = #{entity.description}</if>
<if test="entity.licenseNumber != null and licenseNumber != ''"> and license_number = #{entity.licenseNumber}</if>

View File

@ -26,9 +26,11 @@ import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
import cn.iocoder.yudao.module.system.service.permission.MenuService;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.thoughtworks.xstream.core.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
@ -38,10 +40,7 @@ import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.spec.AlgorithmParameterSpec;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
@ -63,9 +62,7 @@ public class SysLoginController {
@Resource
private MenuService menuService;
//
// @Autowired
// private SysPermissionService permissionService;
@Resource
private AdminUserApi userService;
@ -268,12 +265,12 @@ public class SysLoginController {
// @GetMapping("getJxInfo")
// public CommonResult getJxInfo()
// {
// AdminUserRespDTO user = SecurityFrameworkUtils.getLoginUser()
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
// // 角色集合
// Set<String> roles = permissionService.getRolePermission(user);
// //获取驾校的
//
// Long userId = SecurityUtils.getUserId();
// LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
// Long userId = loginUser.getId();
// SysUser sysUser = sysUserMapper.selectUserById(userId);
// String phonenumber = sysUser.getPhonenumber();
// DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectByPhonenumber(phonenumber);

View File

@ -23,10 +23,11 @@
<module>yudao-module-erp</module>
<module>dl-module-base</module>
<module>dl-module-company</module>
<!-- Server 主项目 -->
<module>yudao-server</module>
<module>dl-module-knowledge</module>
<module>dl-module-rescue</module>
<module>dl-module-jx</module>
<!-- Server 主项目 -->
<module>yudao-server</module>
<!-- <module>yudao-module-ai</module>-->
</modules>

View File

@ -129,7 +129,8 @@ public class YudaoWebSecurityConfigurerAdapter {
.authorizeRequests()
// 1.1 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll()
.antMatchers(HttpMethod.POST, "/admin-api/rescue/login", "/admin-api/rescue/loginApp", "/admin-api/rescue/driverLogin").anonymous()
.antMatchers(HttpMethod.POST, "/admin-api/rescue/login", "/admin-api/rescue/loginApp","/admin-api/system/auth/loginApp", "/admin-api/rescue/driverLogin").anonymous()
// 1.2 设置 @PermitAll 无需认证
.antMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll()
.antMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll()

View File

@ -1,13 +1,21 @@
package cn.iocoder.yudao.module.system.controller.admin.auth;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.config.SecurityProperties;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import cn.iocoder.yudao.module.system.controller.admin.auth.vo.*;
import cn.iocoder.yudao.module.system.controller.admin.user.LoginBody;
import cn.iocoder.yudao.module.system.convert.auth.AuthConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
@ -34,7 +42,9 @@ import javax.validation.Valid;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@ -61,6 +71,11 @@ public class AuthController {
@Resource
private SecurityProperties securityProperties;
@Resource
private PermissionApi permissionApi;
@Resource
private RoleApi roleApi;
@PostMapping("/login")
@PermitAll
@ -69,6 +84,42 @@ public class AuthController {
return success(authService.login(reqVO));
}
/**
* 登录方法
*
* @param loginBody 登录信息
* @return 结果
*/
@PostMapping("/loginApp")
public CommonResult loginApp(@RequestBody LoginBody loginBody) throws Exception {
String userName = loginBody.getUsername();
AdminUserDO user = userService.getUserByUsername(userName);
if (ObjectUtil.isEmpty(user)) {
return error(new ErrorCode(2_002_000_005, "登录账号不存在"));
}
// 获取登录用户的角色信息
List<Long> roleIdsByUserId = permissionApi.getRoleIdsByUserId(user.getId());
if (ObjectUtil.isEmpty(roleIdsByUserId) || roleIdsByUserId.size() == 0) {
return error(new ErrorCode(2_002_000_005, "登录账号不存在"));
}
List<RoleReqDTO> roleList = roleApi.getRoleList();
List<String> roleNames = roleList.stream().filter(item -> roleIdsByUserId.contains(item.getId())).map(item -> item.getName()).collect(Collectors.toList());
if (roleList.isEmpty()){
return error(new ErrorCode(2_002_000_005, "登录失败,当前登录用户未分配任何角色"));
}
if (loginBody.getTypes().equals("3") && !roleNames.contains("教练")){
return error(new ErrorCode(2_002_000_005, "当前登录用户未分配教练角色"));
}
if (loginBody.getTypes().equals("2") && !roleNames.contains("驾校管理员")){
return error(new ErrorCode(2_002_000_005, "当前登录用户未分配驾校管理员角色"));
}
AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO();
authLoginReqVO.setUsername(loginBody.getUsername());
authLoginReqVO.setPassword(loginBody.getPassword());
return success(authService.login(authLoginReqVO));
}
@PostMapping("/logout")
@PermitAll
@Operation(summary = "登出系统")

View File

@ -0,0 +1,37 @@
package cn.iocoder.yudao.module.system.controller.admin.user;
import lombok.Data;
/**
* 用户登录对象
*
* @author ruoyi
*/
@Data
public class LoginBody
{
/**
* 用户名
*/
private String username;
/**
* 用户密码
*/
private String password;
/**
* 验证码
*/
private String code;
/**
* 唯一标识
*/
private String uuid;
//0账号密码登录1手机号登录 2:管理 3教练
private String type;
private String types;
private String phone;
private String realName;
}

View File

@ -143,6 +143,8 @@ public interface PermissionService {
*/
Set<Long> getUserRoleIdListByUserIdFromCache(Long userId);
Set<String> getRolePermission(Long userId);
// ========== 用户-部门的相关方法 ==========
/**

View File

@ -267,6 +267,11 @@ public class PermissionServiceImpl implements PermissionService {
return getUserRoleIdListByUserId(userId);
}
@Override
public Set<String> getRolePermission(Long userId) {
return null;
}
@Override
public Set<Long> getUserRoleIdListByRoleId(Collection<Long> roleIds) {
return convertSet(userRoleMapper.selectListByRoleIds(roleIds), UserRoleDO::getUserId);

View File

@ -55,6 +55,12 @@
<artifactId>dl-module-rescue</artifactId>
<version>${revision}</version>
</dependency>
<!-- 道路救援包 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>dl-module-jx</artifactId>
<version>${revision}</version>
</dependency>
<!-- 会员中心。默认注释,保证编译速度 -->
<!-- <dependency>-->
<!-- <groupId>cn.iocoder.boot</groupId>-->