feat: 重构代码
This commit is contained in:
parent
43c300b1e6
commit
6d5abf54db
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.financial.bill;
|
package cn.bunny.dao.dto.financial.bill.user;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
@ -18,7 +18,7 @@ import java.time.LocalDateTime;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Builder
|
@Builder
|
||||||
@Schema(name = "BillAddDto对象", title = "账单信息添加内容", description = "账单信息添加内容")
|
@Schema(name = "BillAddDto对象", title = "账单信息添加内容", description = "账单信息添加内容")
|
||||||
public class BillAddDto {
|
public class BillUserAddDto {
|
||||||
|
|
||||||
@Schema(name = "username", title = "类型:1 - 收入,-1 - 支出")
|
@Schema(name = "username", title = "类型:1 - 收入,-1 - 支出")
|
||||||
@NotNull(message = "类型不能为空")
|
@NotNull(message = "类型不能为空")
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.financial.bill;
|
package cn.bunny.dao.dto.financial.bill.user;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
@ -14,7 +14,7 @@ import java.time.LocalDate;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Builder
|
@Builder
|
||||||
@Schema(name = "BillDto对象", title = "账单信息查询内容", description = "账单信息查询内容")
|
@Schema(name = "BillDto对象", title = "账单信息查询内容", description = "账单信息查询内容")
|
||||||
public class BillDto {
|
public class BillUserDto {
|
||||||
|
|
||||||
@Schema(name = "username", title = "类型:1 - 收入,-1 - 支出")
|
@Schema(name = "username", title = "类型:1 - 收入,-1 - 支出")
|
||||||
private Byte type;
|
private Byte type;
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.financial.bill;
|
package cn.bunny.dao.dto.financial.bill.user;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
@ -16,7 +16,7 @@ import java.time.LocalDateTime;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Builder
|
@Builder
|
||||||
@Schema(name = "BillUpdateDto对象", title = "账单信息更新内容", description = "账单信息更新内容")
|
@Schema(name = "BillUpdateDto对象", title = "账单信息更新内容", description = "账单信息更新内容")
|
||||||
public class BillUpdateDto {
|
public class BillUserUpdateDto {
|
||||||
|
|
||||||
@Schema(name = "id", title = "主键")
|
@Schema(name = "id", title = "主键")
|
||||||
@NotNull(message = "id不能为空")
|
@NotNull(message = "id不能为空")
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.system.configuration.category;
|
package cn.bunny.dao.dto.financial.category.admin;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.system.configuration.category;
|
package cn.bunny.dao.dto.financial.category.admin;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.system.configuration.category;
|
package cn.bunny.dao.dto.financial.category.admin;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.financial.category;
|
package cn.bunny.dao.dto.financial.category.user;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.financial.category;
|
package cn.bunny.dao.dto.financial.category.user;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
||||||
package cn.bunny.dao.dto.financial.category;
|
package cn.bunny.dao.dto.financial.category.user;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
|
@ -1,43 +0,0 @@
|
||||||
package cn.bunny.dao.entity.financial;
|
|
||||||
|
|
||||||
import cn.bunny.dao.common.entity.BaseEntity;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 债务回收管理表
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-11
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@TableName("t_debt_collection_management")
|
|
||||||
@Schema(name = "DebtCollectionManagement对象", title = "债务回收管理", description = "债务回收管理")
|
|
||||||
public class DebtCollectionManagement extends BaseEntity {
|
|
||||||
|
|
||||||
@Schema(name = "debtId", title = "债务ID")
|
|
||||||
private Long debtId;
|
|
||||||
|
|
||||||
@Schema(name = "recoveryDate", title = "回收日期")
|
|
||||||
private LocalDateTime recoveryDate;
|
|
||||||
|
|
||||||
@Schema(name = "recoveryAmount", title = "回收金额")
|
|
||||||
private BigDecimal recoveryAmount;
|
|
||||||
|
|
||||||
@Schema(name = "recoveryMethod", title = "回收方式")
|
|
||||||
private String recoveryMethod;
|
|
||||||
|
|
||||||
@Schema(name = "notes", title = "备注")
|
|
||||||
private String notes;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
package cn.bunny.services.controller.configuration;
|
|
||||||
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryAddDto;
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryDto;
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryUpdateDto;
|
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
|
||||||
import cn.bunny.dao.pojo.result.Result;
|
|
||||||
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
|
||||||
import cn.bunny.dao.vo.configuration.CategoryVo;
|
|
||||||
import cn.bunny.services.service.configuration.CategoryService;
|
|
||||||
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 jakarta.validation.Valid;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 分类信息表 前端控制器
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-08 10:29:58
|
|
||||||
*/
|
|
||||||
@Tag(name = "分类信息", description = "分类信息相关接口")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("admin/category")
|
|
||||||
public class CategoryController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private CategoryService categoryService;
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询分类信息", description = "分页查询分类信息")
|
|
||||||
@GetMapping("getCategoryList/{page}/{limit}")
|
|
||||||
public Mono<Result<PageResult<CategoryVo>>> getCategoryList(
|
|
||||||
@Parameter(name = "page", description = "当前页", required = true)
|
|
||||||
@PathVariable("page") Integer page,
|
|
||||||
@Parameter(name = "limit", description = "每页记录数", required = true)
|
|
||||||
@PathVariable("limit") Integer limit,
|
|
||||||
CategoryDto dto) {
|
|
||||||
Page<Category> pageParams = new Page<>(page, limit);
|
|
||||||
PageResult<CategoryVo> pageResult = categoryService.getCategoryList(pageParams, dto);
|
|
||||||
return Mono.just(Result.success(pageResult));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "添加分类信息", description = "添加分类信息")
|
|
||||||
@PostMapping("addCategory")
|
|
||||||
public Mono<Result<String>> addCategory(@Valid @RequestBody CategoryAddDto dto) {
|
|
||||||
categoryService.addCategory(dto);
|
|
||||||
return Mono.just(Result.success(ResultCodeEnum.ADD_SUCCESS));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "更新分类信息", description = "更新分类信息")
|
|
||||||
@PutMapping("updateCategory")
|
|
||||||
public Mono<Result<String>> updateCategory(@Valid @RequestBody CategoryUpdateDto dto) {
|
|
||||||
categoryService.updateCategory(dto);
|
|
||||||
return Mono.just(Result.success(ResultCodeEnum.UPDATE_SUCCESS));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除分类信息", description = "删除分类信息")
|
|
||||||
@DeleteMapping("deleteCategory")
|
|
||||||
public Mono<Result<String>> deleteCategory(@RequestBody List<Long> ids) {
|
|
||||||
categoryService.deleteCategory(ids);
|
|
||||||
return Mono.just(Result.success(ResultCodeEnum.DELETE_SUCCESS));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
package cn.bunny.services.controller.financial;
|
package cn.bunny.services.controller.financial;
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.bill.BillAddDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserAddDto;
|
||||||
import cn.bunny.dao.dto.financial.bill.BillDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserDto;
|
||||||
import cn.bunny.dao.dto.financial.bill.BillUpdateDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserUpdateDto;
|
||||||
import cn.bunny.dao.entity.financial.Bill;
|
import cn.bunny.dao.entity.financial.Bill;
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
import cn.bunny.dao.pojo.result.PageResult;
|
||||||
import cn.bunny.dao.pojo.result.Result;
|
import cn.bunny.dao.pojo.result.Result;
|
||||||
|
@ -31,7 +31,7 @@ import java.util.List;
|
||||||
@Tag(name = "账单信息", description = "账单信息相关接口")
|
@Tag(name = "账单信息", description = "账单信息相关接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("admin/bill")
|
@RequestMapping("admin/bill")
|
||||||
public class BillController {
|
public class BillUserController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BillService billService;
|
private BillService billService;
|
||||||
|
@ -43,7 +43,7 @@ public class BillController {
|
||||||
@PathVariable("page") Integer page,
|
@PathVariable("page") Integer page,
|
||||||
@Parameter(name = "limit", description = "每页记录数", required = true)
|
@Parameter(name = "limit", description = "每页记录数", required = true)
|
||||||
@PathVariable("limit") Integer limit,
|
@PathVariable("limit") Integer limit,
|
||||||
BillDto dto) {
|
BillUserDto dto) {
|
||||||
Page<Bill> pageParams = new Page<>(page, limit);
|
Page<Bill> pageParams = new Page<>(page, limit);
|
||||||
PageResult<BillVo> pageResult = billService.getBillList(pageParams, dto);
|
PageResult<BillVo> pageResult = billService.getBillList(pageParams, dto);
|
||||||
return Mono.just(Result.success(pageResult));
|
return Mono.just(Result.success(pageResult));
|
||||||
|
@ -51,14 +51,14 @@ public class BillController {
|
||||||
|
|
||||||
@Operation(summary = "添加账单信息", description = "添加账单信息")
|
@Operation(summary = "添加账单信息", description = "添加账单信息")
|
||||||
@PostMapping("noManage/addBill")
|
@PostMapping("noManage/addBill")
|
||||||
public Mono<Result<String>> addBill(@Valid @RequestBody BillAddDto dto) {
|
public Mono<Result<String>> addBill(@Valid @RequestBody BillUserAddDto dto) {
|
||||||
billService.addBill(dto);
|
billService.addBill(dto);
|
||||||
return Mono.just(Result.success(ResultCodeEnum.ADD_SUCCESS));
|
return Mono.just(Result.success(ResultCodeEnum.ADD_SUCCESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "更新账单信息", description = "更新账单信息")
|
@Operation(summary = "更新账单信息", description = "更新账单信息")
|
||||||
@PutMapping("noManage/updateBill")
|
@PutMapping("noManage/updateBill")
|
||||||
public Mono<Result<String>> updateBill(@Valid @RequestBody BillUpdateDto dto) {
|
public Mono<Result<String>> updateBill(@Valid @RequestBody BillUserUpdateDto dto) {
|
||||||
billService.updateBill(dto);
|
billService.updateBill(dto);
|
||||||
return Mono.just(Result.success(ResultCodeEnum.UPDATE_SUCCESS));
|
return Mono.just(Result.success(ResultCodeEnum.UPDATE_SUCCESS));
|
||||||
}
|
}
|
|
@ -1,14 +1,18 @@
|
||||||
package cn.bunny.services.controller.financial;
|
package cn.bunny.services.controller.financial;
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserAddDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryAddDto;
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryDto;
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserUpdateDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryUpdateDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserAddDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserUpdateDto;
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
import cn.bunny.dao.entity.financial.Category;
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
import cn.bunny.dao.pojo.result.PageResult;
|
||||||
import cn.bunny.dao.pojo.result.Result;
|
import cn.bunny.dao.pojo.result.Result;
|
||||||
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
||||||
|
import cn.bunny.dao.vo.configuration.CategoryVo;
|
||||||
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
||||||
import cn.bunny.services.service.financial.CategoryUserService;
|
import cn.bunny.services.service.financial.CategoryService;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
@ -26,15 +30,15 @@ import java.util.List;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Bunny
|
* @author Bunny
|
||||||
* @since 2024-11-08 10:00:09
|
* @since 2024-11-08 10:29:58
|
||||||
*/
|
*/
|
||||||
@Tag(name = "分类信息", description = "分类信息相关接口")
|
@Tag(name = "分类信息", description = "分类信息相关接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("admin/categoryUser")
|
@RequestMapping("admin/category")
|
||||||
public class CategoryUserController {
|
public class CategoryController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CategoryUserService categoryUserService;
|
private CategoryService categoryService;
|
||||||
|
|
||||||
@Operation(summary = "用户分类分页查询分类信息", description = "用户分类分页查询分类信息")
|
@Operation(summary = "用户分类分页查询分类信息", description = "用户分类分页查询分类信息")
|
||||||
@GetMapping("noManage/getCategoryUserList/{page}/{limit}")
|
@GetMapping("noManage/getCategoryUserList/{page}/{limit}")
|
||||||
|
@ -45,35 +49,69 @@ public class CategoryUserController {
|
||||||
@PathVariable("limit") Integer limit,
|
@PathVariable("limit") Integer limit,
|
||||||
CategoryUserDto dto) {
|
CategoryUserDto dto) {
|
||||||
Page<Category> pageParams = new Page<>(page, limit);
|
Page<Category> pageParams = new Page<>(page, limit);
|
||||||
PageResult<CategoryUserVo> pageResult = categoryUserService.getCategoryUserList(pageParams, dto);
|
PageResult<CategoryUserVo> pageResult = categoryService.getCategoryUserList(pageParams, dto);
|
||||||
return Mono.just(Result.success(pageResult));
|
return Mono.just(Result.success(pageResult));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "查询当前用户下所有的分类", description = "查询当前用户下所有的分类")
|
@Operation(summary = "查询当前用户下所有的分类", description = "查询当前用户下所有的分类")
|
||||||
@GetMapping("noManage/getCategoryUserAllList")
|
@GetMapping("noManage/getCategoryUserAllList")
|
||||||
public Mono<Result<List<CategoryUserVo>>> getCategoryUserAllList() {
|
public Mono<Result<List<CategoryUserVo>>> getCategoryUserAllList() {
|
||||||
List<CategoryUserVo> voList = categoryUserService.getCategoryUserAllList();
|
List<CategoryUserVo> voList = categoryService.getCategoryUserAllList();
|
||||||
return Mono.just(Result.success(voList));
|
return Mono.just(Result.success(voList));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "用戶分类添加分类信息", description = "用戶分类添加分类信息")
|
@Operation(summary = "用戶分类添加分类信息", description = "用戶分类添加分类信息")
|
||||||
@PostMapping("noManage/addCategoryUser")
|
@PostMapping("noManage/addCategoryUser")
|
||||||
public Mono<Result<String>> addCategoryUser(@Valid @RequestBody CategoryUserAddDto dto) {
|
public Mono<Result<String>> addCategoryUser(@Valid @RequestBody CategoryUserAddDto dto) {
|
||||||
categoryUserService.addCategoryUser(dto);
|
categoryService.addCategoryUser(dto);
|
||||||
return Mono.just(Result.success(ResultCodeEnum.ADD_SUCCESS));
|
return Mono.just(Result.success(ResultCodeEnum.ADD_SUCCESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "用户分类更新分类信息", description = "用户分类更新分类信息")
|
@Operation(summary = "用户分类更新分类信息", description = "用户分类更新分类信息")
|
||||||
@PutMapping("noManage/updateCategoryUser")
|
@PutMapping("noManage/updateCategoryUser")
|
||||||
public Mono<Result<String>> updateCategoryUser(@Valid @RequestBody CategoryUserUpdateDto dto) {
|
public Mono<Result<String>> updateCategoryUser(@Valid @RequestBody CategoryUserUpdateDto dto) {
|
||||||
categoryUserService.updateCategoryUser(dto);
|
categoryService.updateCategoryUser(dto);
|
||||||
return Mono.just(Result.success(ResultCodeEnum.UPDATE_SUCCESS));
|
return Mono.just(Result.success(ResultCodeEnum.UPDATE_SUCCESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "用户分类删除分类信息", description = "用户分类删除分类信息")
|
@Operation(summary = "用户分类删除分类信息", description = "用户分类删除分类信息")
|
||||||
@DeleteMapping("noManage/deleteCategoryUser")
|
@DeleteMapping("noManage/deleteCategoryUser")
|
||||||
public Mono<Result<String>> deleteCategoryUser(@RequestBody List<Long> ids) {
|
public Mono<Result<String>> deleteCategoryUser(@RequestBody List<Long> ids) {
|
||||||
categoryUserService.deleteCategoryUser(ids);
|
categoryService.deleteCategoryUser(ids);
|
||||||
|
return Mono.just(Result.success(ResultCodeEnum.DELETE_SUCCESS));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "分页查询分类信息", description = "分页查询分类信息")
|
||||||
|
@GetMapping("getCategoryList/{page}/{limit}")
|
||||||
|
public Mono<Result<PageResult<CategoryVo>>> getCategoryList(
|
||||||
|
@Parameter(name = "page", description = "当前页", required = true)
|
||||||
|
@PathVariable("page") Integer page,
|
||||||
|
@Parameter(name = "limit", description = "每页记录数", required = true)
|
||||||
|
@PathVariable("limit") Integer limit,
|
||||||
|
CategoryDto dto) {
|
||||||
|
Page<Category> pageParams = new Page<>(page, limit);
|
||||||
|
PageResult<CategoryVo> pageResult = categoryService.getCategoryList(pageParams, dto);
|
||||||
|
return Mono.just(Result.success(pageResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "添加分类信息", description = "添加分类信息")
|
||||||
|
@PostMapping("addCategory")
|
||||||
|
public Mono<Result<String>> addCategory(@Valid @RequestBody CategoryAddDto dto) {
|
||||||
|
categoryService.addCategory(dto);
|
||||||
|
return Mono.just(Result.success(ResultCodeEnum.ADD_SUCCESS));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "更新分类信息", description = "更新分类信息")
|
||||||
|
@PutMapping("updateCategory")
|
||||||
|
public Mono<Result<String>> updateCategory(@Valid @RequestBody CategoryUpdateDto dto) {
|
||||||
|
categoryService.updateCategory(dto);
|
||||||
|
return Mono.just(Result.success(ResultCodeEnum.UPDATE_SUCCESS));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除分类信息", description = "删除分类信息")
|
||||||
|
@DeleteMapping("deleteCategory")
|
||||||
|
public Mono<Result<String>> deleteCategory(@RequestBody List<Long> ids) {
|
||||||
|
categoryService.deleteCategory(ids);
|
||||||
return Mono.just(Result.success(ResultCodeEnum.DELETE_SUCCESS));
|
return Mono.just(Result.success(ResultCodeEnum.DELETE_SUCCESS));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,72 +0,0 @@
|
||||||
package cn.bunny.services.controller.financial;
|
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementAddDto;
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementDto;
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementUpdateDto;
|
|
||||||
import cn.bunny.dao.entity.financial.DebtCollectionManagement;
|
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
|
||||||
import cn.bunny.dao.pojo.result.Result;
|
|
||||||
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
|
||||||
import cn.bunny.dao.vo.financial.DebtCollectionManagementVo;
|
|
||||||
import cn.bunny.services.service.financial.DebtCollectionManagementService;
|
|
||||||
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 jakarta.validation.Valid;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 债务回收管理表表 前端控制器
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-11 16:13:55
|
|
||||||
*/
|
|
||||||
@Tag(name = "债务回收管理表", description = "债务回收管理表相关接口")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("admin/debtCollectionManagement")
|
|
||||||
public class DebtCollectionManagementController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DebtCollectionManagementService debtCollectionManagementService;
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询债务回收管理表", description = "分页查询债务回收管理表")
|
|
||||||
@GetMapping("getDebtCollectionManagementList/{page}/{limit}")
|
|
||||||
public Mono<Result<PageResult<DebtCollectionManagementVo>>> getDebtCollectionManagementList(
|
|
||||||
@Parameter(name = "page", description = "当前页", required = true)
|
|
||||||
@PathVariable("page") Integer page,
|
|
||||||
@Parameter(name = "limit", description = "每页记录数", required = true)
|
|
||||||
@PathVariable("limit") Integer limit,
|
|
||||||
DebtCollectionManagementDto dto) {
|
|
||||||
Page<DebtCollectionManagement> pageParams = new Page<>(page, limit);
|
|
||||||
PageResult<DebtCollectionManagementVo> pageResult = debtCollectionManagementService.getDebtCollectionManagementList(pageParams, dto);
|
|
||||||
return Mono.just(Result.success(pageResult));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "添加债务回收管理表", description = "添加债务回收管理表")
|
|
||||||
@PostMapping("addDebtCollectionManagement")
|
|
||||||
public Mono<Result<String>> addDebtCollectionManagement(@Valid @RequestBody DebtCollectionManagementAddDto dto) {
|
|
||||||
debtCollectionManagementService.addDebtCollectionManagement(dto);
|
|
||||||
return Mono.just(Result.success(ResultCodeEnum.ADD_SUCCESS));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "更新债务回收管理表", description = "更新债务回收管理表")
|
|
||||||
@PutMapping("updateDebtCollectionManagement")
|
|
||||||
public Mono<Result<String>> updateDebtCollectionManagement(@Valid @RequestBody DebtCollectionManagementUpdateDto dto) {
|
|
||||||
debtCollectionManagementService.updateDebtCollectionManagement(dto);
|
|
||||||
return Mono.just(Result.success(ResultCodeEnum.UPDATE_SUCCESS));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除债务回收管理表", description = "删除债务回收管理表")
|
|
||||||
@DeleteMapping("deleteDebtCollectionManagement")
|
|
||||||
public Mono<Result<String>> deleteDebtCollectionManagement(@RequestBody List<Long> ids) {
|
|
||||||
debtCollectionManagementService.deleteDebtCollectionManagement(ids);
|
|
||||||
return Mono.just(Result.success(ResultCodeEnum.DELETE_SUCCESS));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
package cn.bunny.services.mapper.financial;
|
package cn.bunny.services.mapper.financial;
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.bill.BillDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserDto;
|
||||||
import cn.bunny.dao.entity.financial.Bill;
|
import cn.bunny.dao.entity.financial.Bill;
|
||||||
import cn.bunny.dao.vo.financial.BillVo;
|
import cn.bunny.dao.vo.financial.BillVo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
@ -29,7 +29,7 @@ public interface BillMapper extends BaseMapper<Bill> {
|
||||||
* @param dto 账单信息查询表单
|
* @param dto 账单信息查询表单
|
||||||
* @return 账单信息分页结果
|
* @return 账单信息分页结果
|
||||||
*/
|
*/
|
||||||
IPage<BillVo> selectListByPage(@Param("page") Page<Bill> pageParams, @Param("dto") BillDto dto, @Param("userId") Long userId);
|
IPage<BillVo> selectListByPage(@Param("page") Page<Bill> pageParams, @Param("dto") BillUserDto dto, @Param("userId") Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物理删除账单信息
|
* 物理删除账单信息
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package cn.bunny.services.mapper.configuration;
|
package cn.bunny.services.mapper.financial;
|
||||||
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserDto;
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
import cn.bunny.dao.entity.financial.Category;
|
||||||
import cn.bunny.dao.vo.configuration.CategoryVo;
|
import cn.bunny.dao.vo.configuration.CategoryVo;
|
||||||
|
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
@ -21,6 +23,21 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CategoryMapper extends BaseMapper<Category> {
|
public interface CategoryMapper extends BaseMapper<Category> {
|
||||||
|
/**
|
||||||
|
* * 分页查询分类信息内容
|
||||||
|
*
|
||||||
|
* @param pageParams 分类信息分页参数
|
||||||
|
* @param dto 分类信息查询表单
|
||||||
|
* @return 分类信息分页结果
|
||||||
|
*/
|
||||||
|
IPage<CategoryUserVo> selectUserListByPage(@Param("page") Page<Category> pageParams, @Param("dto") CategoryUserDto dto, @Param("userId") Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物理删除分类信息
|
||||||
|
*
|
||||||
|
* @param ids 删除 id 列表
|
||||||
|
*/
|
||||||
|
void deleteBatchIdsWithUserPhysics(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 分页查询分类信息内容
|
* * 分页查询分类信息内容
|
|
@ -1,40 +0,0 @@
|
||||||
package cn.bunny.services.mapper.financial;
|
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserDto;
|
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
|
||||||
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 分类信息 Mapper 接口
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-08 10:00:09
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface CategoryUserMapper extends BaseMapper<Category> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 分页查询分类信息内容
|
|
||||||
*
|
|
||||||
* @param pageParams 分类信息分页参数
|
|
||||||
* @param dto 分类信息查询表单
|
|
||||||
* @return 分类信息分页结果
|
|
||||||
*/
|
|
||||||
IPage<CategoryUserVo> selectListByPage(@Param("page") Page<Category> pageParams, @Param("dto") CategoryUserDto dto, @Param("userId") Long userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物理删除分类信息
|
|
||||||
*
|
|
||||||
* @param ids 删除 id 列表
|
|
||||||
*/
|
|
||||||
void deleteBatchIdsWithPhysics(List<Long> ids);
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
package cn.bunny.services.mapper.financial;
|
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementDto;
|
|
||||||
import cn.bunny.dao.entity.financial.DebtCollectionManagement;
|
|
||||||
import cn.bunny.dao.vo.financial.DebtCollectionManagementVo;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 债务回收管理表 Mapper 接口
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-11 16:13:55
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface DebtCollectionManagementMapper extends BaseMapper<DebtCollectionManagement> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 分页查询债务回收管理表内容
|
|
||||||
*
|
|
||||||
* @param pageParams 债务回收管理表分页参数
|
|
||||||
* @param dto 债务回收管理表查询表单
|
|
||||||
* @return 债务回收管理表分页结果
|
|
||||||
*/
|
|
||||||
IPage<DebtCollectionManagementVo> selectListByPage(@Param("page") Page<DebtCollectionManagement> pageParams, @Param("dto") DebtCollectionManagementDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物理删除债务回收管理表
|
|
||||||
*
|
|
||||||
* @param ids 删除 id 列表
|
|
||||||
*/
|
|
||||||
void deleteBatchIdsWithPhysics(List<Long> ids);
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
package cn.bunny.services.service.configuration;
|
|
||||||
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryAddDto;
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryDto;
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryUpdateDto;
|
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
|
||||||
import cn.bunny.dao.vo.configuration.CategoryVo;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 分类信息 服务类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-08 10:29:58
|
|
||||||
*/
|
|
||||||
public interface CategoryService extends IService<Category> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 获取分类信息列表
|
|
||||||
*
|
|
||||||
* @return 分类信息返回列表
|
|
||||||
*/
|
|
||||||
PageResult<CategoryVo> getCategoryList(Page<Category> pageParams, CategoryDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 添加分类信息
|
|
||||||
*
|
|
||||||
* @param dto 添加表单
|
|
||||||
*/
|
|
||||||
void addCategory(@Valid CategoryAddDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 更新分类信息
|
|
||||||
*
|
|
||||||
* @param dto 更新表单
|
|
||||||
*/
|
|
||||||
void updateCategory(@Valid CategoryUpdateDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 删除|批量删除分类信息类型
|
|
||||||
*
|
|
||||||
* @param ids 删除id列表
|
|
||||||
*/
|
|
||||||
void deleteCategory(List<Long> ids);
|
|
||||||
}
|
|
|
@ -1,89 +0,0 @@
|
||||||
package cn.bunny.services.service.configuration.impl;
|
|
||||||
|
|
||||||
import cn.bunny.common.service.context.BaseContext;
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryAddDto;
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryDto;
|
|
||||||
import cn.bunny.dao.dto.system.configuration.category.CategoryUpdateDto;
|
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
|
||||||
import cn.bunny.dao.vo.configuration.CategoryVo;
|
|
||||||
import cn.bunny.services.mapper.configuration.CategoryMapper;
|
|
||||||
import cn.bunny.services.service.configuration.CategoryService;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 分类信息 服务实现类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-08 10:29:58
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 分类信息 服务实现类
|
|
||||||
*
|
|
||||||
* @param pageParams 分类信息分页查询page对象
|
|
||||||
* @param dto 分类信息分页查询对象
|
|
||||||
* @return 查询分页分类信息返回对象
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<CategoryVo> getCategoryList(Page<Category> pageParams, CategoryDto dto) {
|
|
||||||
IPage<CategoryVo> page = baseMapper.selectListByPage(pageParams, dto);
|
|
||||||
|
|
||||||
return PageResult.<CategoryVo>builder()
|
|
||||||
.list(page.getRecords())
|
|
||||||
.pageNo(page.getCurrent())
|
|
||||||
.pageSize(page.getSize())
|
|
||||||
.total(page.getTotal())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加分类信息
|
|
||||||
*
|
|
||||||
* @param dto 分类信息添加
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addCategory(@Valid CategoryAddDto dto) {
|
|
||||||
// 保存数据
|
|
||||||
Category category = new Category();
|
|
||||||
BeanUtils.copyProperties(dto, category);
|
|
||||||
|
|
||||||
// 如果内置的id为空设置为当前用户的id
|
|
||||||
category.setUserId(category.getUserId() == null ? BaseContext.getUserId() : dto.getUserId());
|
|
||||||
save(category);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新分类信息
|
|
||||||
*
|
|
||||||
* @param dto 分类信息更新
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void updateCategory(@Valid CategoryUpdateDto dto) {
|
|
||||||
// 更新内容
|
|
||||||
Category category = new Category();
|
|
||||||
BeanUtils.copyProperties(dto, category);
|
|
||||||
updateById(category);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除|批量删除分类信息
|
|
||||||
*
|
|
||||||
* @param ids 删除id列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void deleteCategory(List<Long> ids) {
|
|
||||||
baseMapper.deleteBatchIdsWithPhysics(ids);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
package cn.bunny.services.service.financial;
|
package cn.bunny.services.service.financial;
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.bill.BillAddDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserAddDto;
|
||||||
import cn.bunny.dao.dto.financial.bill.BillDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserDto;
|
||||||
import cn.bunny.dao.dto.financial.bill.BillUpdateDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserUpdateDto;
|
||||||
import cn.bunny.dao.entity.financial.Bill;
|
import cn.bunny.dao.entity.financial.Bill;
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
import cn.bunny.dao.pojo.result.PageResult;
|
||||||
import cn.bunny.dao.vo.financial.BillVo;
|
import cn.bunny.dao.vo.financial.BillVo;
|
||||||
|
@ -27,21 +27,21 @@ public interface BillService extends IService<Bill> {
|
||||||
*
|
*
|
||||||
* @return 账单信息返回列表
|
* @return 账单信息返回列表
|
||||||
*/
|
*/
|
||||||
PageResult<BillVo> getBillList(Page<Bill> pageParams, BillDto dto);
|
PageResult<BillVo> getBillList(Page<Bill> pageParams, BillUserDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 添加账单信息
|
* * 添加账单信息
|
||||||
*
|
*
|
||||||
* @param dto 添加表单
|
* @param dto 添加表单
|
||||||
*/
|
*/
|
||||||
void addBill(@Valid BillAddDto dto);
|
void addBill(@Valid BillUserAddDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 更新账单信息
|
* * 更新账单信息
|
||||||
*
|
*
|
||||||
* @param dto 更新表单
|
* @param dto 更新表单
|
||||||
*/
|
*/
|
||||||
void updateBill(@Valid BillUpdateDto dto);
|
void updateBill(@Valid BillUserUpdateDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 删除|批量删除账单信息类型
|
* * 删除|批量删除账单信息类型
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
package cn.bunny.services.service.financial;
|
package cn.bunny.services.service.financial;
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserAddDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryAddDto;
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryDto;
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserUpdateDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryUpdateDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserAddDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserUpdateDto;
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
import cn.bunny.dao.entity.financial.Category;
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
import cn.bunny.dao.pojo.result.PageResult;
|
||||||
|
import cn.bunny.dao.vo.configuration.CategoryVo;
|
||||||
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
@ -18,9 +22,9 @@ import java.util.List;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Bunny
|
* @author Bunny
|
||||||
* @since 2024-11-08 10:00:09
|
* @since 2024-11-08 10:29:58
|
||||||
*/
|
*/
|
||||||
public interface CategoryUserService extends IService<Category> {
|
public interface CategoryService extends IService<Category> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 用户分类分页查询分类信息
|
* * 用户分类分页查询分类信息
|
||||||
|
@ -56,4 +60,32 @@ public interface CategoryUserService extends IService<Category> {
|
||||||
* @return 当前用户分类返回列表
|
* @return 当前用户分类返回列表
|
||||||
*/
|
*/
|
||||||
List<CategoryUserVo> getCategoryUserAllList();
|
List<CategoryUserVo> getCategoryUserAllList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 获取分类信息列表
|
||||||
|
*
|
||||||
|
* @return 分类信息返回列表
|
||||||
|
*/
|
||||||
|
PageResult<CategoryVo> getCategoryList(Page<Category> pageParams, CategoryDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 添加分类信息
|
||||||
|
*
|
||||||
|
* @param dto 添加表单
|
||||||
|
*/
|
||||||
|
void addCategory(@Valid CategoryAddDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 更新分类信息
|
||||||
|
*
|
||||||
|
* @param dto 更新表单
|
||||||
|
*/
|
||||||
|
void updateCategory(@Valid CategoryUpdateDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 删除|批量删除分类信息类型
|
||||||
|
*
|
||||||
|
* @param ids 删除id列表
|
||||||
|
*/
|
||||||
|
void deleteCategory(List<Long> ids);
|
||||||
}
|
}
|
|
@ -1,52 +0,0 @@
|
||||||
package cn.bunny.services.service.financial;
|
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementAddDto;
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementDto;
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementUpdateDto;
|
|
||||||
import cn.bunny.dao.entity.financial.DebtCollectionManagement;
|
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
|
||||||
import cn.bunny.dao.vo.financial.DebtCollectionManagementVo;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 债务回收管理表 服务类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-11 16:13:55
|
|
||||||
*/
|
|
||||||
public interface DebtCollectionManagementService extends IService<DebtCollectionManagement> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 获取债务回收管理表列表
|
|
||||||
*
|
|
||||||
* @return 债务回收管理表返回列表
|
|
||||||
*/
|
|
||||||
PageResult<DebtCollectionManagementVo> getDebtCollectionManagementList(Page<DebtCollectionManagement> pageParams, DebtCollectionManagementDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 添加债务回收管理表
|
|
||||||
*
|
|
||||||
* @param dto 添加表单
|
|
||||||
*/
|
|
||||||
void addDebtCollectionManagement(@Valid DebtCollectionManagementAddDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 更新债务回收管理表
|
|
||||||
*
|
|
||||||
* @param dto 更新表单
|
|
||||||
*/
|
|
||||||
void updateDebtCollectionManagement(@Valid DebtCollectionManagementUpdateDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 删除|批量删除债务回收管理表类型
|
|
||||||
*
|
|
||||||
* @param ids 删除id列表
|
|
||||||
*/
|
|
||||||
void deleteDebtCollectionManagement(List<Long> ids);
|
|
||||||
}
|
|
|
@ -1,9 +1,9 @@
|
||||||
package cn.bunny.services.service.financial.impl;
|
package cn.bunny.services.service.financial.impl;
|
||||||
|
|
||||||
import cn.bunny.common.service.context.BaseContext;
|
import cn.bunny.common.service.context.BaseContext;
|
||||||
import cn.bunny.dao.dto.financial.bill.BillAddDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserAddDto;
|
||||||
import cn.bunny.dao.dto.financial.bill.BillDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserDto;
|
||||||
import cn.bunny.dao.dto.financial.bill.BillUpdateDto;
|
import cn.bunny.dao.dto.financial.bill.user.BillUserUpdateDto;
|
||||||
import cn.bunny.dao.entity.financial.Bill;
|
import cn.bunny.dao.entity.financial.Bill;
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
import cn.bunny.dao.pojo.result.PageResult;
|
||||||
import cn.bunny.dao.vo.financial.BillVo;
|
import cn.bunny.dao.vo.financial.BillVo;
|
||||||
|
@ -37,7 +37,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
|
||||||
* @return 查询分页账单信息返回对象
|
* @return 查询分页账单信息返回对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PageResult<BillVo> getBillList(Page<Bill> pageParams, BillDto dto) {
|
public PageResult<BillVo> getBillList(Page<Bill> pageParams, BillUserDto dto) {
|
||||||
// 需要根据当前用户去查询
|
// 需要根据当前用户去查询
|
||||||
Long userId = BaseContext.getUserId();
|
Long userId = BaseContext.getUserId();
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
|
||||||
* @param dto 账单信息添加
|
* @param dto 账单信息添加
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addBill(@Valid BillAddDto dto) {
|
public void addBill(@Valid BillUserAddDto dto) {
|
||||||
// 保存数据
|
// 保存数据
|
||||||
Bill bill = new Bill();
|
Bill bill = new Bill();
|
||||||
BeanUtils.copyProperties(dto, bill);
|
BeanUtils.copyProperties(dto, bill);
|
||||||
|
@ -71,7 +71,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
|
||||||
* @param dto 账单信息更新
|
* @param dto 账单信息更新
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updateBill(@Valid BillUpdateDto dto) {
|
public void updateBill(@Valid BillUserUpdateDto dto) {
|
||||||
// 更新内容
|
// 更新内容
|
||||||
Bill bill = new Bill();
|
Bill bill = new Bill();
|
||||||
BeanUtils.copyProperties(dto, bill);
|
BeanUtils.copyProperties(dto, bill);
|
||||||
|
|
|
@ -2,16 +2,20 @@ package cn.bunny.services.service.financial.impl;
|
||||||
|
|
||||||
import cn.bunny.common.service.context.BaseContext;
|
import cn.bunny.common.service.context.BaseContext;
|
||||||
import cn.bunny.common.service.exception.BunnyException;
|
import cn.bunny.common.service.exception.BunnyException;
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserAddDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryAddDto;
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryDto;
|
||||||
import cn.bunny.dao.dto.financial.category.CategoryUserUpdateDto;
|
import cn.bunny.dao.dto.financial.category.admin.CategoryUpdateDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserAddDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserDto;
|
||||||
|
import cn.bunny.dao.dto.financial.category.user.CategoryUserUpdateDto;
|
||||||
import cn.bunny.dao.entity.financial.Category;
|
import cn.bunny.dao.entity.financial.Category;
|
||||||
import cn.bunny.dao.pojo.constant.UserConstant;
|
import cn.bunny.dao.pojo.constant.UserConstant;
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
import cn.bunny.dao.pojo.result.PageResult;
|
||||||
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
import cn.bunny.dao.pojo.result.ResultCodeEnum;
|
||||||
|
import cn.bunny.dao.vo.configuration.CategoryVo;
|
||||||
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
import cn.bunny.dao.vo.financial.CategoryUserVo;
|
||||||
import cn.bunny.services.mapper.financial.CategoryUserMapper;
|
import cn.bunny.services.mapper.financial.CategoryMapper;
|
||||||
import cn.bunny.services.service.financial.CategoryUserService;
|
import cn.bunny.services.service.financial.CategoryService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
@ -28,10 +32,10 @@ import java.util.List;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Bunny
|
* @author Bunny
|
||||||
* @since 2024-11-08 10:00:09
|
* @since 2024-11-08 10:29:58
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class CategoryUserServiceImpl extends ServiceImpl<CategoryUserMapper, Category> implements CategoryUserService {
|
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 用户分类分页查询分类信息 服务实现类
|
* * 用户分类分页查询分类信息 服务实现类
|
||||||
|
@ -42,7 +46,7 @@ public class CategoryUserServiceImpl extends ServiceImpl<CategoryUserMapper, Cat
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PageResult<CategoryUserVo> getCategoryUserList(Page<Category> pageParams, CategoryUserDto dto) {
|
public PageResult<CategoryUserVo> getCategoryUserList(Page<Category> pageParams, CategoryUserDto dto) {
|
||||||
IPage<CategoryUserVo> page = baseMapper.selectListByPage(pageParams, dto, BaseContext.getUserId());
|
IPage<CategoryUserVo> page = baseMapper.selectUserListByPage(pageParams, dto, BaseContext.getUserId());
|
||||||
|
|
||||||
return PageResult.<CategoryUserVo>builder()
|
return PageResult.<CategoryUserVo>builder()
|
||||||
.list(page.getRecords())
|
.list(page.getRecords())
|
||||||
|
@ -122,4 +126,62 @@ public class CategoryUserServiceImpl extends ServiceImpl<CategoryUserMapper, Cat
|
||||||
return categoryUserVo;
|
return categoryUserVo;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * 分类信息 服务实现类
|
||||||
|
*
|
||||||
|
* @param pageParams 分类信息分页查询page对象
|
||||||
|
* @param dto 分类信息分页查询对象
|
||||||
|
* @return 查询分页分类信息返回对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageResult<CategoryVo> getCategoryList(Page<Category> pageParams, CategoryDto dto) {
|
||||||
|
IPage<CategoryVo> page = baseMapper.selectListByPage(pageParams, dto);
|
||||||
|
|
||||||
|
return PageResult.<CategoryVo>builder()
|
||||||
|
.list(page.getRecords())
|
||||||
|
.pageNo(page.getCurrent())
|
||||||
|
.pageSize(page.getSize())
|
||||||
|
.total(page.getTotal())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加分类信息
|
||||||
|
*
|
||||||
|
* @param dto 分类信息添加
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addCategory(@Valid CategoryAddDto dto) {
|
||||||
|
// 保存数据
|
||||||
|
Category category = new Category();
|
||||||
|
BeanUtils.copyProperties(dto, category);
|
||||||
|
|
||||||
|
// 如果内置的id为空设置为当前用户的id
|
||||||
|
category.setUserId(category.getUserId() == null ? BaseContext.getUserId() : dto.getUserId());
|
||||||
|
save(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新分类信息
|
||||||
|
*
|
||||||
|
* @param dto 分类信息更新
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void updateCategory(@Valid CategoryUpdateDto dto) {
|
||||||
|
// 更新内容
|
||||||
|
Category category = new Category();
|
||||||
|
BeanUtils.copyProperties(dto, category);
|
||||||
|
updateById(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除|批量删除分类信息
|
||||||
|
*
|
||||||
|
* @param ids 删除id列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteCategory(List<Long> ids) {
|
||||||
|
baseMapper.deleteBatchIdsWithPhysics(ids);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,85 +0,0 @@
|
||||||
package cn.bunny.services.service.financial.impl;
|
|
||||||
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementAddDto;
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementDto;
|
|
||||||
import cn.bunny.dao.dto.financial.debtCollectionManagement.DebtCollectionManagementUpdateDto;
|
|
||||||
import cn.bunny.dao.entity.financial.DebtCollectionManagement;
|
|
||||||
import cn.bunny.dao.pojo.result.PageResult;
|
|
||||||
import cn.bunny.dao.vo.financial.DebtCollectionManagementVo;
|
|
||||||
import cn.bunny.services.mapper.financial.DebtCollectionManagementMapper;
|
|
||||||
import cn.bunny.services.service.financial.DebtCollectionManagementService;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 债务回收管理表 服务实现类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Bunny
|
|
||||||
* @since 2024-11-11 16:13:55
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class DebtCollectionManagementServiceImpl extends ServiceImpl<DebtCollectionManagementMapper, DebtCollectionManagement> implements DebtCollectionManagementService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * 债务回收管理表 服务实现类
|
|
||||||
*
|
|
||||||
* @param pageParams 债务回收管理表分页查询page对象
|
|
||||||
* @param dto 债务回收管理表分页查询对象
|
|
||||||
* @return 查询分页债务回收管理表返回对象
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<DebtCollectionManagementVo> getDebtCollectionManagementList(Page<DebtCollectionManagement> pageParams, DebtCollectionManagementDto dto) {
|
|
||||||
IPage<DebtCollectionManagementVo> page = baseMapper.selectListByPage(pageParams, dto);
|
|
||||||
|
|
||||||
return PageResult.<DebtCollectionManagementVo>builder()
|
|
||||||
.list(page.getRecords())
|
|
||||||
.pageNo(page.getCurrent())
|
|
||||||
.pageSize(page.getSize())
|
|
||||||
.total(page.getTotal())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加债务回收管理表
|
|
||||||
*
|
|
||||||
* @param dto 债务回收管理表添加
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addDebtCollectionManagement(@Valid DebtCollectionManagementAddDto dto) {
|
|
||||||
// 保存数据
|
|
||||||
DebtCollectionManagement debtCollectionManagement = new DebtCollectionManagement();
|
|
||||||
BeanUtils.copyProperties(dto, debtCollectionManagement);
|
|
||||||
save(debtCollectionManagement);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新债务回收管理表
|
|
||||||
*
|
|
||||||
* @param dto 债务回收管理表更新
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void updateDebtCollectionManagement(@Valid DebtCollectionManagementUpdateDto dto) {
|
|
||||||
// 更新内容
|
|
||||||
DebtCollectionManagement debtCollectionManagement = new DebtCollectionManagement();
|
|
||||||
BeanUtils.copyProperties(dto, debtCollectionManagement);
|
|
||||||
updateById(debtCollectionManagement);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除|批量删除债务回收管理表
|
|
||||||
*
|
|
||||||
* @param ids 删除id列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void deleteDebtCollectionManagement(List<Long> ids) {
|
|
||||||
baseMapper.deleteBatchIdsWithPhysics(ids);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
server:
|
server:
|
||||||
port: 6060
|
port: 7070
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
@ -17,44 +17,44 @@ logging:
|
||||||
# map-underscore-to-camel-case: true
|
# map-underscore-to-camel-case: true
|
||||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
||||||
|
|
||||||
#bunny:
|
|
||||||
# master:
|
|
||||||
# host: 192.168.3.98
|
|
||||||
# port: 3304
|
|
||||||
# database: family_financial
|
|
||||||
# username: root
|
|
||||||
# password: "02120212"
|
|
||||||
#
|
|
||||||
# redis:
|
|
||||||
# host: 192.168.3.98
|
|
||||||
# port: 6379
|
|
||||||
# database: 6
|
|
||||||
# password: "123456"
|
|
||||||
#
|
|
||||||
# minio:
|
|
||||||
# endpointUrl: "http://192.168.3.98:9000"
|
|
||||||
# accessKey: bunny
|
|
||||||
# secretKey: "02120212"
|
|
||||||
# bucket-name: financial
|
|
||||||
bunny:
|
bunny:
|
||||||
master:
|
master:
|
||||||
host: rm-bp12z6hlv46vi6g8mro.mysql.rds.aliyuncs.com
|
host: 192.168.3.98
|
||||||
port: 3306
|
port: 3304
|
||||||
database: family_financial
|
database: family_financial
|
||||||
username: family_financial_prod
|
username: root
|
||||||
password: 0212family_financial
|
|
||||||
|
|
||||||
redis:
|
|
||||||
host: 47.120.65.66
|
|
||||||
port: 6379
|
|
||||||
database: 6
|
|
||||||
password: "02120212"
|
password: "02120212"
|
||||||
|
|
||||||
|
redis:
|
||||||
|
host: 192.168.3.98
|
||||||
|
port: 6379
|
||||||
|
database: 6
|
||||||
|
password: "123456"
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
endpointUrl: "http://116.196.101.14:9000"
|
endpointUrl: "http://192.168.3.98:9000"
|
||||||
accessKey: bunny
|
accessKey: bunny
|
||||||
secretKey: "02120212"
|
secretKey: "02120212"
|
||||||
bucket-name: financial
|
bucket-name: financial
|
||||||
|
#bunny:
|
||||||
|
# master:
|
||||||
|
# host: rm-bp12z6hlv46vi6g8mro.mysql.rds.aliyuncs.com
|
||||||
|
# port: 3306
|
||||||
|
# database: family_financial
|
||||||
|
# username: family_financial_prod
|
||||||
|
# password: 0212family_financial
|
||||||
|
#
|
||||||
|
# redis:
|
||||||
|
# host: 47.120.65.66
|
||||||
|
# port: 6379
|
||||||
|
# database: 6
|
||||||
|
# password: "02120212"
|
||||||
|
#
|
||||||
|
# minio:
|
||||||
|
# endpointUrl: "http://116.196.101.14:9000"
|
||||||
|
# accessKey: bunny
|
||||||
|
# secretKey: "02120212"
|
||||||
|
# bucket-name: financial
|
||||||
|
|
||||||
backPath: "D:\\MyData\\backup"
|
backPath: "D:\\MyData\\backup"
|
||||||
bashPath: "D:\\MyData"
|
bashPath: "D:\\MyData"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
server:
|
server:
|
||||||
port: 6060
|
port: 7070
|
||||||
|
|
||||||
#mybatis-plus:
|
#mybatis-plus:
|
||||||
# configuration:
|
# configuration:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="cn.bunny.services.mapper.configuration.CategoryMapper">
|
<mapper namespace="cn.bunny.services.mapper.financial.CategoryMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.financial.Category">
|
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.financial.Category">
|
||||||
|
@ -20,6 +20,37 @@
|
||||||
id, create_time, update_time, create_user, update_user, is_deleted, user_id, category_name, is_builtin
|
id, create_time, update_time, create_user, update_user, is_deleted, user_id, category_name, is_builtin
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询分类信息内容 -->
|
||||||
|
<select id="selectUserListByPage" resultType="cn.bunny.dao.vo.financial.CategoryUserVo">
|
||||||
|
select
|
||||||
|
base.*,
|
||||||
|
create_user.username as create_username,
|
||||||
|
update_user.username as update_username
|
||||||
|
from t_category base
|
||||||
|
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 and (base.user_id = #{userId} or base.is_builtin = 1)
|
||||||
|
<if test="dto.categoryName != null and dto.categoryName != ''">
|
||||||
|
and base.category_name like CONCAT('%',#{dto.categoryName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="dto.isBuiltin != null and dto.isBuiltin != ''">
|
||||||
|
and base.is_builtin = #{dto.isBuiltin}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by base.is_builtin desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 物理删除分类信息 -->
|
||||||
|
<delete id="deleteBatchIdsWithUserPhysics">
|
||||||
|
delete
|
||||||
|
from t_category
|
||||||
|
where id in
|
||||||
|
<foreach collection="ids" item="id" open="(" close=")" separator=",">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
<!-- 分页查询分类信息内容 -->
|
<!-- 分页查询分类信息内容 -->
|
||||||
<select id="selectListByPage" resultType="cn.bunny.dao.vo.configuration.CategoryVo">
|
<select id="selectListByPage" resultType="cn.bunny.dao.vo.configuration.CategoryVo">
|
||||||
select
|
select
|
|
@ -1,54 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="cn.bunny.services.mapper.financial.CategoryUserMapper">
|
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.financial.Category">
|
|
||||||
<id column="id" property="id"/>
|
|
||||||
<id column="create_time" property="createTime"/>
|
|
||||||
<id column="update_time" property="updateTime"/>
|
|
||||||
<id column="create_user" property="createUser"/>
|
|
||||||
<id column="update_user" property="updateUser"/>
|
|
||||||
<id column="is_deleted" property="isDeleted"/>
|
|
||||||
<id column="user_id" property="userId"/>
|
|
||||||
<id column="category_name" property="categoryName"/>
|
|
||||||
<id column="is_builtin" property="isBuiltin"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, create_time, update_time, create_user, update_user, is_deleted, user_id, category_name, is_builtin
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 分页查询分类信息内容 -->
|
|
||||||
<select id="selectListByPage" resultType="cn.bunny.dao.vo.financial.CategoryUserVo">
|
|
||||||
select
|
|
||||||
base.*,
|
|
||||||
create_user.username as create_username,
|
|
||||||
update_user.username as update_username
|
|
||||||
from t_category base
|
|
||||||
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 and (base.user_id = #{userId} or base.is_builtin = 1)
|
|
||||||
<if test="dto.categoryName != null and dto.categoryName != ''">
|
|
||||||
and base.category_name like CONCAT('%',#{dto.categoryName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="dto.isBuiltin != null and dto.isBuiltin != ''">
|
|
||||||
and base.is_builtin = #{dto.isBuiltin}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by base.is_builtin desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 物理删除分类信息 -->
|
|
||||||
<delete id="deleteBatchIdsWithPhysics">
|
|
||||||
delete
|
|
||||||
from t_category
|
|
||||||
where id in
|
|
||||||
<foreach collection="ids" item="id" open="(" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
|
@ -1,64 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="cn.bunny.services.mapper.financial.DebtCollectionManagementMapper">
|
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.financial.DebtCollectionManagement">
|
|
||||||
<id column="id" property="id"/>
|
|
||||||
<id column="create_time" property="createTime"/>
|
|
||||||
<id column="update_time" property="updateTime"/>
|
|
||||||
<id column="create_user" property="createUser"/>
|
|
||||||
<id column="update_user" property="updateUser"/>
|
|
||||||
<id column="is_deleted" property="isDeleted"/>
|
|
||||||
<id column="debt_id" property="debtId"/>
|
|
||||||
<id column="recovery_date" property="recoveryDate"/>
|
|
||||||
<id column="recovery_amount" property="recoveryAmount"/>
|
|
||||||
<id column="recovery_method" property="recoveryMethod"/>
|
|
||||||
<id column="notes" property="notes"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, create_time, update_time, create_user, update_user, is_deleted, debt_id, recovery_date, recovery_amount, recovery_method, notes
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 分页查询债务回收管理表内容 -->
|
|
||||||
<select id="selectListByPage" resultType="cn.bunny.dao.vo.financial.DebtCollectionManagementVo">
|
|
||||||
select
|
|
||||||
base.*,
|
|
||||||
create_user.username as create_username,
|
|
||||||
update_user.username as update_username
|
|
||||||
from t_debt_collection_management base
|
|
||||||
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.debtId != null and dto.debtId != ''">
|
|
||||||
and base.debt_id like CONCAT('%',#{dto.debtId},'%')
|
|
||||||
</if>
|
|
||||||
<if test="dto.recoveryDate != null and dto.recoveryDate != ''">
|
|
||||||
and base.recovery_date like CONCAT('%',#{dto.recoveryDate},'%')
|
|
||||||
</if>
|
|
||||||
<if test="dto.recoveryAmount != null and dto.recoveryAmount != ''">
|
|
||||||
and base.recovery_amount like CONCAT('%',#{dto.recoveryAmount},'%')
|
|
||||||
</if>
|
|
||||||
<if test="dto.recoveryMethod != null and dto.recoveryMethod != ''">
|
|
||||||
and base.recovery_method like CONCAT('%',#{dto.recoveryMethod},'%')
|
|
||||||
</if>
|
|
||||||
<if test="dto.notes != null and dto.notes != ''">
|
|
||||||
and base.notes like CONCAT('%',#{dto.notes},'%')
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 物理删除债务回收管理表 -->
|
|
||||||
<delete id="deleteBatchIdsWithPhysics">
|
|
||||||
delete
|
|
||||||
from t_debt_collection_management
|
|
||||||
where id in
|
|
||||||
<foreach collection="ids" item="id" open="(" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
Loading…
Reference in New Issue