Compare commits
No commits in common. 'refactor_5.0_0704' and 'main' have entirely different histories.
refactor_5
...
main
@ -1,93 +0,0 @@
|
||||
name: Backend CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop, feature/** ]
|
||||
paths:
|
||||
- 'pom.xml'
|
||||
- 'ruoyi-*/**'
|
||||
- 'book-system/**'
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
paths:
|
||||
- 'pom.xml'
|
||||
- 'ruoyi-*/**'
|
||||
- 'book-system/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: ry-vue
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: >-
|
||||
--health-cmd="mysqladmin ping"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=3
|
||||
|
||||
redis:
|
||||
image: redis:7
|
||||
ports:
|
||||
- 6379:6379
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
|
||||
- name: Cache Maven dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Build with Maven
|
||||
run: mvn clean compile -DskipTests
|
||||
|
||||
- name: Run Checkstyle
|
||||
run: mvn checkstyle:checkstyle
|
||||
continue-on-error: true
|
||||
|
||||
- name: Run tests
|
||||
run: mvn test
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results
|
||||
path: '**/surefire-reports/*.xml'
|
||||
|
||||
- name: Upload coverage reports
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: '**/jacoco.xml'
|
||||
fail_ci_if_error: false
|
||||
|
||||
- name: Package application
|
||||
run: mvn package -DskipTests
|
||||
|
||||
- name: Upload JAR
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ruoyi-admin
|
||||
path: ruoyi-admin/target/*.jar
|
||||
@ -1,125 +0,0 @@
|
||||
name: Full CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
# 后端构建
|
||||
backend:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: ry-vue
|
||||
ports:
|
||||
- 3306:3306
|
||||
|
||||
redis:
|
||||
image: redis:7
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
|
||||
- name: Build and test
|
||||
run: mvn clean verify
|
||||
|
||||
- name: Package
|
||||
run: mvn package -DskipTests
|
||||
|
||||
- name: Upload JAR
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: backend-jar
|
||||
path: ruoyi-admin/target/*.jar
|
||||
|
||||
# 前端构建
|
||||
frontend:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ruoyi-ui-next
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: ruoyi-ui-next/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Upload dist
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend-dist
|
||||
path: ruoyi-ui-next/dist/
|
||||
|
||||
# 集成测试
|
||||
integration-test:
|
||||
needs: [backend, frontend]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download backend JAR
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: backend-jar
|
||||
|
||||
- name: Download frontend dist
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: frontend-dist
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
echo "Integration tests would run here"
|
||||
echo "Backend JAR and Frontend dist are available"
|
||||
|
||||
# 部署(仅 main 分支)
|
||||
deploy:
|
||||
needs: [backend, frontend, integration-test]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Deploy to server
|
||||
run: |
|
||||
echo "Deploy scripts would run here"
|
||||
echo "In production, use SSH or deployment tools"
|
||||
env:
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
||||
@ -1,56 +0,0 @@
|
||||
name: Frontend CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop, feature/** ]
|
||||
paths:
|
||||
- 'ruoyi-ui-next/**'
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
paths:
|
||||
- 'ruoyi-ui-next/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ruoyi-ui-next
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: ruoyi-ui-next/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run ESLint
|
||||
run: npm run lint
|
||||
continue-on-error: true
|
||||
|
||||
- name: Type check
|
||||
run: npx vue-tsc --noEmit
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend-dist
|
||||
path: ruoyi-ui-next/dist/
|
||||
|
||||
- name: Upload coverage reports
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-report
|
||||
path: ruoyi-ui-next/coverage/
|
||||
@ -1,13 +0,0 @@
|
||||
FROM eclipse-temurin:11-jre
|
||||
|
||||
LABEL maintainer="ruoyi"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ruoyi-admin/target/*.jar app.jar
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx1024m -Dspring.profiles.active=prod"
|
||||
|
||||
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]
|
||||
@ -1,117 +0,0 @@
|
||||
package com.ruoyi.booksystem.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.booksystem.domain.Account;
|
||||
import com.ruoyi.booksystem.service.IAccountService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 交易账户Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@Api(tags = "交易账户管理")
|
||||
@RestController
|
||||
@RequestMapping("/booksystem/account")
|
||||
public class AccountController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAccountService accountService;
|
||||
|
||||
/**
|
||||
* 查询交易账户列表
|
||||
*/
|
||||
@ApiOperation("查询交易账户列表")
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:account:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Account account)
|
||||
{
|
||||
startPage();
|
||||
List<Account> list = accountService.selectAccountList(account);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交易账户列表
|
||||
*/
|
||||
@ApiOperation("导出交易账户数据")
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:account:export')")
|
||||
@Log(title = "交易账户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Account account)
|
||||
{
|
||||
List<Account> list = accountService.selectAccountList(account);
|
||||
ExcelUtil<Account> util = new ExcelUtil<Account>(Account.class);
|
||||
util.exportExcel(response, list, "交易账户数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交易账户详细信息
|
||||
*/
|
||||
@ApiOperation("获取交易账户详细信息")
|
||||
@ApiImplicitParam(name = "id", value = "账户ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:account:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(accountService.selectAccountById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交易账户
|
||||
*/
|
||||
@ApiOperation("新增交易账户")
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:account:add')")
|
||||
@Log(title = "交易账户", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Account account)
|
||||
{
|
||||
return toAjax(accountService.insertAccount(account));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交易账户
|
||||
*/
|
||||
@ApiOperation("修改交易账户")
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:account:edit')")
|
||||
@Log(title = "交易账户", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Account account)
|
||||
{
|
||||
return toAjax(accountService.updateAccount(account));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交易账户
|
||||
*/
|
||||
@ApiOperation("删除交易账户")
|
||||
@ApiImplicitParam(name = "ids", value = "账户ID列表", required = true, dataType = "Long[]", paramType = "path")
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:account:remove')")
|
||||
@Log(title = "交易账户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(accountService.deleteAccountByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -1,111 +0,0 @@
|
||||
package com.ruoyi.booksystem.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.booksystem.domain.Operations;
|
||||
import com.ruoyi.booksystem.service.IOperationsService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 当日操作Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/booksystem/operations")
|
||||
public class OperationsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOperationsService operationsService;
|
||||
|
||||
/**
|
||||
* 查询当日操作列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Operations operations)
|
||||
{
|
||||
startPage();
|
||||
List<Operations> list = operationsService.selectOperationsList(operations);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出当日操作列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:export')")
|
||||
@Log(title = "当日操作", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Operations operations)
|
||||
{
|
||||
List<Operations> list = operationsService.selectOperationsList(operations);
|
||||
ExcelUtil<Operations> util = new ExcelUtil<Operations>(Operations.class);
|
||||
util.exportExcel(response, list, "当日操作数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当日操作详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(operationsService.selectOperationsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当日操作
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:add')")
|
||||
@Log(title = "当日操作", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Operations operations)
|
||||
{
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
System.out.println("[AccountBookController] userName: " + loginUser.getUsername() + " userId: " + loginUser.getUserId());
|
||||
operations.setUserId(loginUser.getUserId());
|
||||
//插入一条后,要更新持仓表
|
||||
return toAjax(operationsService.insertOperations(operations));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当日操作
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:edit')")
|
||||
@Log(title = "当日操作", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Operations operations)
|
||||
{
|
||||
return toAjax(operationsService.updateOperations(operations));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当日操作
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:remove')")
|
||||
@Log(title = "当日操作", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(operationsService.deleteOperationsByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -1,104 +0,0 @@
|
||||
package com.ruoyi.booksystem.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.booksystem.domain.Statistics;
|
||||
import com.ruoyi.booksystem.service.IStatisticsService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 单笔操作统计Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/booksystem/statistics")
|
||||
public class StatisticsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IStatisticsService statisticsService;
|
||||
|
||||
/**
|
||||
* 查询单笔操作统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Statistics statistics)
|
||||
{
|
||||
startPage();
|
||||
List<Statistics> list = statisticsService.selectStatisticsList(statistics);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出单笔操作统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:export')")
|
||||
@Log(title = "单笔操作统计", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Statistics statistics)
|
||||
{
|
||||
List<Statistics> list = statisticsService.selectStatisticsList(statistics);
|
||||
ExcelUtil<Statistics> util = new ExcelUtil<Statistics>(Statistics.class);
|
||||
util.exportExcel(response, list, "单笔操作统计数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单笔操作统计详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(statisticsService.selectStatisticsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单笔操作统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:add')")
|
||||
@Log(title = "单笔操作统计", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Statistics statistics)
|
||||
{
|
||||
return toAjax(statisticsService.insertStatistics(statistics));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单笔操作统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:edit')")
|
||||
@Log(title = "单笔操作统计", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Statistics statistics)
|
||||
{
|
||||
return toAjax(statisticsService.updateStatistics(statistics));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单笔操作统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:remove')")
|
||||
@Log(title = "单笔操作统计", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(statisticsService.deleteStatisticsByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -1,104 +0,0 @@
|
||||
package com.ruoyi.booksystem.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
||||
import com.ruoyi.booksystem.service.IStatisticsRemainService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 当日持仓统计Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/booksystem/statisticremain")
|
||||
public class StatisticsRemainController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IStatisticsRemainService statisticsRemainService;
|
||||
|
||||
/**
|
||||
* 查询当日持仓统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StatisticsRemain statisticsRemain)
|
||||
{
|
||||
startPage();
|
||||
List<StatisticsRemain> list = statisticsRemainService.selectStatisticsRemainList(statisticsRemain);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出当日持仓统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:export')")
|
||||
@Log(title = "当日持仓统计", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StatisticsRemain statisticsRemain)
|
||||
{
|
||||
List<StatisticsRemain> list = statisticsRemainService.selectStatisticsRemainList(statisticsRemain);
|
||||
ExcelUtil<StatisticsRemain> util = new ExcelUtil<StatisticsRemain>(StatisticsRemain.class);
|
||||
util.exportExcel(response, list, "当日持仓统计数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当日持仓统计详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(statisticsRemainService.selectStatisticsRemainById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当日持仓统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:add')")
|
||||
@Log(title = "当日持仓统计", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody StatisticsRemain statisticsRemain)
|
||||
{
|
||||
return toAjax(statisticsRemainService.insertStatisticsRemain(statisticsRemain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当日持仓统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:edit')")
|
||||
@Log(title = "当日持仓统计", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StatisticsRemain statisticsRemain)
|
||||
{
|
||||
return toAjax(statisticsRemainService.updateStatisticsRemain(statisticsRemain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当日持仓统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:remove')")
|
||||
@Log(title = "当日持仓统计", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(statisticsRemainService.deleteStatisticsRemainByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -1,104 +0,0 @@
|
||||
package com.ruoyi.booksystem.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
||||
import com.ruoyi.booksystem.service.IStatisticsTotalService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 统计当日持仓Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/booksystem/statistictotal")
|
||||
public class StatisticsTotalController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IStatisticsTotalService statisticsTotalService;
|
||||
|
||||
/**
|
||||
* 查询统计当日持仓列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StatisticsTotal statisticsTotal)
|
||||
{
|
||||
startPage();
|
||||
List<StatisticsTotal> list = statisticsTotalService.selectStatisticsTotalList(statisticsTotal);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出统计当日持仓列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:export')")
|
||||
@Log(title = "统计当日持仓", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, StatisticsTotal statisticsTotal)
|
||||
{
|
||||
List<StatisticsTotal> list = statisticsTotalService.selectStatisticsTotalList(statisticsTotal);
|
||||
ExcelUtil<StatisticsTotal> util = new ExcelUtil<StatisticsTotal>(StatisticsTotal.class);
|
||||
util.exportExcel(response, list, "统计当日持仓数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取统计当日持仓详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(statisticsTotalService.selectStatisticsTotalById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增统计当日持仓
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:add')")
|
||||
@Log(title = "统计当日持仓", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody StatisticsTotal statisticsTotal)
|
||||
{
|
||||
return toAjax(statisticsTotalService.insertStatisticsTotal(statisticsTotal));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改统计当日持仓
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:edit')")
|
||||
@Log(title = "统计当日持仓", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StatisticsTotal statisticsTotal)
|
||||
{
|
||||
return toAjax(statisticsTotalService.updateStatisticsTotal(statisticsTotal));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除统计当日持仓
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:remove')")
|
||||
@Log(title = "统计当日持仓", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(statisticsTotalService.deleteStatisticsTotalByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -1,153 +0,0 @@
|
||||
package com.ruoyi.booksystem.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 交易账户对象 account
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public class Account extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 交易日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date tradeDay;
|
||||
|
||||
/** 交易日星期 */
|
||||
@Excel(name = "交易日星期")
|
||||
private String weekDay;
|
||||
|
||||
/** 净资产 */
|
||||
@Excel(name = "净资产")
|
||||
private BigDecimal assets;
|
||||
|
||||
/** 总资产 */
|
||||
@Excel(name = "总资产")
|
||||
private BigDecimal totalAssets;
|
||||
|
||||
/** 当日盈亏 */
|
||||
@Excel(name = "当日盈亏")
|
||||
private BigDecimal profit;
|
||||
|
||||
/** 当日净资产盈亏比例 */
|
||||
@Excel(name = "当日净资产盈亏比例")
|
||||
private BigDecimal assetsDiff;
|
||||
|
||||
/** 当日总资产盈亏比例 */
|
||||
@Excel(name = "当日总资产盈亏比例")
|
||||
private BigDecimal totalDiff;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeDay(Date tradeDay)
|
||||
{
|
||||
this.tradeDay = tradeDay;
|
||||
}
|
||||
|
||||
public Date getTradeDay()
|
||||
{
|
||||
return tradeDay;
|
||||
}
|
||||
public void setWeekDay(String weekDay)
|
||||
{
|
||||
this.weekDay = weekDay;
|
||||
}
|
||||
|
||||
public String getWeekDay()
|
||||
{
|
||||
return weekDay;
|
||||
}
|
||||
public void setAssets(BigDecimal assets)
|
||||
{
|
||||
this.assets = assets;
|
||||
}
|
||||
|
||||
public BigDecimal getAssets()
|
||||
{
|
||||
return assets;
|
||||
}
|
||||
public void setTotalAssets(BigDecimal totalAssets)
|
||||
{
|
||||
this.totalAssets = totalAssets;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAssets()
|
||||
{
|
||||
return totalAssets;
|
||||
}
|
||||
public void setProfit(BigDecimal profit)
|
||||
{
|
||||
this.profit = profit;
|
||||
}
|
||||
|
||||
public BigDecimal getProfit()
|
||||
{
|
||||
return profit;
|
||||
}
|
||||
public void setAssetsDiff(BigDecimal assetsDiff)
|
||||
{
|
||||
this.assetsDiff = assetsDiff;
|
||||
}
|
||||
|
||||
public BigDecimal getAssetsDiff()
|
||||
{
|
||||
return assetsDiff;
|
||||
}
|
||||
public void setTotalDiff(BigDecimal totalDiff)
|
||||
{
|
||||
this.totalDiff = totalDiff;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDiff()
|
||||
{
|
||||
return totalDiff;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeDay", getTradeDay())
|
||||
.append("weekDay", getWeekDay())
|
||||
.append("assets", getAssets())
|
||||
.append("totalAssets", getTotalAssets())
|
||||
.append("profit", getProfit())
|
||||
.append("assetsDiff", getAssetsDiff())
|
||||
.append("totalDiff", getTotalDiff())
|
||||
.append("userId", getUserId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,265 +0,0 @@
|
||||
package com.ruoyi.booksystem.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 当日操作对象 operations
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public class Operations extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 股票代码 */
|
||||
@Excel(name = "股票代码")
|
||||
private String code;
|
||||
|
||||
/** 股票名称 */
|
||||
@Excel(name = "股票名称")
|
||||
private String name;
|
||||
|
||||
/** 交易日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date tradeDay;
|
||||
|
||||
/** 交易日星期 */
|
||||
@Excel(name = "交易日星期")
|
||||
private String weekDay;
|
||||
|
||||
/** 操作(含账户转入转出) */
|
||||
@Excel(name = "操作", readConverterExp = "含=账户转入转出")
|
||||
private String operate;
|
||||
|
||||
/** 交易价格 */
|
||||
@Excel(name = "交易价格")
|
||||
private BigDecimal dealPrice;
|
||||
|
||||
/** 成交量 */
|
||||
@Excel(name = "成交量")
|
||||
private Long volumn;
|
||||
|
||||
/** 成交额 */
|
||||
@Excel(name = "成交额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 印花税 */
|
||||
@Excel(name = "印花税")
|
||||
private BigDecimal tax;
|
||||
|
||||
/** 手续费 */
|
||||
@Excel(name = "手续费")
|
||||
private BigDecimal fee;
|
||||
|
||||
/** 其他费用 */
|
||||
@Excel(name = "其他费用")
|
||||
private BigDecimal other;
|
||||
|
||||
/** 操作时涨跌 */
|
||||
@Excel(name = "操作时涨跌")
|
||||
private BigDecimal operateDiff;
|
||||
|
||||
/** 关联操作id */
|
||||
@Excel(name = "关联操作id")
|
||||
private Long preId;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 操作逻辑 */
|
||||
@Excel(name = "操作逻辑")
|
||||
private String dealLogic;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String bz;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setTradeDay(Date tradeDay)
|
||||
{
|
||||
this.tradeDay = tradeDay;
|
||||
}
|
||||
|
||||
public Date getTradeDay()
|
||||
{
|
||||
return tradeDay;
|
||||
}
|
||||
public void setWeekDay(String weekDay)
|
||||
{
|
||||
this.weekDay = weekDay;
|
||||
}
|
||||
|
||||
public String getWeekDay()
|
||||
{
|
||||
return weekDay;
|
||||
}
|
||||
public void setOperate(String operate)
|
||||
{
|
||||
this.operate = operate;
|
||||
}
|
||||
|
||||
public String getOperate()
|
||||
{
|
||||
return operate;
|
||||
}
|
||||
public void setDealPrice(BigDecimal dealPrice)
|
||||
{
|
||||
this.dealPrice = dealPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getDealPrice()
|
||||
{
|
||||
return dealPrice;
|
||||
}
|
||||
public void setVolumn(Long volumn)
|
||||
{
|
||||
this.volumn = volumn;
|
||||
}
|
||||
|
||||
public Long getVolumn()
|
||||
{
|
||||
return volumn;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setTax(BigDecimal tax)
|
||||
{
|
||||
this.tax = tax;
|
||||
}
|
||||
|
||||
public BigDecimal getTax()
|
||||
{
|
||||
return tax;
|
||||
}
|
||||
public void setFee(BigDecimal fee)
|
||||
{
|
||||
this.fee = fee;
|
||||
}
|
||||
|
||||
public BigDecimal getFee()
|
||||
{
|
||||
return fee;
|
||||
}
|
||||
public void setOther(BigDecimal other)
|
||||
{
|
||||
this.other = other;
|
||||
}
|
||||
|
||||
public BigDecimal getOther()
|
||||
{
|
||||
return other;
|
||||
}
|
||||
public void setOperateDiff(BigDecimal operateDiff)
|
||||
{
|
||||
this.operateDiff = operateDiff;
|
||||
}
|
||||
|
||||
public BigDecimal getOperateDiff()
|
||||
{
|
||||
return operateDiff;
|
||||
}
|
||||
public void setPreId(Long preId)
|
||||
{
|
||||
this.preId = preId;
|
||||
}
|
||||
|
||||
public Long getPreId()
|
||||
{
|
||||
return preId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setDealLogic(String dealLogic)
|
||||
{
|
||||
this.dealLogic = dealLogic;
|
||||
}
|
||||
|
||||
public String getDealLogic()
|
||||
{
|
||||
return dealLogic;
|
||||
}
|
||||
public void setBz(String bz)
|
||||
{
|
||||
this.bz = bz;
|
||||
}
|
||||
|
||||
public String getBz()
|
||||
{
|
||||
return bz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("code", getCode())
|
||||
.append("name", getName())
|
||||
.append("tradeDay", getTradeDay())
|
||||
.append("weekDay", getWeekDay())
|
||||
.append("operate", getOperate())
|
||||
.append("dealPrice", getDealPrice())
|
||||
.append("volumn", getVolumn())
|
||||
.append("amount", getAmount())
|
||||
.append("tax", getTax())
|
||||
.append("fee", getFee())
|
||||
.append("other", getOther())
|
||||
.append("operateDiff", getOperateDiff())
|
||||
.append("preId", getPreId())
|
||||
.append("userId", getUserId())
|
||||
.append("dealLogic", getDealLogic())
|
||||
.append("bz", getBz())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,181 +0,0 @@
|
||||
package com.ruoyi.booksystem.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 单笔操作统计对象 statistics
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public class Statistics extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 股票代码 */
|
||||
@Excel(name = "股票代码")
|
||||
private String code;
|
||||
|
||||
/** 股票名称 */
|
||||
@Excel(name = "股票名称")
|
||||
private String name;
|
||||
|
||||
/** 交易日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date tradeDay;
|
||||
|
||||
/** 交易日星期 */
|
||||
@Excel(name = "交易日星期")
|
||||
private String weekDay;
|
||||
|
||||
/** 操作id */
|
||||
@Excel(name = "操作id")
|
||||
private String operationsId;
|
||||
|
||||
/** 当笔当日盈亏 */
|
||||
@Excel(name = "当笔当日盈亏")
|
||||
private BigDecimal profit;
|
||||
|
||||
/** 当笔当日盈亏盈亏比例 */
|
||||
@Excel(name = "当笔当日盈亏盈亏比例")
|
||||
private Long diff;
|
||||
|
||||
/** 操作id */
|
||||
@Excel(name = "操作id")
|
||||
private Long operateionId;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String bz;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setTradeDay(Date tradeDay)
|
||||
{
|
||||
this.tradeDay = tradeDay;
|
||||
}
|
||||
|
||||
public Date getTradeDay()
|
||||
{
|
||||
return tradeDay;
|
||||
}
|
||||
public void setWeekDay(String weekDay)
|
||||
{
|
||||
this.weekDay = weekDay;
|
||||
}
|
||||
|
||||
public String getWeekDay()
|
||||
{
|
||||
return weekDay;
|
||||
}
|
||||
public void setOperationsId(String operationsId)
|
||||
{
|
||||
this.operationsId = operationsId;
|
||||
}
|
||||
|
||||
public String getOperationsId()
|
||||
{
|
||||
return operationsId;
|
||||
}
|
||||
public void setProfit(BigDecimal profit)
|
||||
{
|
||||
this.profit = profit;
|
||||
}
|
||||
|
||||
public BigDecimal getProfit()
|
||||
{
|
||||
return profit;
|
||||
}
|
||||
public void setDiff(Long diff)
|
||||
{
|
||||
this.diff = diff;
|
||||
}
|
||||
|
||||
public Long getDiff()
|
||||
{
|
||||
return diff;
|
||||
}
|
||||
public void setOperateionId(Long operateionId)
|
||||
{
|
||||
this.operateionId = operateionId;
|
||||
}
|
||||
|
||||
public Long getOperateionId()
|
||||
{
|
||||
return operateionId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setBz(String bz)
|
||||
{
|
||||
this.bz = bz;
|
||||
}
|
||||
|
||||
public String getBz()
|
||||
{
|
||||
return bz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("code", getCode())
|
||||
.append("name", getName())
|
||||
.append("tradeDay", getTradeDay())
|
||||
.append("weekDay", getWeekDay())
|
||||
.append("operationsId", getOperationsId())
|
||||
.append("profit", getProfit())
|
||||
.append("diff", getDiff())
|
||||
.append("operateionId", getOperateionId())
|
||||
.append("userId", getUserId())
|
||||
.append("bz", getBz())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,181 +0,0 @@
|
||||
package com.ruoyi.booksystem.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 当日持仓统计对象 statistics_remain
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public class StatisticsRemain extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 股票代码 */
|
||||
@Excel(name = "股票代码")
|
||||
private String code;
|
||||
|
||||
/** 股票名称 */
|
||||
@Excel(name = "股票名称")
|
||||
private String name;
|
||||
|
||||
/** 交易日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date tradeDay;
|
||||
|
||||
/** 交易日星期 */
|
||||
@Excel(name = "交易日星期")
|
||||
private String weekDay;
|
||||
|
||||
/** 总盈亏 */
|
||||
@Excel(name = "总盈亏")
|
||||
private BigDecimal totalProfit;
|
||||
|
||||
/** 总盈亏比例 */
|
||||
@Excel(name = "总盈亏比例")
|
||||
private BigDecimal totalDiff;
|
||||
|
||||
/** 总盈亏占整体盈亏比例 */
|
||||
@Excel(name = "总盈亏占整体盈亏比例")
|
||||
private BigDecimal totalDiffOverall;
|
||||
|
||||
/** 剩余数量 */
|
||||
@Excel(name = "剩余数量")
|
||||
private BigDecimal remaining;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String bz;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setTradeDay(Date tradeDay)
|
||||
{
|
||||
this.tradeDay = tradeDay;
|
||||
}
|
||||
|
||||
public Date getTradeDay()
|
||||
{
|
||||
return tradeDay;
|
||||
}
|
||||
public void setWeekDay(String weekDay)
|
||||
{
|
||||
this.weekDay = weekDay;
|
||||
}
|
||||
|
||||
public String getWeekDay()
|
||||
{
|
||||
return weekDay;
|
||||
}
|
||||
public void setTotalProfit(BigDecimal totalProfit)
|
||||
{
|
||||
this.totalProfit = totalProfit;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalProfit()
|
||||
{
|
||||
return totalProfit;
|
||||
}
|
||||
public void setTotalDiff(BigDecimal totalDiff)
|
||||
{
|
||||
this.totalDiff = totalDiff;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDiff()
|
||||
{
|
||||
return totalDiff;
|
||||
}
|
||||
public void setTotalDiffOverall(BigDecimal totalDiffOverall)
|
||||
{
|
||||
this.totalDiffOverall = totalDiffOverall;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDiffOverall()
|
||||
{
|
||||
return totalDiffOverall;
|
||||
}
|
||||
public void setRemaining(BigDecimal remaining)
|
||||
{
|
||||
this.remaining = remaining;
|
||||
}
|
||||
|
||||
public BigDecimal getRemaining()
|
||||
{
|
||||
return remaining;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setBz(String bz)
|
||||
{
|
||||
this.bz = bz;
|
||||
}
|
||||
|
||||
public String getBz()
|
||||
{
|
||||
return bz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("code", getCode())
|
||||
.append("name", getName())
|
||||
.append("tradeDay", getTradeDay())
|
||||
.append("weekDay", getWeekDay())
|
||||
.append("totalProfit", getTotalProfit())
|
||||
.append("totalDiff", getTotalDiff())
|
||||
.append("totalDiffOverall", getTotalDiffOverall())
|
||||
.append("remaining", getRemaining())
|
||||
.append("userId", getUserId())
|
||||
.append("bz", getBz())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,266 +0,0 @@
|
||||
package com.ruoyi.booksystem.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 统计当日持仓对象 statistics_total
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public class StatisticsTotal extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 股票代码 */
|
||||
@Excel(name = "股票代码")
|
||||
private String code;
|
||||
|
||||
/** 股票名称 */
|
||||
@Excel(name = "股票名称")
|
||||
private String name;
|
||||
|
||||
/** 建仓交易日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "建仓交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTradeDay;
|
||||
|
||||
/** 清仓交易日星期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "清仓交易日星期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTradeDay;
|
||||
|
||||
/** 总盈亏 */
|
||||
@Excel(name = "总盈亏")
|
||||
private BigDecimal totalProfit;
|
||||
|
||||
/** 总盈亏比例 */
|
||||
@Excel(name = "总盈亏比例")
|
||||
private BigDecimal totalDiff;
|
||||
|
||||
/** 建仓交易价格 */
|
||||
@Excel(name = "建仓交易价格")
|
||||
private BigDecimal startPrice;
|
||||
|
||||
/** 建仓交易价格 */
|
||||
@Excel(name = "建仓交易价格")
|
||||
private BigDecimal endPrice;
|
||||
|
||||
/** 总成交量 */
|
||||
@Excel(name = "总成交量")
|
||||
private Long volumnTotal;
|
||||
|
||||
/** 总成交额 */
|
||||
@Excel(name = "总成交额")
|
||||
private BigDecimal amountTotal;
|
||||
|
||||
/** 交易次数 */
|
||||
@Excel(name = "交易次数")
|
||||
private BigDecimal operateTimes;
|
||||
|
||||
/** 总手续费 */
|
||||
@Excel(name = "总手续费")
|
||||
private BigDecimal fee;
|
||||
|
||||
/** 总印花税 */
|
||||
@Excel(name = "总印花税")
|
||||
private BigDecimal tax;
|
||||
|
||||
/** 总其他费用 */
|
||||
@Excel(name = "总其他费用")
|
||||
private BigDecimal other;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String bz;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStartTradeDay(Date startTradeDay)
|
||||
{
|
||||
this.startTradeDay = startTradeDay;
|
||||
}
|
||||
|
||||
public Date getStartTradeDay()
|
||||
{
|
||||
return startTradeDay;
|
||||
}
|
||||
public void setEndTradeDay(Date endTradeDay)
|
||||
{
|
||||
this.endTradeDay = endTradeDay;
|
||||
}
|
||||
|
||||
public Date getEndTradeDay()
|
||||
{
|
||||
return endTradeDay;
|
||||
}
|
||||
public void setTotalProfit(BigDecimal totalProfit)
|
||||
{
|
||||
this.totalProfit = totalProfit;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalProfit()
|
||||
{
|
||||
return totalProfit;
|
||||
}
|
||||
public void setTotalDiff(BigDecimal totalDiff)
|
||||
{
|
||||
this.totalDiff = totalDiff;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDiff()
|
||||
{
|
||||
return totalDiff;
|
||||
}
|
||||
public void setStartPrice(BigDecimal startPrice)
|
||||
{
|
||||
this.startPrice = startPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getStartPrice()
|
||||
{
|
||||
return startPrice;
|
||||
}
|
||||
public void setEndPrice(BigDecimal endPrice)
|
||||
{
|
||||
this.endPrice = endPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getEndPrice()
|
||||
{
|
||||
return endPrice;
|
||||
}
|
||||
public void setVolumnTotal(Long volumnTotal)
|
||||
{
|
||||
this.volumnTotal = volumnTotal;
|
||||
}
|
||||
|
||||
public Long getVolumnTotal()
|
||||
{
|
||||
return volumnTotal;
|
||||
}
|
||||
public void setAmountTotal(BigDecimal amountTotal)
|
||||
{
|
||||
this.amountTotal = amountTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getAmountTotal()
|
||||
{
|
||||
return amountTotal;
|
||||
}
|
||||
public void setOperateTimes(BigDecimal operateTimes)
|
||||
{
|
||||
this.operateTimes = operateTimes;
|
||||
}
|
||||
|
||||
public BigDecimal getOperateTimes()
|
||||
{
|
||||
return operateTimes;
|
||||
}
|
||||
public void setFee(BigDecimal fee)
|
||||
{
|
||||
this.fee = fee;
|
||||
}
|
||||
|
||||
public BigDecimal getFee()
|
||||
{
|
||||
return fee;
|
||||
}
|
||||
public void setTax(BigDecimal tax)
|
||||
{
|
||||
this.tax = tax;
|
||||
}
|
||||
|
||||
public BigDecimal getTax()
|
||||
{
|
||||
return tax;
|
||||
}
|
||||
public void setOther(BigDecimal other)
|
||||
{
|
||||
this.other = other;
|
||||
}
|
||||
|
||||
public BigDecimal getOther()
|
||||
{
|
||||
return other;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setBz(String bz)
|
||||
{
|
||||
this.bz = bz;
|
||||
}
|
||||
|
||||
public String getBz()
|
||||
{
|
||||
return bz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("code", getCode())
|
||||
.append("name", getName())
|
||||
.append("startTradeDay", getStartTradeDay())
|
||||
.append("endTradeDay", getEndTradeDay())
|
||||
.append("totalProfit", getTotalProfit())
|
||||
.append("totalDiff", getTotalDiff())
|
||||
.append("startPrice", getStartPrice())
|
||||
.append("endPrice", getEndPrice())
|
||||
.append("volumnTotal", getVolumnTotal())
|
||||
.append("amountTotal", getAmountTotal())
|
||||
.append("operateTimes", getOperateTimes())
|
||||
.append("fee", getFee())
|
||||
.append("tax", getTax())
|
||||
.append("other", getOther())
|
||||
.append("userId", getUserId())
|
||||
.append("bz", getBz())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.Account;
|
||||
|
||||
/**
|
||||
* 交易账户Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface AccountMapper
|
||||
{
|
||||
/**
|
||||
* 查询交易账户
|
||||
*
|
||||
* @param id 交易账户主键
|
||||
* @return 交易账户
|
||||
*/
|
||||
public Account selectAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交易账户列表
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 交易账户集合
|
||||
*/
|
||||
public List<Account> selectAccountList(Account account);
|
||||
|
||||
/**
|
||||
* 新增交易账户
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAccount(Account account);
|
||||
|
||||
/**
|
||||
* 修改交易账户
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAccount(Account account);
|
||||
|
||||
/**
|
||||
* 删除交易账户
|
||||
*
|
||||
* @param id 交易账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除交易账户
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccountByIds(Long[] ids);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.Operations;
|
||||
|
||||
/**
|
||||
* 当日操作Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface OperationsMapper
|
||||
{
|
||||
/**
|
||||
* 查询当日操作
|
||||
*
|
||||
* @param id 当日操作主键
|
||||
* @return 当日操作
|
||||
*/
|
||||
public Operations selectOperationsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询当日操作列表
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 当日操作集合
|
||||
*/
|
||||
public List<Operations> selectOperationsList(Operations operations);
|
||||
|
||||
/**
|
||||
* 新增当日操作
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOperations(Operations operations);
|
||||
|
||||
/**
|
||||
* 修改当日操作
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOperations(Operations operations);
|
||||
|
||||
/**
|
||||
* 删除当日操作
|
||||
*
|
||||
* @param id 当日操作主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOperationsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除当日操作
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOperationsByIds(Long[] ids);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.Statistics;
|
||||
|
||||
/**
|
||||
* 单笔操作统计Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface StatisticsMapper
|
||||
{
|
||||
/**
|
||||
* 查询单笔操作统计
|
||||
*
|
||||
* @param id 单笔操作统计主键
|
||||
* @return 单笔操作统计
|
||||
*/
|
||||
public Statistics selectStatisticsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询单笔操作统计列表
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 单笔操作统计集合
|
||||
*/
|
||||
public List<Statistics> selectStatisticsList(Statistics statistics);
|
||||
|
||||
/**
|
||||
* 新增单笔操作统计
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatistics(Statistics statistics);
|
||||
|
||||
/**
|
||||
* 修改单笔操作统计
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatistics(Statistics statistics);
|
||||
|
||||
/**
|
||||
* 删除单笔操作统计
|
||||
*
|
||||
* @param id 单笔操作统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除单笔操作统计
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsByIds(Long[] ids);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
||||
|
||||
/**
|
||||
* 当日持仓统计Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface StatisticsRemainMapper
|
||||
{
|
||||
/**
|
||||
* 查询当日持仓统计
|
||||
*
|
||||
* @param id 当日持仓统计主键
|
||||
* @return 当日持仓统计
|
||||
*/
|
||||
public StatisticsRemain selectStatisticsRemainById(Long id);
|
||||
|
||||
/**
|
||||
* 查询当日持仓统计列表
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 当日持仓统计集合
|
||||
*/
|
||||
public List<StatisticsRemain> selectStatisticsRemainList(StatisticsRemain statisticsRemain);
|
||||
|
||||
/**
|
||||
* 新增当日持仓统计
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatisticsRemain(StatisticsRemain statisticsRemain);
|
||||
|
||||
/**
|
||||
* 修改当日持仓统计
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatisticsRemain(StatisticsRemain statisticsRemain);
|
||||
|
||||
/**
|
||||
* 删除当日持仓统计
|
||||
*
|
||||
* @param id 当日持仓统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsRemainById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除当日持仓统计
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsRemainByIds(Long[] ids);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
||||
|
||||
/**
|
||||
* 统计当日持仓Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface StatisticsTotalMapper
|
||||
{
|
||||
/**
|
||||
* 查询统计当日持仓
|
||||
*
|
||||
* @param id 统计当日持仓主键
|
||||
* @return 统计当日持仓
|
||||
*/
|
||||
public StatisticsTotal selectStatisticsTotalById(Long id);
|
||||
|
||||
/**
|
||||
* 查询统计当日持仓列表
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 统计当日持仓集合
|
||||
*/
|
||||
public List<StatisticsTotal> selectStatisticsTotalList(StatisticsTotal statisticsTotal);
|
||||
|
||||
/**
|
||||
* 新增统计当日持仓
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatisticsTotal(StatisticsTotal statisticsTotal);
|
||||
|
||||
/**
|
||||
* 修改统计当日持仓
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatisticsTotal(StatisticsTotal statisticsTotal);
|
||||
|
||||
/**
|
||||
* 删除统计当日持仓
|
||||
*
|
||||
* @param id 统计当日持仓主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsTotalById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除统计当日持仓
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsTotalByIds(Long[] ids);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.Account;
|
||||
|
||||
/**
|
||||
* 交易账户Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface IAccountService
|
||||
{
|
||||
/**
|
||||
* 查询交易账户
|
||||
*
|
||||
* @param id 交易账户主键
|
||||
* @return 交易账户
|
||||
*/
|
||||
public Account selectAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交易账户列表
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 交易账户集合
|
||||
*/
|
||||
public List<Account> selectAccountList(Account account);
|
||||
|
||||
/**
|
||||
* 新增交易账户
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAccount(Account account);
|
||||
|
||||
/**
|
||||
* 修改交易账户
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAccount(Account account);
|
||||
|
||||
/**
|
||||
* 批量删除交易账户
|
||||
*
|
||||
* @param ids 需要删除的交易账户主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccountByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除交易账户信息
|
||||
*
|
||||
* @param id 交易账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccountById(Long id);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.Operations;
|
||||
|
||||
/**
|
||||
* 当日操作Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface IOperationsService
|
||||
{
|
||||
/**
|
||||
* 查询当日操作
|
||||
*
|
||||
* @param id 当日操作主键
|
||||
* @return 当日操作
|
||||
*/
|
||||
public Operations selectOperationsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询当日操作列表
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 当日操作集合
|
||||
*/
|
||||
public List<Operations> selectOperationsList(Operations operations);
|
||||
|
||||
/**
|
||||
* 新增当日操作
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOperations(Operations operations);
|
||||
|
||||
/**
|
||||
* 修改当日操作
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOperations(Operations operations);
|
||||
|
||||
/**
|
||||
* 批量删除当日操作
|
||||
*
|
||||
* @param ids 需要删除的当日操作主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOperationsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除当日操作信息
|
||||
*
|
||||
* @param id 当日操作主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOperationsById(Long id);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
||||
|
||||
/**
|
||||
* 当日持仓统计Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface IStatisticsRemainService
|
||||
{
|
||||
/**
|
||||
* 查询当日持仓统计
|
||||
*
|
||||
* @param id 当日持仓统计主键
|
||||
* @return 当日持仓统计
|
||||
*/
|
||||
public StatisticsRemain selectStatisticsRemainById(Long id);
|
||||
|
||||
/**
|
||||
* 查询当日持仓统计列表
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 当日持仓统计集合
|
||||
*/
|
||||
public List<StatisticsRemain> selectStatisticsRemainList(StatisticsRemain statisticsRemain);
|
||||
|
||||
/**
|
||||
* 新增当日持仓统计
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatisticsRemain(StatisticsRemain statisticsRemain);
|
||||
|
||||
/**
|
||||
* 修改当日持仓统计
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatisticsRemain(StatisticsRemain statisticsRemain);
|
||||
|
||||
/**
|
||||
* 批量删除当日持仓统计
|
||||
*
|
||||
* @param ids 需要删除的当日持仓统计主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsRemainByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除当日持仓统计信息
|
||||
*
|
||||
* @param id 当日持仓统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsRemainById(Long id);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.Statistics;
|
||||
|
||||
/**
|
||||
* 单笔操作统计Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface IStatisticsService
|
||||
{
|
||||
/**
|
||||
* 查询单笔操作统计
|
||||
*
|
||||
* @param id 单笔操作统计主键
|
||||
* @return 单笔操作统计
|
||||
*/
|
||||
public Statistics selectStatisticsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询单笔操作统计列表
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 单笔操作统计集合
|
||||
*/
|
||||
public List<Statistics> selectStatisticsList(Statistics statistics);
|
||||
|
||||
/**
|
||||
* 新增单笔操作统计
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatistics(Statistics statistics);
|
||||
|
||||
/**
|
||||
* 修改单笔操作统计
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatistics(Statistics statistics);
|
||||
|
||||
/**
|
||||
* 批量删除单笔操作统计
|
||||
*
|
||||
* @param ids 需要删除的单笔操作统计主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除单笔操作统计信息
|
||||
*
|
||||
* @param id 单笔操作统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsById(Long id);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.booksystem.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
||||
|
||||
/**
|
||||
* 统计当日持仓Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface IStatisticsTotalService
|
||||
{
|
||||
/**
|
||||
* 查询统计当日持仓
|
||||
*
|
||||
* @param id 统计当日持仓主键
|
||||
* @return 统计当日持仓
|
||||
*/
|
||||
public StatisticsTotal selectStatisticsTotalById(Long id);
|
||||
|
||||
/**
|
||||
* 查询统计当日持仓列表
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 统计当日持仓集合
|
||||
*/
|
||||
public List<StatisticsTotal> selectStatisticsTotalList(StatisticsTotal statisticsTotal);
|
||||
|
||||
/**
|
||||
* 新增统计当日持仓
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatisticsTotal(StatisticsTotal statisticsTotal);
|
||||
|
||||
/**
|
||||
* 修改统计当日持仓
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatisticsTotal(StatisticsTotal statisticsTotal);
|
||||
|
||||
/**
|
||||
* 批量删除统计当日持仓
|
||||
*
|
||||
* @param ids 需要删除的统计当日持仓主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsTotalByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除统计当日持仓信息
|
||||
*
|
||||
* @param id 统计当日持仓主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatisticsTotalById(Long id);
|
||||
}
|
||||
@ -1,95 +0,0 @@
|
||||
package com.ruoyi.booksystem.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.booksystem.mapper.AccountMapper;
|
||||
import com.ruoyi.booksystem.domain.Account;
|
||||
import com.ruoyi.booksystem.service.IAccountService;
|
||||
import com.ruoyi.common.annotation.PerformanceMonitor;
|
||||
|
||||
/**
|
||||
* 交易账户Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@Service
|
||||
public class AccountServiceImpl implements IAccountService
|
||||
{
|
||||
@Autowired
|
||||
private AccountMapper accountMapper;
|
||||
|
||||
/**
|
||||
* 查询交易账户
|
||||
*
|
||||
* @param id 交易账户主键
|
||||
* @return 交易账户
|
||||
*/
|
||||
@Override
|
||||
public Account selectAccountById(Long id)
|
||||
{
|
||||
return accountMapper.selectAccountById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交易账户列表
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 交易账户
|
||||
*/
|
||||
@Override
|
||||
@PerformanceMonitor(slowThreshold = 1000, logParams = true)
|
||||
public List<Account> selectAccountList(Account account)
|
||||
{
|
||||
return accountMapper.selectAccountList(account);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交易账户
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAccount(Account account)
|
||||
{
|
||||
return accountMapper.insertAccount(account);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交易账户
|
||||
*
|
||||
* @param account 交易账户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAccount(Account account)
|
||||
{
|
||||
return accountMapper.updateAccount(account);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交易账户
|
||||
*
|
||||
* @param ids 需要删除的交易账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAccountByIds(Long[] ids)
|
||||
{
|
||||
return accountMapper.deleteAccountByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交易账户信息
|
||||
*
|
||||
* @param id 交易账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAccountById(Long id)
|
||||
{
|
||||
return accountMapper.deleteAccountById(id);
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
package com.ruoyi.booksystem.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.booksystem.mapper.OperationsMapper;
|
||||
import com.ruoyi.booksystem.domain.Operations;
|
||||
import com.ruoyi.booksystem.service.IOperationsService;
|
||||
|
||||
/**
|
||||
* 当日操作Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@Service
|
||||
public class OperationsServiceImpl implements IOperationsService
|
||||
{
|
||||
@Autowired
|
||||
private OperationsMapper operationsMapper;
|
||||
|
||||
/**
|
||||
* 查询当日操作
|
||||
*
|
||||
* @param id 当日操作主键
|
||||
* @return 当日操作
|
||||
*/
|
||||
@Override
|
||||
public Operations selectOperationsById(Long id)
|
||||
{
|
||||
return operationsMapper.selectOperationsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当日操作列表
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 当日操作
|
||||
*/
|
||||
@Override
|
||||
public List<Operations> selectOperationsList(Operations operations)
|
||||
{
|
||||
return operationsMapper.selectOperationsList(operations);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当日操作
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOperations(Operations operations)
|
||||
{
|
||||
return operationsMapper.insertOperations(operations);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当日操作
|
||||
*
|
||||
* @param operations 当日操作
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOperations(Operations operations)
|
||||
{
|
||||
return operationsMapper.updateOperations(operations);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除当日操作
|
||||
*
|
||||
* @param ids 需要删除的当日操作主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOperationsByIds(Long[] ids)
|
||||
{
|
||||
return operationsMapper.deleteOperationsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当日操作信息
|
||||
*
|
||||
* @param id 当日操作主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOperationsById(Long id)
|
||||
{
|
||||
return operationsMapper.deleteOperationsById(id);
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
package com.ruoyi.booksystem.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.booksystem.mapper.StatisticsRemainMapper;
|
||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
||||
import com.ruoyi.booksystem.service.IStatisticsRemainService;
|
||||
|
||||
/**
|
||||
* 当日持仓统计Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@Service
|
||||
public class StatisticsRemainServiceImpl implements IStatisticsRemainService
|
||||
{
|
||||
@Autowired
|
||||
private StatisticsRemainMapper statisticsRemainMapper;
|
||||
|
||||
/**
|
||||
* 查询当日持仓统计
|
||||
*
|
||||
* @param id 当日持仓统计主键
|
||||
* @return 当日持仓统计
|
||||
*/
|
||||
@Override
|
||||
public StatisticsRemain selectStatisticsRemainById(Long id)
|
||||
{
|
||||
return statisticsRemainMapper.selectStatisticsRemainById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当日持仓统计列表
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 当日持仓统计
|
||||
*/
|
||||
@Override
|
||||
public List<StatisticsRemain> selectStatisticsRemainList(StatisticsRemain statisticsRemain)
|
||||
{
|
||||
return statisticsRemainMapper.selectStatisticsRemainList(statisticsRemain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当日持仓统计
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertStatisticsRemain(StatisticsRemain statisticsRemain)
|
||||
{
|
||||
return statisticsRemainMapper.insertStatisticsRemain(statisticsRemain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当日持仓统计
|
||||
*
|
||||
* @param statisticsRemain 当日持仓统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateStatisticsRemain(StatisticsRemain statisticsRemain)
|
||||
{
|
||||
return statisticsRemainMapper.updateStatisticsRemain(statisticsRemain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除当日持仓统计
|
||||
*
|
||||
* @param ids 需要删除的当日持仓统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatisticsRemainByIds(Long[] ids)
|
||||
{
|
||||
return statisticsRemainMapper.deleteStatisticsRemainByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当日持仓统计信息
|
||||
*
|
||||
* @param id 当日持仓统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatisticsRemainById(Long id)
|
||||
{
|
||||
return statisticsRemainMapper.deleteStatisticsRemainById(id);
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
package com.ruoyi.booksystem.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.booksystem.mapper.StatisticsMapper;
|
||||
import com.ruoyi.booksystem.domain.Statistics;
|
||||
import com.ruoyi.booksystem.service.IStatisticsService;
|
||||
|
||||
/**
|
||||
* 单笔操作统计Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@Service
|
||||
public class StatisticsServiceImpl implements IStatisticsService
|
||||
{
|
||||
@Autowired
|
||||
private StatisticsMapper statisticsMapper;
|
||||
|
||||
/**
|
||||
* 查询单笔操作统计
|
||||
*
|
||||
* @param id 单笔操作统计主键
|
||||
* @return 单笔操作统计
|
||||
*/
|
||||
@Override
|
||||
public Statistics selectStatisticsById(Long id)
|
||||
{
|
||||
return statisticsMapper.selectStatisticsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单笔操作统计列表
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 单笔操作统计
|
||||
*/
|
||||
@Override
|
||||
public List<Statistics> selectStatisticsList(Statistics statistics)
|
||||
{
|
||||
return statisticsMapper.selectStatisticsList(statistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单笔操作统计
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertStatistics(Statistics statistics)
|
||||
{
|
||||
return statisticsMapper.insertStatistics(statistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单笔操作统计
|
||||
*
|
||||
* @param statistics 单笔操作统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateStatistics(Statistics statistics)
|
||||
{
|
||||
return statisticsMapper.updateStatistics(statistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除单笔操作统计
|
||||
*
|
||||
* @param ids 需要删除的单笔操作统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatisticsByIds(Long[] ids)
|
||||
{
|
||||
return statisticsMapper.deleteStatisticsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单笔操作统计信息
|
||||
*
|
||||
* @param id 单笔操作统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatisticsById(Long id)
|
||||
{
|
||||
return statisticsMapper.deleteStatisticsById(id);
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
package com.ruoyi.booksystem.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.booksystem.mapper.StatisticsTotalMapper;
|
||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
||||
import com.ruoyi.booksystem.service.IStatisticsTotalService;
|
||||
|
||||
/**
|
||||
* 统计当日持仓Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@Service
|
||||
public class StatisticsTotalServiceImpl implements IStatisticsTotalService
|
||||
{
|
||||
@Autowired
|
||||
private StatisticsTotalMapper statisticsTotalMapper;
|
||||
|
||||
/**
|
||||
* 查询统计当日持仓
|
||||
*
|
||||
* @param id 统计当日持仓主键
|
||||
* @return 统计当日持仓
|
||||
*/
|
||||
@Override
|
||||
public StatisticsTotal selectStatisticsTotalById(Long id)
|
||||
{
|
||||
return statisticsTotalMapper.selectStatisticsTotalById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询统计当日持仓列表
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 统计当日持仓
|
||||
*/
|
||||
@Override
|
||||
public List<StatisticsTotal> selectStatisticsTotalList(StatisticsTotal statisticsTotal)
|
||||
{
|
||||
return statisticsTotalMapper.selectStatisticsTotalList(statisticsTotal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增统计当日持仓
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertStatisticsTotal(StatisticsTotal statisticsTotal)
|
||||
{
|
||||
return statisticsTotalMapper.insertStatisticsTotal(statisticsTotal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改统计当日持仓
|
||||
*
|
||||
* @param statisticsTotal 统计当日持仓
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateStatisticsTotal(StatisticsTotal statisticsTotal)
|
||||
{
|
||||
return statisticsTotalMapper.updateStatisticsTotal(statisticsTotal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除统计当日持仓
|
||||
*
|
||||
* @param ids 需要删除的统计当日持仓主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatisticsTotalByIds(Long[] ids)
|
||||
{
|
||||
return statisticsTotalMapper.deleteStatisticsTotalByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除统计当日持仓信息
|
||||
*
|
||||
* @param id 统计当日持仓主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatisticsTotalById(Long id)
|
||||
{
|
||||
return statisticsTotalMapper.deleteStatisticsTotalById(id);
|
||||
}
|
||||
}
|
||||
@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.booksystem.mapper.AccountMapper">
|
||||
|
||||
<resultMap type="Account" id="AccountResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tradeDay" column="trade_day" />
|
||||
<result property="weekDay" column="week_day" />
|
||||
<result property="assets" column="assets" />
|
||||
<result property="totalAssets" column="total_assets" />
|
||||
<result property="profit" column="profit" />
|
||||
<result property="assetsDiff" column="assets_diff" />
|
||||
<result property="totalDiff" column="total_diff" />
|
||||
<result property="userId" column="user_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAccountVo">
|
||||
select id, trade_day, week_day, assets, total_assets, profit, assets_diff, total_diff, user_id from account
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountList" parameterType="Account" resultMap="AccountResult">
|
||||
<include refid="selectAccountVo"/>
|
||||
<where>
|
||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
||||
<if test="assets != null "> and assets = #{assets}</if>
|
||||
<if test="totalAssets != null "> and total_assets = #{totalAssets}</if>
|
||||
<if test="profit != null "> and profit = #{profit}</if>
|
||||
<if test="assetsDiff != null "> and assets_diff = #{assetsDiff}</if>
|
||||
<if test="totalDiff != null "> and total_diff = #{totalDiff}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAccountById" parameterType="Long" resultMap="AccountResult">
|
||||
<include refid="selectAccountVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAccount" parameterType="Account" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into account
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeDay != null">trade_day,</if>
|
||||
<if test="weekDay != null">week_day,</if>
|
||||
<if test="assets != null">assets,</if>
|
||||
<if test="totalAssets != null">total_assets,</if>
|
||||
<if test="profit != null">profit,</if>
|
||||
<if test="assetsDiff != null">assets_diff,</if>
|
||||
<if test="totalDiff != null">total_diff,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeDay != null">#{tradeDay},</if>
|
||||
<if test="weekDay != null">#{weekDay},</if>
|
||||
<if test="assets != null">#{assets},</if>
|
||||
<if test="totalAssets != null">#{totalAssets},</if>
|
||||
<if test="profit != null">#{profit},</if>
|
||||
<if test="assetsDiff != null">#{assetsDiff},</if>
|
||||
<if test="totalDiff != null">#{totalDiff},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAccount" parameterType="Account">
|
||||
update account
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
||||
<if test="assets != null">assets = #{assets},</if>
|
||||
<if test="totalAssets != null">total_assets = #{totalAssets},</if>
|
||||
<if test="profit != null">profit = #{profit},</if>
|
||||
<if test="assetsDiff != null">assets_diff = #{assetsDiff},</if>
|
||||
<if test="totalDiff != null">total_diff = #{totalDiff},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAccountById" parameterType="Long">
|
||||
delete from account where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAccountByIds" parameterType="String">
|
||||
delete from account where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,131 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.booksystem.mapper.OperationsMapper">
|
||||
|
||||
<resultMap type="Operations" id="OperationsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="tradeDay" column="trade_day" />
|
||||
<result property="weekDay" column="week_day" />
|
||||
<result property="operate" column="operate" />
|
||||
<result property="dealPrice" column="deal_price" />
|
||||
<result property="volumn" column="volumn" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="tax" column="tax" />
|
||||
<result property="fee" column="fee" />
|
||||
<result property="other" column="other" />
|
||||
<result property="operateDiff" column="operate_diff" />
|
||||
<result property="preId" column="pre_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="dealLogic" column="deal_logic" />
|
||||
<result property="bz" column="bz" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOperationsVo">
|
||||
select id, code, name, trade_day, week_day, operate, deal_price, volumn, amount, tax, fee, other, operate_diff, pre_id, user_id, deal_logic, bz from operations
|
||||
</sql>
|
||||
|
||||
<select id="selectOperationsList" parameterType="Operations" resultMap="OperationsResult">
|
||||
<include refid="selectOperationsVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
||||
<if test="operate != null and operate != ''"> and operate = #{operate}</if>
|
||||
<if test="dealPrice != null "> and deal_price = #{dealPrice}</if>
|
||||
<if test="volumn != null "> and volumn = #{volumn}</if>
|
||||
<if test="amount != null "> and amount = #{amount}</if>
|
||||
<if test="tax != null "> and tax = #{tax}</if>
|
||||
<if test="fee != null "> and fee = #{fee}</if>
|
||||
<if test="other != null "> and other = #{other}</if>
|
||||
<if test="operateDiff != null "> and operate_diff = #{operateDiff}</if>
|
||||
<if test="preId != null "> and pre_id = #{preId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="dealLogic != null and dealLogic != ''"> and deal_logic = #{dealLogic}</if>
|
||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOperationsById" parameterType="Long" resultMap="OperationsResult">
|
||||
<include refid="selectOperationsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertOperations" parameterType="Operations" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into operations
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="tradeDay != null">trade_day,</if>
|
||||
<if test="weekDay != null">week_day,</if>
|
||||
<if test="operate != null and operate != ''">operate,</if>
|
||||
<if test="dealPrice != null">deal_price,</if>
|
||||
<if test="volumn != null">volumn,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="tax != null">tax,</if>
|
||||
<if test="fee != null">fee,</if>
|
||||
<if test="other != null">other,</if>
|
||||
<if test="operateDiff != null">operate_diff,</if>
|
||||
<if test="preId != null">pre_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="dealLogic != null">deal_logic,</if>
|
||||
<if test="bz != null">bz,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="tradeDay != null">#{tradeDay},</if>
|
||||
<if test="weekDay != null">#{weekDay},</if>
|
||||
<if test="operate != null and operate != ''">#{operate},</if>
|
||||
<if test="dealPrice != null">#{dealPrice},</if>
|
||||
<if test="volumn != null">#{volumn},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="tax != null">#{tax},</if>
|
||||
<if test="fee != null">#{fee},</if>
|
||||
<if test="other != null">#{other},</if>
|
||||
<if test="operateDiff != null">#{operateDiff},</if>
|
||||
<if test="preId != null">#{preId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="dealLogic != null">#{dealLogic},</if>
|
||||
<if test="bz != null">#{bz},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOperations" parameterType="Operations">
|
||||
update operations
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
||||
<if test="operate != null and operate != ''">operate = #{operate},</if>
|
||||
<if test="dealPrice != null">deal_price = #{dealPrice},</if>
|
||||
<if test="volumn != null">volumn = #{volumn},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="tax != null">tax = #{tax},</if>
|
||||
<if test="fee != null">fee = #{fee},</if>
|
||||
<if test="other != null">other = #{other},</if>
|
||||
<if test="operateDiff != null">operate_diff = #{operateDiff},</if>
|
||||
<if test="preId != null">pre_id = #{preId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="dealLogic != null">deal_logic = #{dealLogic},</if>
|
||||
<if test="bz != null">bz = #{bz},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOperationsById" parameterType="Long">
|
||||
delete from operations where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOperationsByIds" parameterType="String">
|
||||
delete from operations where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.booksystem.mapper.StatisticsMapper">
|
||||
|
||||
<resultMap type="Statistics" id="StatisticsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="tradeDay" column="trade_day" />
|
||||
<result property="weekDay" column="week_day" />
|
||||
<result property="operationsId" column="operations_id" />
|
||||
<result property="profit" column="profit" />
|
||||
<result property="diff" column="diff" />
|
||||
<result property="operateionId" column="operateion_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="bz" column="bz" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStatisticsVo">
|
||||
select id, code, name, trade_day, week_day, operations_id, profit, diff, operateion_id, user_id, bz from statistics
|
||||
</sql>
|
||||
|
||||
<select id="selectStatisticsList" parameterType="Statistics" resultMap="StatisticsResult">
|
||||
<include refid="selectStatisticsVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
||||
<if test="operationsId != null and operationsId != ''"> and operations_id = #{operationsId}</if>
|
||||
<if test="profit != null "> and profit = #{profit}</if>
|
||||
<if test="diff != null "> and diff = #{diff}</if>
|
||||
<if test="operateionId != null "> and operateion_id = #{operateionId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStatisticsById" parameterType="Long" resultMap="StatisticsResult">
|
||||
<include refid="selectStatisticsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertStatistics" parameterType="Statistics" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into statistics
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="tradeDay != null">trade_day,</if>
|
||||
<if test="weekDay != null">week_day,</if>
|
||||
<if test="operationsId != null and operationsId != ''">operations_id,</if>
|
||||
<if test="profit != null">profit,</if>
|
||||
<if test="diff != null">diff,</if>
|
||||
<if test="operateionId != null">operateion_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="bz != null">bz,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="tradeDay != null">#{tradeDay},</if>
|
||||
<if test="weekDay != null">#{weekDay},</if>
|
||||
<if test="operationsId != null and operationsId != ''">#{operationsId},</if>
|
||||
<if test="profit != null">#{profit},</if>
|
||||
<if test="diff != null">#{diff},</if>
|
||||
<if test="operateionId != null">#{operateionId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="bz != null">#{bz},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStatistics" parameterType="Statistics">
|
||||
update statistics
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
||||
<if test="operationsId != null and operationsId != ''">operations_id = #{operationsId},</if>
|
||||
<if test="profit != null">profit = #{profit},</if>
|
||||
<if test="diff != null">diff = #{diff},</if>
|
||||
<if test="operateionId != null">operateion_id = #{operateionId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="bz != null">bz = #{bz},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStatisticsById" parameterType="Long">
|
||||
delete from statistics where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStatisticsByIds" parameterType="String">
|
||||
delete from statistics where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.booksystem.mapper.StatisticsRemainMapper">
|
||||
|
||||
<resultMap type="StatisticsRemain" id="StatisticsRemainResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="tradeDay" column="trade_day" />
|
||||
<result property="weekDay" column="week_day" />
|
||||
<result property="totalProfit" column="total_profit" />
|
||||
<result property="totalDiff" column="total_diff" />
|
||||
<result property="totalDiffOverall" column="total_diff_overall" />
|
||||
<result property="remaining" column="remaining" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="bz" column="bz" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStatisticsRemainVo">
|
||||
select id, code, name, trade_day, week_day, total_profit, total_diff, total_diff_overall, remaining, user_id, bz from statistics_remain
|
||||
</sql>
|
||||
|
||||
<select id="selectStatisticsRemainList" parameterType="StatisticsRemain" resultMap="StatisticsRemainResult">
|
||||
<include refid="selectStatisticsRemainVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
||||
<if test="totalProfit != null "> and total_profit = #{totalProfit}</if>
|
||||
<if test="totalDiff != null "> and total_diff = #{totalDiff}</if>
|
||||
<if test="totalDiffOverall != null "> and total_diff_overall = #{totalDiffOverall}</if>
|
||||
<if test="remaining != null "> and remaining = #{remaining}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStatisticsRemainById" parameterType="Long" resultMap="StatisticsRemainResult">
|
||||
<include refid="selectStatisticsRemainVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertStatisticsRemain" parameterType="StatisticsRemain" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into statistics_remain
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="tradeDay != null">trade_day,</if>
|
||||
<if test="weekDay != null">week_day,</if>
|
||||
<if test="totalProfit != null">total_profit,</if>
|
||||
<if test="totalDiff != null">total_diff,</if>
|
||||
<if test="totalDiffOverall != null">total_diff_overall,</if>
|
||||
<if test="remaining != null">remaining,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="bz != null">bz,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="tradeDay != null">#{tradeDay},</if>
|
||||
<if test="weekDay != null">#{weekDay},</if>
|
||||
<if test="totalProfit != null">#{totalProfit},</if>
|
||||
<if test="totalDiff != null">#{totalDiff},</if>
|
||||
<if test="totalDiffOverall != null">#{totalDiffOverall},</if>
|
||||
<if test="remaining != null">#{remaining},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="bz != null">#{bz},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStatisticsRemain" parameterType="StatisticsRemain">
|
||||
update statistics_remain
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
||||
<if test="totalProfit != null">total_profit = #{totalProfit},</if>
|
||||
<if test="totalDiff != null">total_diff = #{totalDiff},</if>
|
||||
<if test="totalDiffOverall != null">total_diff_overall = #{totalDiffOverall},</if>
|
||||
<if test="remaining != null">remaining = #{remaining},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="bz != null">bz = #{bz},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStatisticsRemainById" parameterType="Long">
|
||||
delete from statistics_remain where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStatisticsRemainByIds" parameterType="String">
|
||||
delete from statistics_remain where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,131 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.booksystem.mapper.StatisticsTotalMapper">
|
||||
|
||||
<resultMap type="StatisticsTotal" id="StatisticsTotalResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="startTradeDay" column="start_trade_day" />
|
||||
<result property="endTradeDay" column="end_trade_day" />
|
||||
<result property="totalProfit" column="total_profit" />
|
||||
<result property="totalDiff" column="total_diff" />
|
||||
<result property="startPrice" column="start_price" />
|
||||
<result property="endPrice" column="end_price" />
|
||||
<result property="volumnTotal" column="volumn_total" />
|
||||
<result property="amountTotal" column="amount_total" />
|
||||
<result property="operateTimes" column="operate_times" />
|
||||
<result property="fee" column="fee" />
|
||||
<result property="tax" column="tax" />
|
||||
<result property="other" column="other" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="bz" column="bz" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStatisticsTotalVo">
|
||||
select id, code, name, start_trade_day, end_trade_day, total_profit, total_diff, start_price, end_price, volumn_total, amount_total, operate_times, fee, tax, other, user_id, bz from statistics_total
|
||||
</sql>
|
||||
|
||||
<select id="selectStatisticsTotalList" parameterType="StatisticsTotal" resultMap="StatisticsTotalResult">
|
||||
<include refid="selectStatisticsTotalVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="startTradeDay != null "> and start_trade_day = #{startTradeDay}</if>
|
||||
<if test="endTradeDay != null "> and end_trade_day = #{endTradeDay}</if>
|
||||
<if test="totalProfit != null "> and total_profit = #{totalProfit}</if>
|
||||
<if test="totalDiff != null "> and total_diff = #{totalDiff}</if>
|
||||
<if test="startPrice != null "> and start_price = #{startPrice}</if>
|
||||
<if test="endPrice != null "> and end_price = #{endPrice}</if>
|
||||
<if test="volumnTotal != null "> and volumn_total = #{volumnTotal}</if>
|
||||
<if test="amountTotal != null "> and amount_total = #{amountTotal}</if>
|
||||
<if test="operateTimes != null "> and operate_times = #{operateTimes}</if>
|
||||
<if test="fee != null "> and fee = #{fee}</if>
|
||||
<if test="tax != null "> and tax = #{tax}</if>
|
||||
<if test="other != null "> and other = #{other}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStatisticsTotalById" parameterType="Long" resultMap="StatisticsTotalResult">
|
||||
<include refid="selectStatisticsTotalVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertStatisticsTotal" parameterType="StatisticsTotal" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into statistics_total
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="startTradeDay != null">start_trade_day,</if>
|
||||
<if test="endTradeDay != null">end_trade_day,</if>
|
||||
<if test="totalProfit != null">total_profit,</if>
|
||||
<if test="totalDiff != null">total_diff,</if>
|
||||
<if test="startPrice != null">start_price,</if>
|
||||
<if test="endPrice != null">end_price,</if>
|
||||
<if test="volumnTotal != null">volumn_total,</if>
|
||||
<if test="amountTotal != null">amount_total,</if>
|
||||
<if test="operateTimes != null">operate_times,</if>
|
||||
<if test="fee != null">fee,</if>
|
||||
<if test="tax != null">tax,</if>
|
||||
<if test="other != null">other,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="bz != null">bz,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="startTradeDay != null">#{startTradeDay},</if>
|
||||
<if test="endTradeDay != null">#{endTradeDay},</if>
|
||||
<if test="totalProfit != null">#{totalProfit},</if>
|
||||
<if test="totalDiff != null">#{totalDiff},</if>
|
||||
<if test="startPrice != null">#{startPrice},</if>
|
||||
<if test="endPrice != null">#{endPrice},</if>
|
||||
<if test="volumnTotal != null">#{volumnTotal},</if>
|
||||
<if test="amountTotal != null">#{amountTotal},</if>
|
||||
<if test="operateTimes != null">#{operateTimes},</if>
|
||||
<if test="fee != null">#{fee},</if>
|
||||
<if test="tax != null">#{tax},</if>
|
||||
<if test="other != null">#{other},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="bz != null">#{bz},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStatisticsTotal" parameterType="StatisticsTotal">
|
||||
update statistics_total
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="startTradeDay != null">start_trade_day = #{startTradeDay},</if>
|
||||
<if test="endTradeDay != null">end_trade_day = #{endTradeDay},</if>
|
||||
<if test="totalProfit != null">total_profit = #{totalProfit},</if>
|
||||
<if test="totalDiff != null">total_diff = #{totalDiff},</if>
|
||||
<if test="startPrice != null">start_price = #{startPrice},</if>
|
||||
<if test="endPrice != null">end_price = #{endPrice},</if>
|
||||
<if test="volumnTotal != null">volumn_total = #{volumnTotal},</if>
|
||||
<if test="amountTotal != null">amount_total = #{amountTotal},</if>
|
||||
<if test="operateTimes != null">operate_times = #{operateTimes},</if>
|
||||
<if test="fee != null">fee = #{fee},</if>
|
||||
<if test="tax != null">tax = #{tax},</if>
|
||||
<if test="other != null">other = #{other},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="bz != null">bz = #{bz},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStatisticsTotalById" parameterType="Long">
|
||||
delete from statistics_total where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStatisticsTotalByIds" parameterType="String">
|
||||
delete from statistics_total where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,109 +0,0 @@
|
||||
package com.ruoyi.booksystem.service.impl;
|
||||
|
||||
import com.ruoyi.booksystem.domain.Account;
|
||||
import com.ruoyi.booksystem.mapper.AccountMapper;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.mockito.ArgumentMatchers.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class AccountServiceImplTest {
|
||||
|
||||
@InjectMocks
|
||||
private AccountServiceImpl accountService;
|
||||
|
||||
@Mock
|
||||
private AccountMapper accountMapper;
|
||||
|
||||
private Account testAccount;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
testAccount = new Account();
|
||||
testAccount.setId(1L);
|
||||
testAccount.setUserId(100L);
|
||||
testAccount.setWeekDay("Monday");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSelectAccountById() {
|
||||
// Given
|
||||
when(accountMapper.selectAccountById(1L)).thenReturn(testAccount);
|
||||
|
||||
// When
|
||||
Account result = accountService.selectAccountById(1L);
|
||||
|
||||
// Then
|
||||
assertNotNull(result);
|
||||
assertEquals(1L, result.getId());
|
||||
assertEquals(100L, result.getUserId());
|
||||
verify(accountMapper, times(1)).selectAccountById(1L);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSelectAccountList() {
|
||||
// Given
|
||||
List<Account> accountList = Arrays.asList(testAccount);
|
||||
when(accountMapper.selectAccountList(any(Account.class))).thenReturn(accountList);
|
||||
|
||||
// When
|
||||
Account query = new Account();
|
||||
query.setUserId(100L);
|
||||
List<Account> result = accountService.selectAccountList(query);
|
||||
|
||||
// Then
|
||||
assertNotNull(result);
|
||||
assertEquals(1, result.size());
|
||||
assertEquals(100L, result.get(0).getUserId());
|
||||
verify(accountMapper, times(1)).selectAccountList(query);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testInsertAccount() {
|
||||
// Given
|
||||
when(accountMapper.insertAccount(any(Account.class))).thenReturn(1);
|
||||
|
||||
// When
|
||||
int result = accountService.insertAccount(testAccount);
|
||||
|
||||
// Then
|
||||
assertEquals(1, result);
|
||||
verify(accountMapper, times(1)).insertAccount(testAccount);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testUpdateAccount() {
|
||||
// Given
|
||||
when(accountMapper.updateAccount(any(Account.class))).thenReturn(1);
|
||||
|
||||
// When
|
||||
int result = accountService.updateAccount(testAccount);
|
||||
|
||||
// Then
|
||||
assertEquals(1, result);
|
||||
verify(accountMapper, times(1)).updateAccount(testAccount);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testDeleteAccountById() {
|
||||
// Given
|
||||
when(accountMapper.deleteAccountById(1L)).thenReturn(1);
|
||||
|
||||
// When
|
||||
int result = accountService.deleteAccountById(1L);
|
||||
|
||||
// Then
|
||||
assertEquals(1, result);
|
||||
verify(accountMapper, times(1)).deleteAccountById(1L);
|
||||
}
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||
|
||||
<module name="Checker">
|
||||
<property name="charset" value="UTF-8"/>
|
||||
<property name="severity" value="warning"/>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<!-- 命名规范 -->
|
||||
<module name="ConstantName"/>
|
||||
<module name="LocalFinalVariableName"/>
|
||||
<module name="LocalVariableName"/>
|
||||
<module name="MemberName"/>
|
||||
<module name="MethodName"/>
|
||||
<module name="PackageName"/>
|
||||
<module name="ParameterName"/>
|
||||
<module name="StaticVariableName"/>
|
||||
<module name="TypeName"/>
|
||||
|
||||
<!-- 导入规范 -->
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="IllegalImport"/>
|
||||
<module name="RedundantImport"/>
|
||||
<module name="UnusedImports"/>
|
||||
|
||||
<!-- 长度限制 -->
|
||||
<module name="LineLength">
|
||||
<property name="max" value="120"/>
|
||||
</module>
|
||||
<module name="MethodLength">
|
||||
<property name="max" value="50"/>
|
||||
</module>
|
||||
|
||||
<!-- 空格 -->
|
||||
<module name="EmptyLineSeparator"/>
|
||||
<module name="GenericWhitespace"/>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="NoWhitespaceAfter"/>
|
||||
<module name="NoWhitespaceBefore"/>
|
||||
<module name="OperatorWrap"/>
|
||||
<module name="ParenPad"/>
|
||||
<module name="TypecastParenPad"/>
|
||||
<module name="WhitespaceAfter"/>
|
||||
<module name="WhitespaceAround"/>
|
||||
</module>
|
||||
</module>
|
||||
Binary file not shown.
@ -1,48 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: ry-vue
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mysql-data:/var/lib/mysql
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
|
||||
redis:
|
||||
image: redis:7
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
|
||||
backend:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
SPRING_DATASOURCE_USERNAME: root
|
||||
SPRING_DATASOURCE_PASSWORD: root
|
||||
SPRING_REDIS_HOST: redis
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
|
||||
frontend:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./ruoyi-ui-next/dist:/usr/share/nginx/html
|
||||
- ./scripts/deploy/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
mysql-data:
|
||||
redis-data:
|
||||
@ -1,61 +0,0 @@
|
||||
# RuoYi-Vue Git 提交规范
|
||||
|
||||
## 1. Conventional Commits
|
||||
|
||||
### 1.1 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
<body>
|
||||
|
||||
<footer>
|
||||
```
|
||||
|
||||
### 1.2 Type 类型
|
||||
- `feat`: 新功能
|
||||
- `fix`: Bug 修复
|
||||
- `docs`: 文档更新
|
||||
- `style`: 代码格式(不影响代码运行)
|
||||
- `refactor`: 重构
|
||||
- `perf`: 性能优化
|
||||
- `test`: 测试相关
|
||||
- `build`: 构建系统或外部依赖
|
||||
- `ci`: CI 配置文件
|
||||
- `chore`: 其他修改
|
||||
- `revert`: 回滚提交
|
||||
|
||||
### 1.3 示例
|
||||
```bash
|
||||
# 新功能
|
||||
feat(user): add user export function
|
||||
|
||||
# Bug 修复
|
||||
fix(login): fix 401 error on token expiration
|
||||
|
||||
# 文档更新
|
||||
docs(api): update API documentation
|
||||
|
||||
# 重构
|
||||
refactor(user): refactor user service layer
|
||||
|
||||
# 性能优化
|
||||
perf(query): optimize database query performance
|
||||
```
|
||||
|
||||
## 2. 分支管理
|
||||
|
||||
### 2.1 分支命名
|
||||
- 功能分支:`feature/YYYYMMDD/feature-name`
|
||||
- 修复分支:`hotfix/YYYYMMDD/bug-name`
|
||||
- 重构分支:`refactor/YYYYMMDD/module-name`
|
||||
|
||||
### 2.2 分支策略
|
||||
- `main`: 生产环境代码
|
||||
- `develop`: 开发环境代码
|
||||
- `feature/*`: 功能开发分支
|
||||
- `hotfix/*`: 紧急修复分支
|
||||
|
||||
## 3. 提交频率
|
||||
- 每个功能点至少 1 次提交
|
||||
- 不要累积大量未提交代码
|
||||
- 提交信息清晰明了
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
change_name: add-performance-monitor
|
||||
phase: archive
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: false
|
||||
workflow: full
|
||||
@ -1,25 +0,0 @@
|
||||
# P1 优化:性能监控
|
||||
|
||||
## 目标
|
||||
|
||||
为 RuoYi-Vue 后端添加接口性能监控和慢查询日志,识别性能瓶颈。
|
||||
|
||||
## 范围
|
||||
|
||||
- 接口响应时间监控
|
||||
- 慢 SQL 查询日志
|
||||
- 性能统计报表
|
||||
- 告警机制
|
||||
|
||||
## 技术栈
|
||||
|
||||
- AOP 切面
|
||||
- Micrometer
|
||||
- Spring Boot Actuator
|
||||
- 自定义注解
|
||||
|
||||
## 验收标准
|
||||
|
||||
- 所有接口响应时间记录
|
||||
- 慢查询日志(> 1 秒)
|
||||
- 性能统计接口可访问
|
||||
@ -1,30 +0,0 @@
|
||||
# Tasks: 性能监控
|
||||
|
||||
## Task 1: 监控配置
|
||||
|
||||
- [ ] 1.1 添加 Micrometer 和 Actuator 依赖
|
||||
- [ ] 1.2 配置监控端点
|
||||
- [ ] 1.3 创建性能监控注解
|
||||
|
||||
## Task 2: AOP 性能监控
|
||||
|
||||
- [ ] 2.1 创建性能监控切面
|
||||
- [ ] 2.2 记录接口响应时间
|
||||
- [ ] 2.3 慢查询日志(> 1 秒)
|
||||
|
||||
## Task 3: 性能统计
|
||||
|
||||
- [ ] 3.1 创建性能统计服务
|
||||
- [ ] 3.2 性能监控接口
|
||||
- [ ] 3.3 慢查询日志查询
|
||||
|
||||
## Task 4: 告警机制
|
||||
|
||||
- [ ] 4.1 慢接口告警
|
||||
- [ ] 4.2 异常告警
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 所有接口响应时间记录
|
||||
- [ ] 慢查询日志(> 1 秒)
|
||||
- [ ] 性能统计接口可访问
|
||||
@ -1,7 +0,0 @@
|
||||
change_name: add-unit-tests
|
||||
phase: archive
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: false
|
||||
workflow: full
|
||||
@ -1 +0,0 @@
|
||||
schema: spec-driven
|
||||
@ -1,35 +0,0 @@
|
||||
# Tasks: 完善单元测试
|
||||
|
||||
## Task 1: 测试环境搭建
|
||||
|
||||
- [ ] 1.1 添加 JUnit 5 和 Mockito 依赖
|
||||
- [ ] 1.2 配置测试基础类
|
||||
- [ ] 1.3 创建测试目录结构
|
||||
|
||||
## Task 2: 系统管理模块测试
|
||||
|
||||
- [ ] 2.1 SysUserService 测试
|
||||
- [ ] 2.2 SysRoleService 测试
|
||||
- [ ] 2.3 SysMenuService 测试
|
||||
|
||||
## Task 3: 业务模块测试
|
||||
|
||||
- [ ] 3.1 AccountService 测试
|
||||
- [ ] 3.2 BookService 测试
|
||||
|
||||
## Task 4: 工具类测试
|
||||
|
||||
- [ ] 4.1 字符串工具类测试
|
||||
- [ ] 4.2 日期工具类测试
|
||||
- [ ] 4.3 验证工具类测试
|
||||
|
||||
## Task 5: 集成测试
|
||||
|
||||
- [ ] 5.1 Controller 层集成测试
|
||||
- [ ] 5.2 API 接口集成测试
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 测试覆盖率 > 70%
|
||||
- [ ] 所有测试通过
|
||||
- [ ] 生成测试报告
|
||||
@ -1,7 +0,0 @@
|
||||
change_name: optimize-cache-strategy
|
||||
phase: archive
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: false
|
||||
workflow: full
|
||||
@ -1,34 +0,0 @@
|
||||
# Tasks: 优化缓存策略
|
||||
|
||||
## Task 1: 缓存配置
|
||||
|
||||
- [ ] 1.1 添加 Spring Cache 和 Redis 依赖
|
||||
- [ ] 1.2 配置 Redis 连接
|
||||
- [ ] 1.3 配置缓存管理器
|
||||
|
||||
## Task 2: 字典缓存
|
||||
|
||||
- [ ] 2.1 字典类型缓存
|
||||
- [ ] 2.2 字典数据缓存
|
||||
- [ ] 2.3 缓存更新机制
|
||||
|
||||
## Task 3: 配置参数缓存
|
||||
|
||||
- [ ] 3.1 系统配置缓存
|
||||
- [ ] 3.2 缓存刷新机制
|
||||
|
||||
## Task 4: 用户和菜单缓存
|
||||
|
||||
- [ ] 4.1 用户信息缓存
|
||||
- [ ] 4.2 菜单数据缓存
|
||||
|
||||
## Task 5: 缓存监控
|
||||
|
||||
- [ ] 5.1 缓存命中率统计
|
||||
- [ ] 5.2 缓存清理接口
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 字典查询缓存命中率 > 90%
|
||||
- [ ] 常用接口响应时间 < 100ms
|
||||
- [ ] 缓存更新机制完整
|
||||
@ -1,8 +0,0 @@
|
||||
change_name: refactor-architecture-analysis
|
||||
phase: archive
|
||||
design_doc: docs/superpowers/specs/2026-06-28-ruoyi-architecture-analysis-design.md
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: true
|
||||
workflow: full
|
||||
@ -1 +0,0 @@
|
||||
schema: spec-driven
|
||||
@ -1,8 +0,0 @@
|
||||
change_name: refactor-backend-api
|
||||
phase: archive
|
||||
design_doc: docs/superpowers/specs/2026-06-28-backend-api-design.md
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: true
|
||||
workflow: full
|
||||
@ -1 +0,0 @@
|
||||
schema: spec-driven
|
||||
@ -1,8 +0,0 @@
|
||||
change_name: refactor-coding-standards
|
||||
phase: archive
|
||||
design_doc: docs/superpowers/specs/2026-06-28-coding-standards-design.md
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: true
|
||||
workflow: full
|
||||
@ -1 +0,0 @@
|
||||
schema: spec-driven
|
||||
@ -1,31 +0,0 @@
|
||||
# Proposal: 编码规范制定与实施
|
||||
|
||||
## Why
|
||||
现有代码缺乏统一规范:
|
||||
1. 代码风格不一致
|
||||
2. 命名不规范
|
||||
3. 注释缺失
|
||||
4. 缺乏 Git 提交规范
|
||||
5. 代码质量参差不齐
|
||||
|
||||
## What
|
||||
制定并实施编码规范:
|
||||
1. Java 编码规范
|
||||
2. 前端编码规范
|
||||
3. Git 提交规范
|
||||
4. Code Review 流程
|
||||
5. 自动化检查工具
|
||||
|
||||
## Success Criteria
|
||||
1. 编码规范文档完整
|
||||
2. 代码检查工具集成
|
||||
3. CI/CD 自动化检查
|
||||
4. 团队 100% 遵循规范
|
||||
5. 代码质量提升
|
||||
|
||||
## Non-Goals
|
||||
- 不改变业务逻辑
|
||||
- 不强制重构历史代码
|
||||
|
||||
## Dependencies
|
||||
无
|
||||
@ -1,31 +0,0 @@
|
||||
# Tasks: 编码规范制定与实施
|
||||
|
||||
## 1. 规范文档
|
||||
- [ ] 1.1 编写 Java 编码规范
|
||||
- [ ] 1.2 编写前端编码规范
|
||||
- [ ] 1.3 编写 Git 提交规范
|
||||
- [ ] 1.4 编写 Code Review 清单
|
||||
|
||||
## 2. 工具集成
|
||||
- [ ] 2.1 配置 ESLint + Prettier
|
||||
- [ ] 2.2 配置 Checkstyle
|
||||
- [ ] 2.3 配置 Husky pre-commit
|
||||
- [ ] 2.4 配置 CI/CD 检查
|
||||
|
||||
## 3. 代码应用
|
||||
- [ ] 3.1 应用前端规范到现有代码
|
||||
- [ ] 3.2 应用后端规范到现有代码
|
||||
- [ ] 3.3 修复主要规范问题
|
||||
- [ ] 3.4 添加代码模板
|
||||
|
||||
## 4. 培训和文档
|
||||
- [ ] 4.1 编写规范使用指南
|
||||
- [ ] 4.2 输出培训材料
|
||||
- [ ] 4.3 配置 IDE 支持
|
||||
- [ ] 4.4 输出规范文档
|
||||
|
||||
## 验收标准
|
||||
- [ ] 规范文档完整可读
|
||||
- [ ] 自动化工具正常工作
|
||||
- [ ] CI/CD 检查通过
|
||||
- [ ] IDE 配置完成
|
||||
@ -1,8 +0,0 @@
|
||||
change_name: refactor-database-optimization
|
||||
phase: archive
|
||||
design_doc: docs/superpowers/specs/2026-06-28-database-optimization-design.md
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: false
|
||||
workflow: full
|
||||
@ -1 +0,0 @@
|
||||
schema: spec-driven
|
||||
@ -1,31 +0,0 @@
|
||||
# Proposal: 数据库优化与迁移
|
||||
|
||||
## Why
|
||||
现有数据库存在以下问题:
|
||||
1. 表结构设计不合理
|
||||
2. 缺乏索引优化
|
||||
3. 字段冗余
|
||||
4. 缺乏数据迁移方案
|
||||
5. 查询性能低下
|
||||
|
||||
## What
|
||||
优化数据库设计并实施迁移:
|
||||
1. 重新设计表结构
|
||||
2. 添加索引优化
|
||||
3. 规范化字段
|
||||
4. 完整数据迁移方案
|
||||
5. 迁移回滚方案
|
||||
|
||||
## Success Criteria
|
||||
1. 表结构符合第三范式
|
||||
2. 查询性能提升 50%
|
||||
3. 数据迁移 100% 完整
|
||||
4. 迁移可回滚
|
||||
5. 无数据丢失
|
||||
|
||||
## Non-Goals
|
||||
- 不改变业务逻辑
|
||||
- 不引入新的数据库类型
|
||||
|
||||
## Dependencies
|
||||
- 依赖 refactor-backend-api 的后端适配
|
||||
@ -1,38 +0,0 @@
|
||||
# Tasks: 数据库优化与迁移
|
||||
|
||||
## 1. 数据库分析
|
||||
- [ ] 1.1 梳理现有表结构
|
||||
- [ ] 1.2 分析表关系和约束
|
||||
- [ ] 1.3 分析索引使用情况
|
||||
- [ ] 1.4 识别性能瓶颈
|
||||
|
||||
## 2. 新表结构设计
|
||||
- [ ] 2.1 设计系统管理表
|
||||
- [ ] 2.2 设计 book-system 表
|
||||
- [ ] 2.3 设计索引策略
|
||||
- [ ] 2.4 输出 SQL DDL 脚本
|
||||
|
||||
## 3. 数据迁移方案
|
||||
- [ ] 3.1 编写迁移脚本
|
||||
- [ ] 3.2 编写数据转换逻辑
|
||||
- [ ] 3.3 编写验证脚本
|
||||
- [ ] 3.4 编写回滚脚本
|
||||
|
||||
## 4. 迁移实施
|
||||
- [ ] 4.1 备份现有数据库
|
||||
- [ ] 4.2 执行迁移脚本
|
||||
- [ ] 4.3 验证数据完整性
|
||||
- [ ] 4.4 性能测试
|
||||
|
||||
## 5. 监控和优化
|
||||
- [ ] 5.1 添加查询性能监控
|
||||
- [ ] 5.2 优化慢查询
|
||||
- [ ] 5.3 添加数据库备份策略
|
||||
- [ ] 5.4 输出数据库文档
|
||||
|
||||
## 验收标准
|
||||
- [ ] 表结构符合 3NF
|
||||
- [ ] 迁移脚本可执行
|
||||
- [ ] 数据 100% 完整
|
||||
- [ ] 回滚脚本可用
|
||||
- [ ] 查询性能提升 50%
|
||||
@ -1,8 +0,0 @@
|
||||
change_name: refactor-frontend-modernization
|
||||
phase: archive
|
||||
design_doc: docs/superpowers/specs/2026-06-28-frontend-modernization-design.md
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: pass
|
||||
archived: true
|
||||
workflow: full
|
||||
@ -1 +0,0 @@
|
||||
schema: spec-driven
|
||||
@ -1,7 +0,0 @@
|
||||
change_name: refactor-ruoyi-system
|
||||
phase: open
|
||||
auto_transition: true
|
||||
build_pause: null
|
||||
verify_result: null
|
||||
archived: false
|
||||
workflow: full
|
||||
@ -1,75 +0,0 @@
|
||||
package com.ruoyi.web.controller.api.v1;
|
||||
|
||||
import com.ruoyi.common.annotation.ApiVersion;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户管理 v1 版本
|
||||
*/
|
||||
@Api(tags = "用户管理 v1")
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/users")
|
||||
@ApiVersion("v1")
|
||||
public class UserV1Controller extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询用户列表 v1
|
||||
*/
|
||||
@ApiOperation("查询用户列表 v1")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysUser user) {
|
||||
startPage();
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户详细信息 v1
|
||||
*/
|
||||
@ApiOperation("获取用户详细信息 v1")
|
||||
@GetMapping("/{userId}")
|
||||
public AjaxResult getInfo(@PathVariable Long userId) {
|
||||
return AjaxResult.success(userService.selectUserById(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户 v1
|
||||
*/
|
||||
@ApiOperation("新增用户 v1")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysUser user) {
|
||||
return toAjax(userService.insertUser(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户 v1
|
||||
*/
|
||||
@ApiOperation("修改用户 v1")
|
||||
@PutMapping("/{userId}")
|
||||
public AjaxResult edit(@PathVariable Long userId, @RequestBody SysUser user) {
|
||||
user.setUserId(userId);
|
||||
return toAjax(userService.updateUser(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户 v1
|
||||
*/
|
||||
@ApiOperation("删除用户 v1")
|
||||
@DeleteMapping("/{userIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] userIds) {
|
||||
return toAjax(userService.deleteUserByIds(userIds));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue