feat: 移植工程
This commit is contained in:
6
home-service/Dockerfile
Normal file
6
home-service/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM docker-0.unsee.tech/openjdk:11-jdk-slim
|
||||
ARG JAR_FILE=target/*.jar
|
||||
COPY $JAR_FILE app.jar
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
RUN echo 'Asia/Shanghai' > /etc/timezone
|
||||
ENTRYPOINT ["java","-jar","/app.jar"]
|
||||
50
home-service/pom.xml
Normal file
50
home-service/pom.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.cxx</groupId>
|
||||
<artifactId>sweet-hut-service</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>home-service</artifactId>
|
||||
<version>2.0.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.cxx</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 微信 -->
|
||||
<dependency>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-java-mp</artifactId>
|
||||
<version>4.7.5.B</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.graalvm.buildtools</groupId>
|
||||
<artifactId>native-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cxx.home;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@SpringBootApplication
|
||||
@MapperScan(basePackages = {"com.cxx.common.mapper", "com.cxx.home.mapper", "com.cxx.home.dao"}, sqlSessionTemplateRef = "sqlSessionTemplate")
|
||||
@EnableScheduling
|
||||
public class HomeServiceApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(HomeServiceApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.home.dto.anniversary.AnniversaryDto;
|
||||
import com.cxx.home.service.AnniversaryService;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/anniversary")
|
||||
@Tag(name = "纪念日")
|
||||
public class AnniversaryController {
|
||||
@Resource
|
||||
private AnniversaryService anniversaryService;
|
||||
|
||||
@Operation(summary = "查询纪念日")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<AnniversaryDto> queryAnniversary(@RequestParam("category") String category) {
|
||||
return anniversaryService.queryAnniversary(category);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增纪念日")
|
||||
@PostMapping("")
|
||||
public Boolean addAnniversary(@RequestBody @JsonView(WriteView.class) @Validated AnniversaryDto anniversaryDto) {
|
||||
return anniversaryService.addAnniversary(anniversaryDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新纪念日")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateAnniversary(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) AnniversaryDto anniversaryDto) {
|
||||
return anniversaryService.updateAnniversary(id, anniversaryDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除纪念日")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteAnniversary(@PathVariable("id") long id) {
|
||||
return anniversaryService.deleteAnniversary(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询纪念日类别")
|
||||
@GetMapping("/category")
|
||||
public List<StatsChartDto> queryAnniversaryCategory() {
|
||||
return anniversaryService.queryAnniversaryCategory();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.asset.AssetDto;
|
||||
import com.cxx.home.service.AssetService;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/asset")
|
||||
@Tag(name = "资产")
|
||||
public class AssetController {
|
||||
@Resource
|
||||
private AssetService assetService;
|
||||
|
||||
@Operation(summary = "查询资产")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<AssetDto> queryAsset(@RequestParam("category") String category) {
|
||||
return assetService.queryAsset(category);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增资产")
|
||||
@PostMapping("")
|
||||
public Boolean addAsset(@RequestBody @JsonView(WriteView.class) @Validated AssetDto assetDto) {
|
||||
return assetService.addAsset(assetDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新资产")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateAsset(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) AssetDto assetDto) {
|
||||
return assetService.updateAsset(id, assetDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除资产")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteAsset(@PathVariable("id") long id) {
|
||||
return assetService.deleteAsset(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询资产类别")
|
||||
@GetMapping("/category")
|
||||
public List<String> queryAssetCategory() {
|
||||
return assetService.queryAssetCategory();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.common.dto.bill.BillCategoryDto;
|
||||
import com.cxx.common.dto.bill.BillItemDto;
|
||||
import com.cxx.common.dto.bill.BillRecordDto;
|
||||
import com.cxx.common.dto.bill.BillSummaryDto;
|
||||
import com.cxx.home.service.BillRecordService;
|
||||
import com.cxx.common.vo.bill.BillQueryVo;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bill")
|
||||
@Tag(name = "账单记录")
|
||||
public class BillController {
|
||||
@Resource
|
||||
private BillRecordService billRecordService;
|
||||
|
||||
@Operation(summary = "新增账单")
|
||||
@PostMapping("")
|
||||
public Boolean addBillRecord(@RequestBody @JsonView(WriteView.class) BillRecordDto billRecordDto) {
|
||||
return billRecordService.saveOrUpdateBillRecord(0L, billRecordDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新账单")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateBillRecord(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) BillRecordDto billRecordDto) {
|
||||
return billRecordService.saveOrUpdateBillRecord(id, billRecordDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除账单")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteBillRecord(@PathVariable("id") long id) {
|
||||
return billRecordService.deleteBillRecord(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账单记录")
|
||||
@GetMapping("/{id}")
|
||||
public @JsonView(ReadView.class) BillRecordDto queryBillRecord(@PathVariable("id") long id) {
|
||||
return billRecordService.queryBillRecord(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账单概要")
|
||||
@GetMapping("/summary")
|
||||
public @JsonView(ReadView.class) List<BillSummaryDto> queryBillSummary(BillQueryVo billQueryVo) {
|
||||
return billRecordService.queryBillSummary(billQueryVo);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账单统计")
|
||||
@GetMapping("/stats/{type}")
|
||||
public List<StatsChartDto> queryBillStats(@PathVariable("type") String type, BillQueryVo billQueryVo) {
|
||||
return billRecordService.queryBillStats(type, billQueryVo);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账户")
|
||||
@GetMapping("/pay")
|
||||
public @JsonView(ReadView.class) List<BillItemDto> queryBillPay() {
|
||||
return billRecordService.queryBillPay();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账本")
|
||||
@GetMapping("/book")
|
||||
public @JsonView(ReadView.class) List<BillItemDto> queryBillBook() {
|
||||
return billRecordService.queryBillBook();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账单类型")
|
||||
@GetMapping("/category")
|
||||
public List<BillCategoryDto> queryBillCategory() {
|
||||
return billRecordService.queryBillCategory();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.common.dto.budget.BudgetDto;
|
||||
import com.cxx.home.service.BudgetService;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/budget")
|
||||
@Tag(name = "预算统计")
|
||||
public class BudgetController {
|
||||
@Resource
|
||||
private BudgetService budgetService;
|
||||
|
||||
@Operation(summary = "查询预算类别")
|
||||
@GetMapping("/category")
|
||||
public List<String> queryBudgetCategory() {
|
||||
return budgetService.queryBudgetCategory();
|
||||
}
|
||||
|
||||
@Operation(summary = "新增预算")
|
||||
@PostMapping("")
|
||||
public Boolean addBudget(@RequestBody @JsonView(WriteView.class) @Validated BudgetDto budgetDto) {
|
||||
return budgetService.addBudget(budgetDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新预算")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateBudget(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) BudgetDto budgetDto) {
|
||||
return budgetService.updateBudget(id, budgetDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除预算")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteBudget(@PathVariable("id") long id) {
|
||||
return budgetService.deleteBudget(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询预算")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<BudgetDto> queryBudget(@RequestParam("category") String category) {
|
||||
return budgetService.queryBudget(category);
|
||||
}
|
||||
|
||||
@Operation(summary = "预算排行统计")
|
||||
@GetMapping("stats/rank")
|
||||
public List<StatsChartDto> queryBudgetRankStats(@RequestParam("category") String category) {
|
||||
return budgetService.queryBudgetRankStats(category);
|
||||
}
|
||||
|
||||
@Operation(summary = "预算项目统计")
|
||||
@GetMapping("stats/project")
|
||||
public List<StatsChartDto> queryBudgetProjectStats(@RequestParam("category") String category) {
|
||||
return budgetService.queryBudgetProjectStats(category);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.food.FoodRecipeDto;
|
||||
import com.cxx.home.dto.food.FoodRecordDto;
|
||||
import com.cxx.home.dto.food.FoodStatsDto;
|
||||
import com.cxx.home.dto.food.FoodSummaryDto;
|
||||
import com.cxx.home.service.FoodService;
|
||||
import com.cxx.home.vo.FoodQueryVo;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/food")
|
||||
@Tag(name = "美食记录")
|
||||
public class FoodController {
|
||||
@Resource
|
||||
private FoodService foodService;
|
||||
|
||||
@Operation(summary = "新增美食菜谱")
|
||||
@PostMapping("/recipe")
|
||||
public Boolean addFoodRecipe(@RequestBody @JsonView(WriteView.class) @Validated FoodRecipeDto foodRecipeDto) {
|
||||
return foodService.addFoodRecipe(foodRecipeDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新美食菜谱")
|
||||
@PutMapping("/recipe/{id}")
|
||||
public Boolean updateFoodRecipe(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) FoodRecipeDto foodRecipeDto) {
|
||||
return foodService.updateFoodRecipe(id, foodRecipeDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除美食菜谱")
|
||||
@DeleteMapping("/recipe/{id}")
|
||||
public Boolean deleteFoodRecipe(@PathVariable("id") long id) {
|
||||
return foodService.deleteFoodRecipe(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询美食菜谱")
|
||||
@GetMapping("/recipe/page")
|
||||
public IPage<FoodSummaryDto> queryFoodSummary(@RequestParam("currentPage") Integer currentPage,
|
||||
@RequestParam("pageSize") Integer pageSize,
|
||||
FoodQueryVo foodQueryVo) {
|
||||
return foodService.queryFoodSummary(currentPage, pageSize, foodQueryVo);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询美食")
|
||||
@GetMapping("/recipe/{id}")
|
||||
public @JsonView(ReadView.class) FoodRecipeDto queryFoodRecipe(@PathVariable("id") long id) {
|
||||
return foodService.queryFoodRecipe(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询所有美食名称")
|
||||
@GetMapping("/recipe/name")
|
||||
public List<String> queryFoodName() {
|
||||
return foodService.queryFoodName();
|
||||
}
|
||||
|
||||
@Operation(summary = "新增美食成果")
|
||||
@PostMapping("/record")
|
||||
public Boolean addFoodRecord(@RequestBody @JsonView(WriteView.class) @Validated FoodRecordDto foodRecordDto) {
|
||||
return foodService.addFoodRecord(foodRecordDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新美食成果")
|
||||
@PutMapping("/record/{id}")
|
||||
public Boolean updateFoodRecord(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) FoodRecordDto foodRecordDto) {
|
||||
return foodService.updateFoodRecord(id, foodRecordDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除美食成果")
|
||||
@DeleteMapping("/record/{id}")
|
||||
public Boolean deleteFoodRecord(@PathVariable("id") long id) {
|
||||
return foodService.deleteFoodRecord(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询美食记录")
|
||||
@GetMapping("/record")
|
||||
public @JsonView(ReadView.class) List<FoodRecordDto> queryFoodRecord(@RequestParam("startDate") String startDate,
|
||||
@RequestParam("endDate") String endDate) {
|
||||
return foodService.queryFoodRecord(startDate, endDate);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询美食类别")
|
||||
@GetMapping("/category")
|
||||
public List<String> queryFoodCategory() {
|
||||
return foodService.queryFoodCategory();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询美食统计")
|
||||
@GetMapping("/stats")
|
||||
public FoodStatsDto queryFoodStats() {
|
||||
return foodService.queryFoodStats();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.journal.JournalDto;
|
||||
import com.cxx.home.service.JournalService;
|
||||
import com.cxx.home.vo.JournalQueryVo;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/journal")
|
||||
@Tag(name = "日记")
|
||||
public class JournalController {
|
||||
@Resource
|
||||
private JournalService journalService;
|
||||
|
||||
@Operation(summary = "查询日记")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<JournalDto> queryJournal(JournalQueryVo queryVo) {
|
||||
return journalService.queryJournal(queryVo);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增日记")
|
||||
@PostMapping("")
|
||||
public Boolean addAnniversary(@RequestBody @JsonView(WriteView.class) @Validated JournalDto journalDto) {
|
||||
return journalService.addJournal(journalDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新日记")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateAnniversary(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) JournalDto journalDto) {
|
||||
return journalService.updateJournal(id, journalDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除日记")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteAnniversary(@PathVariable("id") long id) {
|
||||
return journalService.deleteJournal(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.kpi.KpiDto;
|
||||
import com.cxx.home.service.KpiService;
|
||||
import com.cxx.home.vo.KpiQueryVo;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/kpi")
|
||||
@Tag(name = "绩效")
|
||||
public class KpiController {
|
||||
@Resource
|
||||
private KpiService kpiService;
|
||||
|
||||
@Operation(summary = "查询绩效")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<KpiDto> queryKpi(KpiQueryVo queryVo) {
|
||||
return kpiService.queryKpi(queryVo);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增绩效")
|
||||
@PostMapping("")
|
||||
public Boolean addKpi(@RequestBody @JsonView(WriteView.class) @Validated KpiDto kpiDto) {
|
||||
return kpiService.addKpi(kpiDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新绩效")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateKpi(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) KpiDto kpiDto) {
|
||||
return kpiService.updateKpi(id, kpiDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除绩效")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteKpi(@PathVariable("id") long id) {
|
||||
return kpiService.deleteKpi(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.ledger.LedgerDto;
|
||||
import com.cxx.home.service.LedgerService;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/ledger")
|
||||
@Tag(name = "账本")
|
||||
public class LedgerController {
|
||||
@Resource
|
||||
private LedgerService ledgerService;
|
||||
|
||||
@Operation(summary = "查询账本内容")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<LedgerDto> queryLedger(@RequestParam("book") String book) {
|
||||
return ledgerService.queryLedger(book);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增账本内容")
|
||||
@PostMapping("")
|
||||
public Boolean addLedger(@RequestBody @JsonView(WriteView.class) @Validated LedgerDto ledgerDto) {
|
||||
return ledgerService.addLedger(ledgerDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新账本内容")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateLedger(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) LedgerDto ledgerDto) {
|
||||
return ledgerService.updateLedger(id, ledgerDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除账本内容")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteLedger(@PathVariable("id") long id) {
|
||||
return ledgerService.deleteLedger(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询账本")
|
||||
@GetMapping("/book")
|
||||
public List<String> queryLedgerBook() {
|
||||
return ledgerService.queryLedgerBook();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.period.PeriodDayDto;
|
||||
import com.cxx.home.dto.period.PeriodSettingDto;
|
||||
import com.cxx.home.service.PeriodService;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/period")
|
||||
@Tag(name = "月经记录")
|
||||
public class PeriodController {
|
||||
@Resource
|
||||
private PeriodService periodService;
|
||||
|
||||
@Operation(summary = "查询月经天")
|
||||
@GetMapping("/day")
|
||||
public @JsonView(ReadView.class) List<PeriodDayDto> queryPeriodDay(@RequestParam("month") String month) {
|
||||
return periodService.queryPeriodDay(month);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新月经天")
|
||||
@PutMapping("/day/{id}")
|
||||
public Boolean updatePeriodDay(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) PeriodDayDto periodDayDto) {
|
||||
return periodService.updatePeriodDay(id, periodDayDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取当月月经初始天")
|
||||
@GetMapping("/menstruate")
|
||||
public String getMenstruateFirstDate(@RequestParam("month") String month) {
|
||||
return periodService.getMenstruateFirstDate(month);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询月经设置")
|
||||
@GetMapping("/setting")
|
||||
public @JsonView(ReadView.class) PeriodSettingDto queryPeriodSetting() {
|
||||
return periodService.queryPeriodSetting();
|
||||
}
|
||||
|
||||
@Operation(summary = "更新月经设置")
|
||||
@PutMapping("/setting/{id}")
|
||||
public Boolean updatePeriodSetting(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) PeriodSettingDto periodSettingDto) {
|
||||
return periodService.updatePeriodSetting(id, periodSettingDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.common.dto.plan.PlanDto;
|
||||
import com.cxx.common.dto.plan.PlanStatsDto;
|
||||
import com.cxx.common.vo.plan.PlanQueryVo;
|
||||
import com.cxx.home.service.PlanService;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/plan")
|
||||
@Tag(name = "日程安排")
|
||||
public class PlanController {
|
||||
@Resource
|
||||
private PlanService planService;
|
||||
|
||||
@Operation(summary = "查询日程安排")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<PlanDto> queryPlan(PlanQueryVo query) {
|
||||
return planService.queryPlan(query);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增日程安排")
|
||||
@PostMapping("")
|
||||
public Boolean addPlan(@RequestBody @JsonView(WriteView.class) @Validated PlanDto planDto) {
|
||||
return planService.addPlan(planDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新日程安排")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updatePlan(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) PlanDto planDto) {
|
||||
return planService.updatePlan(id, planDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除日程安排")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deletePlan(@PathVariable("id") long id) {
|
||||
return planService.deletePlan(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新日程状态")
|
||||
@PutMapping("/{id}/status")
|
||||
public Boolean setPlanStatus(@PathVariable("id") long id, @RequestParam("status") boolean status) {
|
||||
return planService.setPlanStatus(id, status);
|
||||
}
|
||||
|
||||
@Operation(summary = "查看日程统计")
|
||||
@GetMapping("/stats")
|
||||
public PlanStatsDto queryPlanStats() {
|
||||
return planService.queryPlanStats();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.product.ProductDto;
|
||||
import com.cxx.home.service.ProductService;
|
||||
import com.cxx.home.vo.ProductQueryVo;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/product")
|
||||
@Tag(name = "商品清单")
|
||||
public class ProductController {
|
||||
@Resource
|
||||
private ProductService productService;
|
||||
|
||||
@Operation(summary = "新增商品清单")
|
||||
@PostMapping("")
|
||||
public Boolean addProduct(@RequestBody @JsonView(WriteView.class) @Validated ProductDto productDto) {
|
||||
return productService.addProduct(productDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新商品清单")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateProduct(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) @Validated ProductDto productDto) {
|
||||
return productService.updateProduct(id, productDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除商品清单")
|
||||
@DeleteMapping("/{id}")
|
||||
public Boolean deleteProduct(@PathVariable("id") long id) {
|
||||
return productService.deleteProduct(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询所有商品清单")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<ProductDto> queryProductList(ProductQueryVo queryVo) {
|
||||
return productService.queryProductList(queryVo);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询商品清单")
|
||||
@GetMapping("/{id}")
|
||||
public @JsonView(ReadView.class) ProductDto queryProduct(@PathVariable("id") long id) {
|
||||
return productService.queryProduct(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询商品类别")
|
||||
@GetMapping("/category")
|
||||
public List<String> queryProductCategory() {
|
||||
return productService.queryProductCategory();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
|
||||
import com.cxx.home.schedule.QuartzDto;
|
||||
import com.cxx.home.service.QuartzService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/quartz")
|
||||
@Tag(name = "定时任务")
|
||||
public class QuartzController {
|
||||
@Resource
|
||||
private QuartzService quartzService;
|
||||
|
||||
@Operation(summary = "查询所有任务")
|
||||
@GetMapping("")
|
||||
public List<QuartzDto> queryQuartz() {
|
||||
return quartzService.queryQuartzTask();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.cxx.home.service.SessionService;
|
||||
import com.cxx.common.dto.user.SessionDto;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/session")
|
||||
@Tag(name = "会话管理")
|
||||
public class SessionController {
|
||||
@Resource
|
||||
private SessionService sessionService;
|
||||
|
||||
@Operation(summary = "创建会话")
|
||||
@PostMapping("")
|
||||
@SaIgnore
|
||||
public SessionDto createSession(@RequestParam("name") String name,
|
||||
@RequestParam("password") String password) {
|
||||
return sessionService.create(name, password);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.cxx.common.WriteView;
|
||||
import com.cxx.home.dto.travel.TravelRecordDto;
|
||||
import com.cxx.home.dto.travel.TravelSpotDto;
|
||||
import com.cxx.home.dto.travel.TravelStatsDto;
|
||||
import com.cxx.home.dto.travel.TravelSummaryDto;
|
||||
import com.cxx.home.service.TravelService;
|
||||
import com.cxx.home.vo.TravelQueryVo;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/travel")
|
||||
@Tag(name = "旅行记录")
|
||||
public class TravelController {
|
||||
@Resource
|
||||
private TravelService travelService;
|
||||
|
||||
@Operation(summary = "新增旅行景点")
|
||||
@PostMapping("/spot")
|
||||
public Boolean addTravelSpot(@RequestBody @JsonView(WriteView.class) @Validated TravelSpotDto travelSpotDto) {
|
||||
return travelService.addTravelSpot(travelSpotDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新旅行景点")
|
||||
@PutMapping("/spot/{id}")
|
||||
public Boolean updateTravelSpot(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) TravelSpotDto travelSpotDto) {
|
||||
return travelService.updateTravelSpot(id, travelSpotDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除旅行景点")
|
||||
@DeleteMapping("/spot/{id}")
|
||||
public Boolean deleteTravelSpot(@PathVariable("id") long id) {
|
||||
return travelService.deleteTravelRecord(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询旅行景点")
|
||||
@GetMapping("/spot/page")
|
||||
public IPage<TravelSummaryDto> queryTravelSummary(@RequestParam("currentPage") Integer currentPage,
|
||||
@RequestParam("pageSize") Integer pageSize,
|
||||
TravelQueryVo travelQueryVo) {
|
||||
return travelService.queryTravelSummary(currentPage, pageSize, travelQueryVo);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询旅行景点")
|
||||
@GetMapping("/spot/{id}")
|
||||
public @JsonView(ReadView.class) TravelSpotDto queryTravelSpot(@PathVariable("id") long id) {
|
||||
return travelService.queryTravelSpot(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询所有旅行景点")
|
||||
@GetMapping("/spot/name")
|
||||
public List<String> queryFoodName() {
|
||||
return travelService.queryTravelSpotName();
|
||||
}
|
||||
|
||||
@Operation(summary = "新增旅行记录")
|
||||
@PostMapping("/record")
|
||||
public Boolean addTravelRecord(@RequestBody @JsonView(WriteView.class) @Validated TravelRecordDto travelRecordDto) {
|
||||
return travelService.addTravelRecord(travelRecordDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新旅行记录")
|
||||
@PutMapping("/record/{id}")
|
||||
public Boolean updateTravelRecord(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) TravelRecordDto travelRecordDto) {
|
||||
return travelService.updateTravelRecord(id, travelRecordDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除旅行记录")
|
||||
@DeleteMapping("/record/{id}")
|
||||
public Boolean deleteTravelRecord(@PathVariable("id") long id) {
|
||||
return travelService.deleteTravelRecord(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询旅行记录")
|
||||
@GetMapping("/record")
|
||||
public @JsonView(ReadView.class) List<TravelRecordDto> queryTravelRecord(@RequestParam("startDate") String startDate,
|
||||
@RequestParam("endDate") String endDate) {
|
||||
return travelService.queryTravelRecord(startDate, endDate);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询旅行类别")
|
||||
@GetMapping("/category")
|
||||
public List<String> queryTravelCategory() {
|
||||
return travelService.queryTravelCategory();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询旅行统计")
|
||||
@GetMapping("/stats")
|
||||
public TravelStatsDto queryTravelStats() {
|
||||
return travelService.queryTravelStats();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.home.dto.anniversary.AnniversaryDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AnniversaryDao {
|
||||
List<AnniversaryDto> queryAnniversary(@Param("category") String category);
|
||||
|
||||
List<StatsChartDto> queryAnniversaryCategory();
|
||||
}
|
||||
14
home-service/src/main/java/com/cxx/home/dao/AssetDao.java
Normal file
14
home-service/src/main/java/com/cxx/home/dao/AssetDao.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.home.dto.asset.AssetDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AssetDao {
|
||||
List<AssetDto> queryAsset(@Param("category") String category);
|
||||
|
||||
List<String> queryAssetCategory();
|
||||
}
|
||||
27
home-service/src/main/java/com/cxx/home/dao/BillDao.java
Normal file
27
home-service/src/main/java/com/cxx/home/dao/BillDao.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.common.dto.bill.*;
|
||||
import com.cxx.common.vo.bill.BillQueryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BillDao {
|
||||
BillRecordDto queryBillRecord(@Param("id") Long id);
|
||||
|
||||
List<BillSummaryDto> queryBillSummary(@Param("query") BillQueryVo query);
|
||||
|
||||
void insertBillImage(@Param("billId") Long billId,
|
||||
@Param("list") List<String> imageFiles);
|
||||
|
||||
List<StatsChartDto> queryBillStats(@Param("type") String type, @Param("query") BillQueryVo query);
|
||||
|
||||
List<BillItemDto> queryBillPay();
|
||||
|
||||
List<BillItemDto> queryBillBook();
|
||||
|
||||
List<BillCategoryDto> queryBillCategory();
|
||||
}
|
||||
17
home-service/src/main/java/com/cxx/home/dao/BudgetDao.java
Normal file
17
home-service/src/main/java/com/cxx/home/dao/BudgetDao.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.common.dto.budget.BudgetDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BudgetDao {
|
||||
List<BudgetDto> queryBudget(@Param("category") String category);
|
||||
|
||||
List<StatsChartDto> queryBudgetRankStats(@Param("category") String category);
|
||||
|
||||
List<StatsChartDto> queryBudgetProjectStats(@Param("category") String category);
|
||||
}
|
||||
33
home-service/src/main/java/com/cxx/home/dao/FoodDao.java
Normal file
33
home-service/src/main/java/com/cxx/home/dao/FoodDao.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cxx.home.dto.food.*;
|
||||
import com.cxx.home.vo.FoodQueryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface FoodDao {
|
||||
FoodRecipeDto queryFoodRecipe(@Param("id") Long id);
|
||||
|
||||
IPage<FoodSummaryDto> queryFoodSummary(IPage<FoodSummaryDto> page,
|
||||
@Param("query") FoodQueryVo foodQueryVo);
|
||||
|
||||
List<FoodRecordDto> queryFoodRecordById(@Param("id") Long id);
|
||||
|
||||
List<FoodRecordDto> queryFoodRecord(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate);
|
||||
|
||||
FoodStatsDto queryFoodStats();
|
||||
|
||||
List<String> queryFoodCategory();
|
||||
|
||||
void insertFoodMaterial(@Param("foodId") Long foodId,
|
||||
@Param("list") List<FoodMaterialDto> list);
|
||||
|
||||
void insertFoodStep(@Param("foodId") Long foodId,
|
||||
@Param("list") List<FoodStepDto> list);
|
||||
|
||||
}
|
||||
13
home-service/src/main/java/com/cxx/home/dao/JournalDao.java
Normal file
13
home-service/src/main/java/com/cxx/home/dao/JournalDao.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.home.dto.journal.JournalDto;
|
||||
import com.cxx.home.vo.JournalQueryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JournalDao {
|
||||
List<JournalDto> queryJournal(@Param("query") JournalQueryVo queryVo);
|
||||
}
|
||||
13
home-service/src/main/java/com/cxx/home/dao/KpiDao.java
Normal file
13
home-service/src/main/java/com/cxx/home/dao/KpiDao.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.home.dto.kpi.KpiDto;
|
||||
import com.cxx.home.vo.KpiQueryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface KpiDao {
|
||||
List<KpiDto> queryKpi(@Param("query") KpiQueryVo queryVo);
|
||||
}
|
||||
14
home-service/src/main/java/com/cxx/home/dao/LedgerDao.java
Normal file
14
home-service/src/main/java/com/cxx/home/dao/LedgerDao.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.home.dto.ledger.LedgerDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface LedgerDao {
|
||||
List<LedgerDto> queryLedger(@Param("book") String book);
|
||||
|
||||
List<String> queryLedgerBook();
|
||||
}
|
||||
14
home-service/src/main/java/com/cxx/home/dao/PeriodDao.java
Normal file
14
home-service/src/main/java/com/cxx/home/dao/PeriodDao.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.home.dto.period.PeriodDayDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface PeriodDao {
|
||||
List<PeriodDayDto> queryPeriodDay(@Param("month") String month);
|
||||
|
||||
String getMenstruateFirstDate(@Param("month") String month);
|
||||
}
|
||||
16
home-service/src/main/java/com/cxx/home/dao/PlanDao.java
Normal file
16
home-service/src/main/java/com/cxx/home/dao/PlanDao.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.common.dto.plan.PlanDto;
|
||||
import com.cxx.common.dto.plan.PlanStatsDto;
|
||||
import com.cxx.common.vo.plan.PlanQueryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface PlanDao {
|
||||
List<PlanDto> queryPlan(@Param("query") PlanQueryVo query);
|
||||
|
||||
PlanStatsDto queryPlanStats();
|
||||
}
|
||||
17
home-service/src/main/java/com/cxx/home/dao/ProductDao.java
Normal file
17
home-service/src/main/java/com/cxx/home/dao/ProductDao.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.cxx.home.dto.product.ProductDto;
|
||||
import com.cxx.home.vo.ProductQueryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProductDao {
|
||||
ProductDto queryProduct(@Param("id") Long id);
|
||||
|
||||
List<ProductDto> queryProductList(@Param("query") ProductQueryVo queryVo);
|
||||
|
||||
List<String> queryProductCategory();
|
||||
}
|
||||
35
home-service/src/main/java/com/cxx/home/dao/TravelDao.java
Normal file
35
home-service/src/main/java/com/cxx/home/dao/TravelDao.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package com.cxx.home.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cxx.home.dto.travel.TravelRecordDto;
|
||||
import com.cxx.home.dto.travel.TravelSpotDto;
|
||||
import com.cxx.home.dto.travel.TravelStatsDto;
|
||||
import com.cxx.home.dto.travel.TravelSummaryDto;
|
||||
import com.cxx.home.vo.TravelQueryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TravelDao {
|
||||
TravelSpotDto queryTravelSpot(@Param("id") Long id);
|
||||
|
||||
IPage<TravelSummaryDto> queryTravelSummary(IPage<TravelSummaryDto> page,
|
||||
@Param("query") TravelQueryVo travelQueryVo);
|
||||
|
||||
List<TravelRecordDto> queryTravelRecordById(@Param("id") Long id);
|
||||
|
||||
List<TravelRecordDto> queryTravelRecord(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate);
|
||||
|
||||
TravelStatsDto queryTravelStats();
|
||||
|
||||
List<String> queryTravelCategory();
|
||||
|
||||
void insertTravelImage(@Param("recordId") Long recordId,
|
||||
@Param("list") List<String> imageFiles);
|
||||
|
||||
void insertTravelVideo(@Param("recordId") Long recordId,
|
||||
@Param("list") List<String> videoFiles);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cxx.home.dto.anniversary;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class AnniversaryDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date date;
|
||||
|
||||
@Schema(description = "是否重复")
|
||||
private Boolean recurring;
|
||||
|
||||
@Schema(description = "纪念日类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "纪念日类别")
|
||||
private String category;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cxx.home.dto.asset;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class AssetDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类别")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金额")
|
||||
private Double amount;
|
||||
|
||||
@Schema(description = "所属人")
|
||||
private String owner;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cxx.home.dto.food;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class FoodMaterialDto {
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "食材类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "食材名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "食材分量")
|
||||
private String amount;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cxx.home.dto.food;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class FoodRecipeDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "美食名称")
|
||||
@NotBlank(message = "名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "美食菜系")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "推荐指数")
|
||||
@Range(min = 0, max = 5, message = "推荐指数在0-5之间")
|
||||
private Integer recommendRate;
|
||||
|
||||
@Schema(description = "美食食材")
|
||||
private List<FoodMaterialDto> materialList;
|
||||
|
||||
@Schema(description = "美食步骤")
|
||||
private List<FoodStepDto> stepList;
|
||||
|
||||
@Schema(description = "美食成果")
|
||||
@JsonView(ReadView.class)
|
||||
private List<FoodRecordDto> recordList;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cxx.home.dto.food;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class FoodRecordDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类")
|
||||
@JsonView(ReadView.class)
|
||||
private String category;
|
||||
|
||||
@Schema(description = "完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date date;
|
||||
|
||||
@Schema(description = "完成人")
|
||||
private String person;
|
||||
|
||||
@Schema(description = "成果图片")
|
||||
private String imageUrl;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cxx.home.dto.food;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class FoodStatsDto {
|
||||
@Schema(description = "菜谱总数")
|
||||
private Integer recipeCount;
|
||||
|
||||
@Schema(description = "菜谱类别")
|
||||
private Integer categoryCount;
|
||||
|
||||
@Schema(description = "做菜次数")
|
||||
private Integer workCount;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cxx.home.dto.food;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class FoodStepDto {
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "顺序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "步骤内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "步骤图片")
|
||||
private String imageUrl;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cxx.home.dto.food;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class FoodSummaryDto {
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "美食名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "美食类型")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "推荐指数")
|
||||
private Integer recommendRate;
|
||||
|
||||
@Schema(description = "美食记录")
|
||||
private List<FoodRecordDto> recordList;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cxx.home.dto.journal;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class JournalDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date date;
|
||||
|
||||
@Schema(description = "地点")
|
||||
private String location;
|
||||
|
||||
@Schema(description = "类别")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "天气")
|
||||
private String weather;
|
||||
|
||||
@Schema(description = "心情")
|
||||
private String mood;
|
||||
|
||||
@Schema(description = "内容")
|
||||
@NotBlank(message = "内容不能为空")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "图片地址")
|
||||
private String imageUrl;
|
||||
|
||||
@Schema(description = "视频地址")
|
||||
private String videoUrl;
|
||||
}
|
||||
33
home-service/src/main/java/com/cxx/home/dto/kpi/KpiDto.java
Normal file
33
home-service/src/main/java/com/cxx/home/dto/kpi/KpiDto.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.cxx.home.dto.kpi;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class KpiDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date date;
|
||||
|
||||
@Schema(description = "患者姓名")
|
||||
private String patientName;
|
||||
|
||||
@Schema(description = "项目")
|
||||
private String project;
|
||||
|
||||
@Schema(description = "价格")
|
||||
private Integer price;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cxx.home.dto.ledger;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class LedgerDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "账本")
|
||||
private String book;
|
||||
|
||||
@Schema(description = "类别")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "价格")
|
||||
private Double price;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer number;
|
||||
|
||||
@Schema(description = "总价")
|
||||
@JsonView(ReadView.class)
|
||||
private Double totalPrice;
|
||||
|
||||
@Schema(description = "单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "付款人")
|
||||
private String payer;
|
||||
|
||||
@Schema(description = "供应商")
|
||||
private String provider;
|
||||
|
||||
@Schema(description = "图片")
|
||||
private String imagerUrl;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.cxx.home.dto.period;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class PeriodDayDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date date;
|
||||
|
||||
@Schema(description = "是否吃药")
|
||||
private Boolean isDrug;
|
||||
|
||||
@Schema(description = "是否来月经")
|
||||
private Boolean isMenstruate;
|
||||
|
||||
@Schema(description = "流量")
|
||||
private String flowLevel;
|
||||
|
||||
@Schema(description = "症状")
|
||||
private String crampLevel;
|
||||
|
||||
@Schema(description = "爱爱")
|
||||
private String sexActivity;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cxx.home.dto.period;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class PeriodSettingDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "月经周期")
|
||||
private Integer cycleLength;
|
||||
|
||||
@Schema(description = "持续天数")
|
||||
private Integer duration;
|
||||
|
||||
@Schema(description = "是否计算")
|
||||
private Boolean isCalculate;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.cxx.home.dto.product;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class ProductDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
@NotBlank(message = "商品名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "购买日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date purchaseDate;
|
||||
|
||||
@Schema(description = "过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date expiryDate;
|
||||
|
||||
@Schema(description = "总天数")
|
||||
@JsonView(ReadView.class)
|
||||
private Integer totalDay;
|
||||
|
||||
@Schema(description = "价格")
|
||||
@PositiveOrZero(message = "商品价格必须大于等于0")
|
||||
private Double price;
|
||||
|
||||
@Schema(description = "日均价格")
|
||||
@JsonView(ReadView.class)
|
||||
private Double averagePrice;
|
||||
|
||||
@Schema(description = "类别")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "购买人")
|
||||
private String purchaser;
|
||||
|
||||
@Schema(description = "购买渠道")
|
||||
private String channel;
|
||||
|
||||
@Schema(description = "图片路径")
|
||||
private String imageUrl;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cxx.home.dto.travel;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class TravelRecordDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
@JsonView(ReadView.class)
|
||||
private List<String> area;
|
||||
|
||||
@Schema(description = "完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date date;
|
||||
|
||||
@Schema(description = "完成人")
|
||||
private List<String> persons;
|
||||
|
||||
@Schema(description = "旅行图片")
|
||||
private List<String> imageList;
|
||||
|
||||
@Schema(description = "旅行视频")
|
||||
private List<String> videoList;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.cxx.home.dto.travel;
|
||||
|
||||
import com.cxx.common.PlainView;
|
||||
import com.cxx.common.ReadView;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonView(PlainView.class)
|
||||
public class TravelSpotDto {
|
||||
@Schema(description = "id")
|
||||
@JsonView(ReadView.class)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "景点名称")
|
||||
@NotBlank(message = "名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "景点地区")
|
||||
private List<String> area;
|
||||
|
||||
@Schema(description = "景点地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "门票价格")
|
||||
private Double price;
|
||||
|
||||
@Schema(description = "推荐指数")
|
||||
@Range(min = 0, max = 5, message = "推荐指数在0-5之间")
|
||||
private Integer recommendRate;
|
||||
|
||||
@Schema(description = "交通")
|
||||
private String traffic;
|
||||
|
||||
@Schema(description = "旅游路线")
|
||||
private String router;
|
||||
|
||||
@Schema(description = "美食推荐")
|
||||
private List<String> foods;
|
||||
|
||||
@Schema(description = "项目推荐")
|
||||
private List<String> projects;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "旅游记录")
|
||||
@JsonView(ReadView.class)
|
||||
private List<TravelRecordDto> recordList;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cxx.home.dto.travel;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class TravelStatsDto {
|
||||
@Schema(description = "景点总数")
|
||||
private Integer spotCount;
|
||||
|
||||
@Schema(description = "城市总数")
|
||||
private Integer cityCount;
|
||||
|
||||
@Schema(description = "记录次数")
|
||||
private Integer recordCount;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cxx.home.dto.travel;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class TravelSummaryDto {
|
||||
@Schema(description = "id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "景点名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "景点地区")
|
||||
private List<String> area;
|
||||
|
||||
@Schema(description = "推荐指数")
|
||||
private Integer recommendRate;
|
||||
|
||||
@Schema(description = "美食成果")
|
||||
private List<TravelRecordDto> recordList;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("anniversary")
|
||||
public class Anniversary extends AbstractEntity {
|
||||
@TableField(value = "title")
|
||||
private String title;
|
||||
|
||||
@TableField("date")
|
||||
private Date date;
|
||||
|
||||
@TableField("recurring")
|
||||
private Integer recurring;
|
||||
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
@TableField("category")
|
||||
private String category;
|
||||
}
|
||||
29
home-service/src/main/java/com/cxx/home/entity/Asset.java
Normal file
29
home-service/src/main/java/com/cxx/home/entity/Asset.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("asset")
|
||||
public class Asset extends AbstractEntity {
|
||||
@TableField(value = "category")
|
||||
private String category;
|
||||
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@TableField("amount")
|
||||
private Double amount;
|
||||
|
||||
@TableField("owner")
|
||||
private String owner;
|
||||
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractIdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("food_material")
|
||||
public class FoodMaterial extends AbstractIdEntity {
|
||||
@TableField("food_id")
|
||||
private Long foodId;
|
||||
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@TableField("amount")
|
||||
private String amount;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("food_recipe")
|
||||
public class FoodRecipe extends AbstractEntity {
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@TableField("category")
|
||||
private String category;
|
||||
|
||||
@TableField("recommend_rate")
|
||||
private Integer recommendRate;
|
||||
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractIdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("food_record")
|
||||
public class FoodRecord extends AbstractIdEntity {
|
||||
@TableField("food_id")
|
||||
private Long foodId;
|
||||
|
||||
@TableField("date")
|
||||
private Date date;
|
||||
|
||||
@TableField("person")
|
||||
private String person;
|
||||
|
||||
@TableField("image_url")
|
||||
private String imageUrl;
|
||||
}
|
||||
24
home-service/src/main/java/com/cxx/home/entity/FoodStep.java
Normal file
24
home-service/src/main/java/com/cxx/home/entity/FoodStep.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractIdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("food_step")
|
||||
public class FoodStep extends AbstractIdEntity {
|
||||
@TableField("food_id")
|
||||
private Long foodId;
|
||||
|
||||
@TableField("sort")
|
||||
private Integer sort;
|
||||
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@TableField("image_url")
|
||||
private String imageUrl;
|
||||
}
|
||||
38
home-service/src/main/java/com/cxx/home/entity/Journal.java
Normal file
38
home-service/src/main/java/com/cxx/home/entity/Journal.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("journal")
|
||||
public class Journal extends AbstractEntity {
|
||||
@TableField("date")
|
||||
private Date date;
|
||||
|
||||
@TableField(value = "location")
|
||||
private String location;
|
||||
|
||||
@TableField(value = "category")
|
||||
private String category;
|
||||
|
||||
@TableField(value = "weather")
|
||||
private String weather;
|
||||
|
||||
@TableField("mood")
|
||||
private String mood;
|
||||
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@TableField("image_url")
|
||||
private String imageUrl;
|
||||
|
||||
@TableField("video_url")
|
||||
private String videoUrl;
|
||||
}
|
||||
26
home-service/src/main/java/com/cxx/home/entity/Kpi.java
Normal file
26
home-service/src/main/java/com/cxx/home/entity/Kpi.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("kpi")
|
||||
public class Kpi extends AbstractEntity {
|
||||
@TableField("date")
|
||||
private Date date;
|
||||
|
||||
@TableField("patient_name")
|
||||
private String patientName;
|
||||
|
||||
@TableField("project")
|
||||
private String project;
|
||||
|
||||
@TableField("price")
|
||||
private Integer price;
|
||||
}
|
||||
42
home-service/src/main/java/com/cxx/home/entity/Ledger.java
Normal file
42
home-service/src/main/java/com/cxx/home/entity/Ledger.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("ledger")
|
||||
public class Ledger extends AbstractEntity {
|
||||
@TableField(value = "book")
|
||||
private String book;
|
||||
|
||||
@TableField("category")
|
||||
private String category;
|
||||
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@TableField("price")
|
||||
private Double price;
|
||||
|
||||
@TableField("number")
|
||||
private Integer number;
|
||||
|
||||
@TableField("unit")
|
||||
private String unit;
|
||||
|
||||
@TableField("payer")
|
||||
private String payer;
|
||||
|
||||
@TableField("provider")
|
||||
private String provider;
|
||||
|
||||
@TableField("imager_url")
|
||||
private String imagerUrl;
|
||||
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("period_day")
|
||||
public class PeriodDay extends AbstractEntity {
|
||||
@TableField("date")
|
||||
private Date date;
|
||||
|
||||
@TableField("is_drug")
|
||||
private Integer isDrug;
|
||||
|
||||
@TableField("is_menstruate")
|
||||
private Integer isMenstruate;
|
||||
|
||||
@TableField("flow_level")
|
||||
private String flowLevel;
|
||||
|
||||
@TableField("cramp_level")
|
||||
private String crampLevel;
|
||||
|
||||
@TableField("sex_activity")
|
||||
private String sexActivity;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("period_setting")
|
||||
public class PeriodSetting extends AbstractEntity {
|
||||
@TableField("cycle_length")
|
||||
private Integer cycleLength;
|
||||
|
||||
@TableField("duration")
|
||||
private Integer duration;
|
||||
|
||||
@TableField("is_calculate")
|
||||
private Integer isCalculate;
|
||||
}
|
||||
40
home-service/src/main/java/com/cxx/home/entity/Product.java
Normal file
40
home-service/src/main/java/com/cxx/home/entity/Product.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("product")
|
||||
public class Product extends AbstractEntity {
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@TableField("purchase_date")
|
||||
private Date purchaseDate;
|
||||
|
||||
@TableField("expiry_date")
|
||||
private Date expiryDate;
|
||||
|
||||
@TableField("price")
|
||||
private Double price;
|
||||
|
||||
@TableField("category")
|
||||
private String category;
|
||||
|
||||
@TableField("purchaser")
|
||||
private String purchaser;
|
||||
|
||||
@TableField("channel")
|
||||
private String channel;
|
||||
|
||||
@TableField("image_url")
|
||||
private String imageUrl;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("travel_image")
|
||||
public class TravelImage {
|
||||
@TableField("record_id")
|
||||
private Long recordId;
|
||||
|
||||
@TableField("image_url")
|
||||
private String imageUrl;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.cxx.framework.data.AbstractIdEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("travel_record")
|
||||
public class TravelRecord extends AbstractIdEntity {
|
||||
@TableField("travel_id")
|
||||
private Long travelId;
|
||||
|
||||
@TableField("date")
|
||||
private Date date;
|
||||
|
||||
@TableField(value = "persons", typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> persons;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.cxx.framework.data.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("travel_spot")
|
||||
public class TravelSpot extends AbstractEntity {
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@TableField("city")
|
||||
private String city;
|
||||
|
||||
@TableField(value = "area", typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> area;
|
||||
|
||||
@TableField("address")
|
||||
private String address;
|
||||
|
||||
@TableField("price")
|
||||
private Double price;
|
||||
|
||||
@TableField("recommend_rate")
|
||||
private Integer recommendRate;
|
||||
|
||||
@TableField("traffic")
|
||||
private String traffic;
|
||||
|
||||
@TableField("router")
|
||||
private String router;
|
||||
|
||||
@TableField(value = "foods", typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> foods;
|
||||
|
||||
@TableField(value = "projects", typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> projects;
|
||||
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cxx.home.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("travel_video")
|
||||
public class TravelVideo {
|
||||
@TableField("record_id")
|
||||
private Long recordId;
|
||||
|
||||
@TableField("video_url")
|
||||
private String videoUrl;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.Anniversary;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface AnniversaryMapper extends BaseMapper<Anniversary> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.Asset;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface AssetMapper extends BaseMapper<Asset> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.FoodMaterial;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface FoodMaterialMapper extends BaseMapper<FoodMaterial> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.FoodRecipe;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface FoodRecipeMapper extends BaseMapper<FoodRecipe> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.FoodRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface FoodRecordMapper extends BaseMapper<FoodRecord> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.FoodStep;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface FoodStepMapper extends BaseMapper<FoodStep> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.Journal;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface JournalMapper extends BaseMapper<Journal> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.Kpi;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface KpiMapper extends BaseMapper<Kpi> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.Ledger;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface LedgerMapper extends BaseMapper<Ledger> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.PeriodDay;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface PeriodDayMapper extends BaseMapper<PeriodDay> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.PeriodSetting;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface PeriodSettingMapper extends BaseMapper<PeriodSetting> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.Product;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ProductMapper extends BaseMapper<Product> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.TravelImage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TravelImageMapper extends BaseMapper<TravelImage> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.TravelRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TravelRecordMapper extends BaseMapper<TravelRecord> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.TravelSpot;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TravelSpotMapper extends BaseMapper<TravelSpot> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.cxx.home.entity.TravelVideo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TravelVideoMapper extends BaseMapper<TravelVideo> {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cxx.home.schedule;
|
||||
|
||||
|
||||
import com.cxx.common.dto.task.TaskDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class QuartzDto extends TaskDto {
|
||||
@Schema(description = "任务名称/id")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "任务组别")
|
||||
private String group;
|
||||
|
||||
@Schema(description = "任务状态")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cxx.home.schedule;
|
||||
|
||||
import com.cxx.common.dto.message.MailMessageDto;
|
||||
import com.cxx.common.entity.Task;
|
||||
import com.cxx.framework.web.CustomException;
|
||||
import com.cxx.common.mapper.TaskMapper;
|
||||
import com.cxx.home.service.MessageService;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobDataMap;
|
||||
import org.quartz.JobExecutionContext;
|
||||
|
||||
@Slf4j
|
||||
public class QuartzJob implements Job {
|
||||
@Resource
|
||||
private TaskMapper taskMapper;
|
||||
|
||||
@Resource
|
||||
private MessageService messageService;
|
||||
|
||||
private final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext context) {
|
||||
JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
|
||||
Long taskId = jobDataMap.getLong("id");
|
||||
|
||||
Task task = taskMapper.selectById(taskId);
|
||||
try {
|
||||
JsonNode taskContent = objectMapper.readTree(task.getContent());
|
||||
|
||||
switch (task.getType()) {
|
||||
case TaskType.EMAIL:
|
||||
handleEmailTask(taskContent);
|
||||
break;
|
||||
case TaskType.SMS:
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new CustomException("执行任务错误:", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void handleEmailTask(JsonNode taskContent) {
|
||||
MailMessageDto mailMessageDto = new MailMessageDto();
|
||||
mailMessageDto.setTo(taskContent.get("to").asText());
|
||||
mailMessageDto.setSubject(taskContent.get("subject").asText());
|
||||
mailMessageDto.setBody(taskContent.get("body").asText());
|
||||
|
||||
messageService.sendMailMessage(mailMessageDto);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cxx.home.schedule;
|
||||
|
||||
import com.cxx.common.entity.Task;
|
||||
import com.cxx.framework.web.CustomException;
|
||||
import org.quartz.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class QuartzUtils {
|
||||
public static JobDetail getJobDetail(Task task, JobKey jobKey) {
|
||||
JobDataMap jobDataMap = new JobDataMap();
|
||||
jobDataMap.put("id", task.getId());
|
||||
jobDataMap.put("type", task.getType());
|
||||
jobDataMap.put("content", task.getContent());
|
||||
|
||||
return JobBuilder.newJob(QuartzJob.class)
|
||||
.withIdentity(jobKey) // 使用 id 作为唯一标识
|
||||
.usingJobData(jobDataMap)
|
||||
.build();
|
||||
}
|
||||
|
||||
public static Trigger getTrigger(Task task, JobKey jobKey) {
|
||||
Trigger trigger;
|
||||
// 判断任务类型:Cron 任务或者一次性任务
|
||||
if (task.getCronExpression() != null && !task.getCronExpression().isEmpty()) {
|
||||
// 定时任务:使用 Cron 表达式
|
||||
trigger = TriggerBuilder.newTrigger()
|
||||
.withIdentity(jobKey.getName() + "Trigger")
|
||||
.withSchedule(CronScheduleBuilder.cronSchedule(task.getCronExpression()))
|
||||
.forJob(jobKey)
|
||||
.build();
|
||||
} else if (task.getExecuteTime() != null) {
|
||||
// 一次性任务:使用 executeTime
|
||||
trigger = TriggerBuilder.newTrigger()
|
||||
.withIdentity(jobKey.getName() + "Trigger")
|
||||
.startAt(task.getExecuteTime())
|
||||
.forJob(jobKey)
|
||||
.build();
|
||||
} else {
|
||||
// 如果没有 Cron 表达式和 executeTime,任务不能调度,抛出异常
|
||||
throw new CustomException("任务没有有效的 Cron 表达式或执行时间");
|
||||
}
|
||||
|
||||
return trigger;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.cxx.home.schedule;
|
||||
|
||||
public interface TaskType {
|
||||
String EMAIL = "EMAIL";
|
||||
String SMS = "SMS";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.home.dto.anniversary.AnniversaryDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AnniversaryService {
|
||||
Boolean addAnniversary(AnniversaryDto anniversaryDto);
|
||||
|
||||
Boolean updateAnniversary(Long id, AnniversaryDto anniversaryDto);
|
||||
|
||||
Boolean deleteAnniversary(Long id);
|
||||
|
||||
List<AnniversaryDto> queryAnniversary(String category);
|
||||
|
||||
List<StatsChartDto> queryAnniversaryCategory();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.home.dto.asset.AssetDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AssetService {
|
||||
Boolean addAsset(AssetDto assetDto);
|
||||
|
||||
Boolean updateAsset(Long id, AssetDto assetDto);
|
||||
|
||||
Boolean deleteAsset(Long id);
|
||||
|
||||
List<AssetDto> queryAsset(String category);
|
||||
|
||||
List<String> queryAssetCategory();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.common.dto.bill.BillCategoryDto;
|
||||
import com.cxx.common.dto.bill.BillItemDto;
|
||||
import com.cxx.common.dto.bill.BillRecordDto;
|
||||
import com.cxx.common.dto.bill.BillSummaryDto;
|
||||
import com.cxx.common.vo.bill.BillQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BillRecordService {
|
||||
Boolean saveOrUpdateBillRecord(Long id, BillRecordDto billRecordDto);
|
||||
|
||||
Boolean deleteBillRecord(Long id);
|
||||
|
||||
BillRecordDto queryBillRecord(Long id);
|
||||
|
||||
List<BillSummaryDto> queryBillSummary(BillQueryVo billQueryVo);
|
||||
|
||||
List<StatsChartDto> queryBillStats(String type, BillQueryVo billQueryVo);
|
||||
|
||||
List<BillItemDto> queryBillPay();
|
||||
|
||||
List<BillItemDto> queryBillBook();
|
||||
|
||||
List<BillCategoryDto> queryBillCategory();
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.common.dto.budget.BudgetDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BudgetService {
|
||||
List<String> queryBudgetCategory();
|
||||
|
||||
Boolean addBudget(BudgetDto budgetDto);
|
||||
|
||||
Boolean updateBudget(Long id, BudgetDto budgetDto);
|
||||
|
||||
Boolean deleteBudget(Long id);
|
||||
|
||||
List<BudgetDto> queryBudget(String category);
|
||||
|
||||
List<StatsChartDto> queryBudgetRankStats(String category);
|
||||
|
||||
List<StatsChartDto> queryBudgetProjectStats(String category);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cxx.home.dto.food.FoodRecipeDto;
|
||||
import com.cxx.home.dto.food.FoodRecordDto;
|
||||
import com.cxx.home.dto.food.FoodStatsDto;
|
||||
import com.cxx.home.dto.food.FoodSummaryDto;
|
||||
import com.cxx.home.vo.FoodQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface FoodService {
|
||||
Boolean addFoodRecipe(FoodRecipeDto foodRecipeDto);
|
||||
|
||||
Boolean updateFoodRecipe(Long id, FoodRecipeDto foodRecipeDto);
|
||||
|
||||
Boolean deleteFoodRecipe(Long id);
|
||||
|
||||
Boolean addFoodRecord(FoodRecordDto foodRecordDto);
|
||||
|
||||
Boolean updateFoodRecord(Long id, FoodRecordDto foodRecordDto);
|
||||
|
||||
Boolean deleteFoodRecord(Long id);
|
||||
|
||||
FoodRecipeDto queryFoodRecipe(Long id);
|
||||
|
||||
IPage<FoodSummaryDto> queryFoodSummary(Integer currentPage, Integer pageSize, FoodQueryVo foodQueryVo);
|
||||
|
||||
List<FoodRecordDto> queryFoodRecord(String startDate, String endDate);
|
||||
|
||||
List<String> queryFoodName();
|
||||
|
||||
List<String> queryFoodCategory();
|
||||
|
||||
FoodStatsDto queryFoodStats();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.home.dto.journal.JournalDto;
|
||||
import com.cxx.home.vo.JournalQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface JournalService {
|
||||
Boolean addJournal(JournalDto journalDto);
|
||||
|
||||
Boolean updateJournal(Long id, JournalDto journalDto);
|
||||
|
||||
Boolean deleteJournal(Long id);
|
||||
|
||||
List<JournalDto> queryJournal(JournalQueryVo queryVo);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.home.dto.kpi.KpiDto;
|
||||
import com.cxx.home.vo.KpiQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface KpiService {
|
||||
Boolean addKpi(KpiDto kpiDto);
|
||||
|
||||
Boolean updateKpi(Long id, KpiDto kpiDto);
|
||||
|
||||
Boolean deleteKpi(Long id);
|
||||
|
||||
List<KpiDto> queryKpi(KpiQueryVo queryVo);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.home.dto.ledger.LedgerDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LedgerService {
|
||||
Boolean addLedger(LedgerDto ledgerDto);
|
||||
|
||||
Boolean updateLedger(Long id, LedgerDto ledgerDto);
|
||||
|
||||
Boolean deleteLedger(Long id);
|
||||
|
||||
List<LedgerDto> queryLedger(String book);
|
||||
|
||||
List<String> queryLedgerBook();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.common.dto.message.MailMessageDto;
|
||||
|
||||
public interface MessageService {
|
||||
void sendMailMessage(MailMessageDto mailMessageDto);
|
||||
|
||||
void sendWxMessage();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.home.dto.period.PeriodDayDto;
|
||||
import com.cxx.home.dto.period.PeriodSettingDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PeriodService {
|
||||
Boolean updatePeriodDay(Long id, PeriodDayDto periodDayDto);
|
||||
|
||||
List<PeriodDayDto> queryPeriodDay(String month);
|
||||
|
||||
String getMenstruateFirstDate(String month);
|
||||
|
||||
Boolean updatePeriodSetting(Long id, PeriodSettingDto periodSettingDto);
|
||||
|
||||
PeriodSettingDto queryPeriodSetting();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.common.dto.plan.PlanDto;
|
||||
import com.cxx.common.dto.plan.PlanStatsDto;
|
||||
import com.cxx.common.vo.plan.PlanQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PlanService {
|
||||
Boolean addPlan(PlanDto planDto);
|
||||
|
||||
Boolean updatePlan(Long id, PlanDto planDto);
|
||||
|
||||
Boolean deletePlan(Long id);
|
||||
|
||||
List<PlanDto> queryPlan(PlanQueryVo query);
|
||||
|
||||
Boolean setPlanStatus(Long id, Boolean status);
|
||||
|
||||
PlanStatsDto queryPlanStats();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
|
||||
import com.cxx.home.dto.product.ProductDto;
|
||||
import com.cxx.home.vo.ProductQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProductService {
|
||||
Boolean addProduct(ProductDto productDto);
|
||||
|
||||
Boolean updateProduct(Long id, ProductDto productDto);
|
||||
|
||||
Boolean deleteProduct(Long id);
|
||||
|
||||
ProductDto queryProduct(Long id);
|
||||
|
||||
List<ProductDto> queryProductList(ProductQueryVo queryVo);
|
||||
|
||||
List<String> queryProductCategory();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.common.entity.Task;
|
||||
import com.cxx.home.schedule.QuartzDto;
|
||||
import org.quartz.JobKey;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface QuartzService {
|
||||
List<QuartzDto> queryQuartzTask();
|
||||
|
||||
void createQuartzTask(Task task);
|
||||
|
||||
void updateQuartzTask(Task task);
|
||||
|
||||
void deleteQuartzTask(JobKey jobKey);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.common.dto.user.SessionDto;
|
||||
|
||||
public interface SessionService {
|
||||
SessionDto create(String name, String password);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
import com.cxx.common.dto.task.TaskDto;
|
||||
|
||||
|
||||
public interface TaskService {
|
||||
TaskDto queryTaskById(Long id);
|
||||
|
||||
Long addTask(TaskDto taskDto);
|
||||
|
||||
Boolean updateTask(Long id, TaskDto taskDto);
|
||||
|
||||
Boolean deleteTask(Long id);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cxx.home.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cxx.home.dto.travel.TravelRecordDto;
|
||||
import com.cxx.home.dto.travel.TravelSpotDto;
|
||||
import com.cxx.home.dto.travel.TravelStatsDto;
|
||||
import com.cxx.home.dto.travel.TravelSummaryDto;
|
||||
import com.cxx.home.vo.TravelQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TravelService {
|
||||
Boolean addTravelSpot(TravelSpotDto travelSpotDto);
|
||||
|
||||
Boolean updateTravelSpot(Long id, TravelSpotDto travelSpotDto);
|
||||
|
||||
Boolean deleteTravelSpot(Long id);
|
||||
|
||||
Boolean addTravelRecord(TravelRecordDto travelRecordDto);
|
||||
|
||||
Boolean updateTravelRecord(Long id, TravelRecordDto travelRecordDto);
|
||||
|
||||
Boolean deleteTravelRecord(Long id);
|
||||
|
||||
TravelSpotDto queryTravelSpot(Long id);
|
||||
|
||||
IPage<TravelSummaryDto> queryTravelSummary(Integer currentPage, Integer pageSize, TravelQueryVo travelQueryVo);
|
||||
|
||||
List<TravelRecordDto> queryTravelRecord(String startDate, String endDate);
|
||||
|
||||
List<String> queryTravelSpotName();
|
||||
|
||||
List<String> queryTravelCategory();
|
||||
|
||||
TravelStatsDto queryTravelStats();
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.cxx.home.service.impl;
|
||||
|
||||
import com.cxx.common.dto.StatsChartDto;
|
||||
import com.cxx.framework.web.CustomException;
|
||||
import com.cxx.home.dao.AnniversaryDao;
|
||||
import com.cxx.home.dto.anniversary.AnniversaryDto;
|
||||
import com.cxx.home.entity.Anniversary;
|
||||
import com.cxx.home.mapper.AnniversaryMapper;
|
||||
import com.cxx.home.service.AnniversaryService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AnniversaryServiceImpl implements AnniversaryService {
|
||||
@Resource
|
||||
private AnniversaryDao anniversaryDao;
|
||||
|
||||
@Resource
|
||||
private AnniversaryMapper anniversaryMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean addAnniversary(AnniversaryDto anniversaryDto) {
|
||||
Anniversary anniversary = new Anniversary();
|
||||
BeanUtils.copyProperties(anniversaryDto, anniversary);
|
||||
anniversary.setRecurring(anniversaryDto.getRecurring() ? 1 : 0);
|
||||
|
||||
return anniversaryMapper.insert(anniversary) == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateAnniversary(Long id, AnniversaryDto anniversaryDto) {
|
||||
if (anniversaryMapper.selectById(id) == null) {
|
||||
throw new CustomException("该纪念日不存在");
|
||||
}
|
||||
|
||||
Anniversary anniversary = new Anniversary();
|
||||
BeanUtils.copyProperties(anniversaryDto, anniversary);
|
||||
anniversary.setId(id);
|
||||
anniversary.setRecurring(anniversaryDto.getRecurring() ? 1 : 0);
|
||||
return anniversaryMapper.updateById(anniversary) == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteAnniversary(Long id) {
|
||||
if (anniversaryMapper.selectById(id) == null) {
|
||||
throw new CustomException("该纪念日不存在");
|
||||
}
|
||||
|
||||
return anniversaryMapper.deleteById(id) == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnniversaryDto> queryAnniversary(String category) {
|
||||
return anniversaryDao.queryAnniversary(category);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StatsChartDto> queryAnniversaryCategory() {
|
||||
return anniversaryDao.queryAnniversaryCategory();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user