This commit is contained in:
Lx 2025-05-27 11:49:37 +08:00
parent ccc7cffdf1
commit 9205968184
8 changed files with 46 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.apache.poi.hpsf.Decimal;
/**
* 驾校教练 DO
@ -100,5 +101,15 @@ public class DlDriveSchoolCoach extends TenantBaseDO {
*/
private Long folderId;
/**
* 提成
*/
private Decimal commission;
/**
* 银行卡号
*/
private String bankCardId;
}

View File

@ -37,4 +37,6 @@ public class DlDriveSchoolStudentVO extends DlDriveSchoolStudent {
private String courseName;
/**订单ID*/
private String orderId;
/**排序方式asc desc*/
private String sort;
}

View File

@ -80,4 +80,10 @@ public class DriveSchoolContractController extends BaseController
{
return toAjax(driveSchoolContractService.deleteDriveSchoolContractByIds(ids));
}
@GetMapping("/getContractByUserId")
public CommonResult getContractByUserId(Long userId)
{
return success(driveSchoolContractService.getContractByUserId(userId));
}
}

View File

@ -64,4 +64,6 @@ public interface DriveSchoolContractMapper
* @return 结果
*/
public int deleteDriveSchoolContractByIds(Long[] ids);
public DriveSchoolContract getContractByUserId(Long userId);
}

View File

@ -62,4 +62,6 @@ public interface IDriveSchoolContractService
* @return 结果
*/
public int deleteDriveSchoolContractById(Long id);
public DriveSchoolContract getContractByUserId(Long userId);
}

View File

@ -168,4 +168,9 @@ public class DriveSchoolContractServiceImpl implements IDriveSchoolContractServi
{
return driveSchoolContractMapper.deleteDriveSchoolContractById(id);
}
@Override
public DriveSchoolContract getContractByUserId(Long userId) {
return driveSchoolContractMapper.getContractByUserId(userId);
}
}

View File

@ -167,8 +167,21 @@
<if test="entity.endTime!=null and entity.endTime!=''">
AND dss.create_time &lt;= #{entity.endTime}
</if>
<if test="entity.courseType!=null and entity.courseType!=''">
AND dsco.course_type = #{entity.courseType}
</if>
GROUP BY
dsco.id
dss.user_id
<choose>
<when test="entity.sort=='asc'">
ORDER BY
dss.create_time ASC
</when>
<otherwise>
ORDER BY
dss.create_time DESC
</otherwise>
</choose>
</select>
<select id="selectStudentList" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO">
SELECT

View File

@ -91,4 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="getContractByUserId" resultType="cn.iocoder.yudao.module.jx.domain.DriveSchoolContract">
SELECT *FROM drive_school_contract WHERE user_id = #{userId} AND deleted = 0 ORDER BY id DESC LIMIT 1
</select>
</mapper>