feat: 储值目标完成
This commit is contained in:
parent
f7677c8bc1
commit
94715f6601
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.dto.financial.debtRepaymentPlan;
|
||||
package cn.bunny.dao.dto.financial.debtRepaymentPlan.admin;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
@ -18,6 +18,9 @@ import java.time.LocalDateTime;
|
|||
@Schema(name = "CategoryUserAddDto对象", title = "债务还款计划表添加", description = "债务还款计划表添加")
|
||||
public class DebtRepaymentPlanAddDto {
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "installmentNumber", title = "债务金额")
|
||||
@NotNull(message = "债务金额不能为空")
|
||||
private BigDecimal installmentNumber;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.dto.financial.debtRepaymentPlan;
|
||||
package cn.bunny.dao.dto.financial.debtRepaymentPlan.admin;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -16,6 +16,9 @@ import java.time.LocalDateTime;
|
|||
@Schema(name = "DebtRepaymentPlanDto对象", title = "债务还款计划查询", description = "债务还款计划查询")
|
||||
public class DebtRepaymentPlanDto {
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "installmentNumber", title = "债务金额")
|
||||
private BigDecimal installmentNumber;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.dto.financial.debtRepaymentPlan;
|
||||
package cn.bunny.dao.dto.financial.debtRepaymentPlan.admin;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
@ -22,6 +22,9 @@ public class DebtRepaymentPlanUpdateDto {
|
|||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "installmentNumber", title = "债务金额")
|
||||
@NotNull(message = "债务金额不能为空")
|
||||
private BigDecimal installmentNumber;
|
|
@ -1,6 +1,7 @@
|
|||
package cn.bunny.dao.dto.financial.savingGoal;
|
||||
package cn.bunny.dao.dto.financial.savingGoal.admin;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -33,11 +34,17 @@ public class SavingGoalAddDto {
|
|||
|
||||
@Schema(name = "amount", title = "目标金额")
|
||||
@NotNull(message = "目标金额不能为空")
|
||||
@Min(value = 0L, message = "储蓄值不能小于0")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(name = "duration", title = "目标时长")
|
||||
@NotNull(message = "目标时长不能为空")
|
||||
@NotBlank(message = "目标时长不能为空")
|
||||
private String duration;
|
||||
@Schema(name = "startDuration", title = "开始目标时长")
|
||||
@NotNull(message = "开始目标时长不能为空")
|
||||
@NotBlank(message = "开始目标时长不能为空")
|
||||
private String startDuration;
|
||||
|
||||
@Schema(name = "endDuration", title = "结束目标时长")
|
||||
@NotNull(message = "结束目标时长不能为空")
|
||||
@NotBlank(message = "结束目标时长不能为空")
|
||||
private String endDuration;
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.dto.financial.savingGoal;
|
||||
package cn.bunny.dao.dto.financial.savingGoal.admin;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -15,9 +15,6 @@ import java.math.BigDecimal;
|
|||
@Schema(name = "SavingGoalDto对象", title = "用户储值查询", description = "用户储值查询")
|
||||
public class SavingGoalDto {
|
||||
|
||||
@Schema(name = "id", title = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户id")
|
||||
private Long userId;
|
||||
|
||||
|
@ -30,7 +27,10 @@ public class SavingGoalDto {
|
|||
@Schema(name = "amount", title = "目标金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(name = "duration", title = "目标时长")
|
||||
private String duration;
|
||||
@Schema(name = "startDuration", title = "开始目标时长")
|
||||
private String startDuration;
|
||||
|
||||
@Schema(name = "endDuration", title = "结束目标时长")
|
||||
private String endDuration;
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package cn.bunny.dao.dto.financial.savingGoal;
|
||||
package cn.bunny.dao.dto.financial.savingGoal.admin;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
@ -39,9 +39,14 @@ public class SavingGoalUpdateDto {
|
|||
@NotNull(message = "目标金额不能为空")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(name = "duration", title = "目标时长")
|
||||
@NotNull(message = "目标时长不能为空")
|
||||
@NotBlank(message = "目标时长不能为空")
|
||||
private String duration;
|
||||
@Schema(name = "startDuration", title = "开始目标时长")
|
||||
@NotNull(message = "开始目标时长不能为空")
|
||||
@NotBlank(message = "开始目标时长不能为空")
|
||||
private String startDuration;
|
||||
|
||||
@Schema(name = "endDuration", title = "结束目标时长")
|
||||
@NotNull(message = "结束目标时长不能为空")
|
||||
@NotBlank(message = "结束目标时长不能为空")
|
||||
private String endDuration;
|
||||
|
||||
}
|
|
@ -25,6 +25,9 @@ import java.time.LocalDateTime;
|
|||
@Schema(name = "DebtRepaymentPlan对象", title = "债务还款计划表", description = "债务还款计划表")
|
||||
public class DebtRepaymentPlan extends BaseEntity {
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "installmentNumber", title = "债务金额")
|
||||
private BigDecimal installmentNumber;
|
||||
|
||||
|
|
|
@ -36,8 +36,11 @@ public class SavingGoal extends BaseEntity {
|
|||
@Schema(name = "amount", title = "目标金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(name = "duration", title = "目标时长")
|
||||
private String duration;
|
||||
@Schema(name = "startDuration", title = "开始目标时长")
|
||||
private String startDuration;
|
||||
|
||||
@Schema(name = "endDuration", title = "结束目标时长")
|
||||
private String endDuration;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package cn.bunny.dao.vo.financial.admin;
|
||||
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseUserVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -13,7 +16,15 @@ import java.time.LocalDateTime;
|
|||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "DebtRepaymentPlanVo对象", title = "债务还款计划返回对象", description = "债务还款计划返回对象")
|
||||
public class DebtRepaymentPlanVo extends BaseVo {
|
||||
public class DebtRepaymentPlanVo extends BaseUserVo {
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JSONField(serializeUsing = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "installmentNumber", title = "债务金额")
|
||||
private BigDecimal installmentNumber;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package cn.bunny.dao.vo.financial.admin;
|
||||
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseUserVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -13,11 +16,16 @@ import java.time.LocalDateTime;
|
|||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "DebtTrackingVo对象", title = "债务追踪返回内容", description = "债务追踪返回内容")
|
||||
public class DebtTrackingVo extends BaseVo {
|
||||
public class DebtTrackingVo extends BaseUserVo {
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JSONField(serializeUsing = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "debtorName", title = "债务人姓名")
|
||||
private String debtorName;
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package cn.bunny.dao.vo.financial.admin;
|
||||
|
||||
import cn.bunny.dao.common.vo.BaseVo;
|
||||
import cn.bunny.dao.common.vo.BaseUserVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -12,14 +15,16 @@ import java.math.BigDecimal;
|
|||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Schema(name = "SavingGoalVo对象", title = "用户储值返回内容", description = "用户储值返回内容")
|
||||
public class SavingGoalVo extends BaseVo {
|
||||
|
||||
@Schema(name = "id", title = "主键")
|
||||
private Long id;
|
||||
public class SavingGoalVo extends BaseUserVo {
|
||||
|
||||
@Schema(name = "userId", title = "绑定的用户id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JSONField(serializeUsing = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "statusType", title = "完成状态")
|
||||
private String statusType;
|
||||
|
||||
|
@ -29,7 +34,10 @@ public class SavingGoalVo extends BaseVo {
|
|||
@Schema(name = "amount", title = "目标金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(name = "duration", title = "目标时长")
|
||||
private String duration;
|
||||
@Schema(name = "startDuration", title = "开始目标时长")
|
||||
private String startDuration;
|
||||
|
||||
@Schema(name = "endDuration", title = "结束目标时长")
|
||||
private String endDuration;
|
||||
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package cn.bunny.services.controller.financial;
|
||||
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanAddDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanUpdateDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanAddDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanUpdateDto;
|
||||
import cn.bunny.dao.entity.financial.DebtRepaymentPlan;
|
||||
import cn.bunny.dao.pojo.result.PageResult;
|
||||
import cn.bunny.dao.pojo.result.Result;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package cn.bunny.services.controller.financial;
|
||||
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalAddDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalUpdateDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalAddDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalUpdateDto;
|
||||
import cn.bunny.dao.entity.financial.SavingGoal;
|
||||
import cn.bunny.dao.pojo.result.PageResult;
|
||||
import cn.bunny.dao.pojo.result.Result;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.services.mapper.financial;
|
||||
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.entity.financial.DebtRepaymentPlan;
|
||||
import cn.bunny.dao.vo.financial.admin.DebtRepaymentPlanVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cn.bunny.services.mapper.financial;
|
||||
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalDto;
|
||||
import cn.bunny.dao.entity.financial.SavingGoal;
|
||||
import cn.bunny.dao.vo.financial.admin.SavingGoalVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package cn.bunny.services.service.financial;
|
||||
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanAddDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanUpdateDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanAddDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanUpdateDto;
|
||||
import cn.bunny.dao.entity.financial.DebtRepaymentPlan;
|
||||
import cn.bunny.dao.pojo.result.PageResult;
|
||||
import cn.bunny.dao.vo.financial.admin.DebtRepaymentPlanVo;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package cn.bunny.services.service.financial;
|
||||
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalAddDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalUpdateDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalAddDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalUpdateDto;
|
||||
import cn.bunny.dao.entity.financial.SavingGoal;
|
||||
import cn.bunny.dao.pojo.result.PageResult;
|
||||
import cn.bunny.dao.vo.financial.admin.SavingGoalVo;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package cn.bunny.services.service.financial.impl;
|
||||
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanAddDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.DebtRepaymentPlanUpdateDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanAddDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanDto;
|
||||
import cn.bunny.dao.dto.financial.debtRepaymentPlan.admin.DebtRepaymentPlanUpdateDto;
|
||||
import cn.bunny.dao.entity.financial.DebtRepaymentPlan;
|
||||
import cn.bunny.dao.pojo.result.PageResult;
|
||||
import cn.bunny.dao.vo.financial.admin.DebtRepaymentPlanVo;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package cn.bunny.services.service.financial.impl;
|
||||
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalAddDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.SavingGoalUpdateDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalAddDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalDto;
|
||||
import cn.bunny.dao.dto.financial.savingGoal.admin.SavingGoalUpdateDto;
|
||||
import cn.bunny.dao.entity.financial.SavingGoal;
|
||||
import cn.bunny.dao.pojo.result.PageResult;
|
||||
import cn.bunny.dao.vo.financial.admin.SavingGoalVo;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.financial.DebtRepaymentPlan">
|
||||
<id column="id" property="id"/>
|
||||
<id column="user_id" property="userId"/>
|
||||
<id column="create_time" property="createTime"/>
|
||||
<id column="update_time" property="updateTime"/>
|
||||
<id column="create_user" property="createUser"/>
|
||||
|
@ -29,6 +30,7 @@
|
|||
create_user.username as create_username,
|
||||
update_user.username as update_username
|
||||
from t_debt_repayment_plan base
|
||||
left join sys_user base_user on base_user.id = base.user_id
|
||||
left join sys_user create_user on create_user.id = base.create_user
|
||||
left join sys_user update_user on update_user.id = base.update_user
|
||||
<where>
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
<id column="status_type" property="statusType"/>
|
||||
<id column="saving_goal_name" property="savingGoalName"/>
|
||||
<id column="amount" property="amount"/>
|
||||
<id column="duration" property="duration"/>
|
||||
<id column="start_duration" property="startDuration"/>
|
||||
<id column="end_duration" property="endDuration"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
|
@ -26,21 +27,20 @@
|
|||
<select id="selectListByPage" resultType="cn.bunny.dao.vo.financial.admin.SavingGoalVo">
|
||||
select
|
||||
base.*,
|
||||
base_user.username as username,
|
||||
create_user.username as create_username,
|
||||
update_user.username as update_username
|
||||
from t_saving_goal base
|
||||
left join sys_user base_user on base_user.id = base.user_id
|
||||
left join sys_user create_user on create_user.id = base.create_user
|
||||
left join sys_user update_user on update_user.id = base.update_user
|
||||
<where>
|
||||
base.is_deleted = 0
|
||||
<if test="dto.id != null and dto.id != ''">
|
||||
and base.id like CONCAT('%',#{dto.id},'%')
|
||||
</if>
|
||||
<if test="dto.userId != null and dto.userId != ''">
|
||||
and base.user_id like CONCAT('%',#{dto.userId},'%')
|
||||
and base.user_id = #{dto.userId}
|
||||
</if>
|
||||
<if test="dto.statusType != null and dto.statusType != ''">
|
||||
and base.status_type like CONCAT('%',#{dto.statusType},'%')
|
||||
and base.status_type = #{dto.statusType}
|
||||
</if>
|
||||
<if test="dto.savingGoalName != null and dto.savingGoalName != ''">
|
||||
and base.saving_goal_name like CONCAT('%',#{dto.savingGoalName},'%')
|
||||
|
@ -48,8 +48,9 @@
|
|||
<if test="dto.amount != null and dto.amount != ''">
|
||||
and base.amount like CONCAT('%',#{dto.amount},'%')
|
||||
</if>
|
||||
<if test="dto.duration != null and dto.duration != ''">
|
||||
and base.duration like CONCAT('%',#{dto.duration},'%')
|
||||
<if test="dto.startDuration != null and dto.endDuration != null">
|
||||
and (base.start_duration between #{dto.startDuration} and #{dto.endDuration})
|
||||
and (base.end_duration between #{dto.startDuration} and #{dto.endDuration})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue