mirror of
https://gitee.com/mmsAdmin/mms
synced 2025-12-06 08:58:55 +08:00
新增:文档模块
This commit is contained in:
parent
9366c174f7
commit
e479fe9a5f
103
mms-docs/mms-doc-admin/.gitignore
vendored
Normal file
103
mms-docs/mms-doc-admin/.gitignore
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# Eclipse & IntelliJ IDEA
|
||||
.classpath
|
||||
.settings/
|
||||
.idea
|
||||
.idea/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
.settings
|
||||
.project
|
||||
.flattened-pom.xml
|
||||
|
||||
# Maven
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.mvn/timing.properties
|
||||
.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
# Gradle
|
||||
.gradle
|
||||
.gradle/
|
||||
build/
|
||||
**/build/
|
||||
bin/
|
||||
!src/**/build/
|
||||
gradle-app.setting
|
||||
!gradle-wrapper.jar
|
||||
.gradletasknamecache
|
||||
gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
# VS Code
|
||||
.vscode/
|
||||
|
||||
# STS
|
||||
.apt_generated
|
||||
.factorypath
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
# NetBeans
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
# DB
|
||||
/script/db/.back_sxpcwlkj/
|
||||
/script/db/.version_sxpcwlkj/
|
||||
!/script/db/.back_sxpcwlkj/
|
||||
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
27
mms-docs/mms-doc-admin/pom.xml
Normal file
27
mms-docs/mms-doc-admin/pom.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms-docs</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mms-doc-admin</artifactId>
|
||||
<description>文档Admin系统模块</description>
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms-framework</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,145 @@
|
||||
package com.sxpcwlkj.docAdmin.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.sxpcwlkj.common.annotation.MssSafety;
|
||||
import com.sxpcwlkj.common.code.controller.BaseController;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.R;
|
||||
import com.sxpcwlkj.common.code.entity.PrintObject;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import com.sxpcwlkj.framework.utils.ExcelUtil;
|
||||
import com.sxpcwlkj.common.code.entity.ThreeQueryBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocAuthorizeUserBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocAuthorizeUserVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocAuthorizeUserExport;
|
||||
import com.sxpcwlkj.docAdmin.service.DocAuthorizeUserService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档授权用户
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("docAdmin/docAuthorizeUser")
|
||||
public class DocAuthorizeUserController extends BaseController{
|
||||
private final DocAuthorizeUserService baseService;
|
||||
|
||||
/**
|
||||
* 分页列表-文档授权用户
|
||||
* @param bo 查询条件
|
||||
* @return 分页对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo<DocAuthorizeUserVo> listPage(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocAuthorizeUserBo bo){
|
||||
return baseService.selectListVoPage(bo, bo.getPageQuery());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询-文档授权用户
|
||||
* @param id ID
|
||||
* @return 对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DocAuthorizeUserVo> queryById(@PathVariable String id) {
|
||||
return success(baseService.selectVoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改-文档授权用户
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:edit")
|
||||
@PutMapping
|
||||
public R<Boolean> edit(@RequestBody @Validated(ValidatedGroupConfig.update.class) DocAuthorizeUserBo bo) {
|
||||
return success(baseService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增-文档授权用户
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:insert")
|
||||
@PostMapping
|
||||
public R<Boolean> insert(@RequestBody @Validated(ValidatedGroupConfig.insert.class) DocAuthorizeUserBo bo) {
|
||||
return success(baseService.insert(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除-文档授权用户
|
||||
* @param ids ID
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:delete")
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Boolean> delete(@PathVariable String ids) {
|
||||
return success(baseService.deleteById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 模版下载-文档授权用户
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:import")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
ExcelUtil.download(response, DocAuthorizeUserExport.class, "文档授权用户");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入-文档授权用户
|
||||
* @param file 模版文件
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:import")
|
||||
@PostMapping("/import")
|
||||
public R<Boolean> imports(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
Set<DocAuthorizeUserExport> list= ExcelUtil.imports(file, DocAuthorizeUserExport.class);
|
||||
Boolean state= baseService.imports(list);
|
||||
return R.ok(state,state?"数据导入成功!":"数据导入失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出-文档授权用户
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:export")
|
||||
@PostMapping("/export")
|
||||
public void export(@Validated(ValidatedGroupConfig.query.class) DocAuthorizeUserBo bo,HttpServletResponse response) throws IOException {
|
||||
List<DocAuthorizeUserVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocAuthorizeUserExport> data= MapstructUtil.convert(list,DocAuthorizeUserExport.class);
|
||||
ExcelUtil.export(response, DocAuthorizeUserExport.class, "文档授权用户",data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印-文档授权用户
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docAuthorizeUser:print")
|
||||
@PostMapping("/print")
|
||||
public R<PrintObject<DocAuthorizeUserExport>> print(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocAuthorizeUserBo bo) throws Exception {
|
||||
List<DocAuthorizeUserVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocAuthorizeUserExport> data= MapstructUtil.convert(list,DocAuthorizeUserExport.class);
|
||||
PrintObject<DocAuthorizeUserExport> printObject= new PrintObject<DocAuthorizeUserExport>()
|
||||
.setTitle("文档授权用户")
|
||||
.setData(data);
|
||||
return R.response(Boolean.TRUE,printObject);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.sxpcwlkj.docAdmin.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.sxpcwlkj.common.annotation.MssSafety;
|
||||
import com.sxpcwlkj.common.code.controller.BaseController;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.R;
|
||||
import com.sxpcwlkj.common.code.entity.PrintObject;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import com.sxpcwlkj.framework.utils.ExcelUtil;
|
||||
import com.sxpcwlkj.common.code.entity.ThreeQueryBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocConfigBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocConfigVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocConfigExport;
|
||||
import com.sxpcwlkj.docAdmin.service.DocConfigService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档配置
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("docAdmin/docConfig")
|
||||
public class DocConfigController extends BaseController{
|
||||
private final DocConfigService baseService;
|
||||
|
||||
/**
|
||||
* 分页列表-文档配置
|
||||
* @param bo 查询条件
|
||||
* @return 分页对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docConfig:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo<DocConfigVo> listPage(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocConfigBo bo){
|
||||
return baseService.selectListVoPage(bo, bo.getPageQuery());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询-文档配置
|
||||
* @param id ID
|
||||
* @return 对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docConfig:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DocConfigVo> queryById(@PathVariable String id) {
|
||||
return success(baseService.selectVoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改-文档配置
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docConfig:edit")
|
||||
@PutMapping
|
||||
public R<Boolean> edit(@RequestBody @Validated(ValidatedGroupConfig.update.class) DocConfigBo bo) {
|
||||
return success(baseService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增-文档配置
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docConfig:insert")
|
||||
@PostMapping
|
||||
public R<Boolean> insert(@RequestBody @Validated(ValidatedGroupConfig.insert.class) DocConfigBo bo) {
|
||||
return success(baseService.insert(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除-文档配置
|
||||
* @param ids ID
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docConfig:delete")
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Boolean> delete(@PathVariable String ids) {
|
||||
return success(baseService.deleteById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 模版下载-文档配置
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docConfig:import")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
ExcelUtil.download(response, DocConfigExport.class, "文档配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入-文档配置
|
||||
* @param file 模版文件
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docConfig:import")
|
||||
@PostMapping("/import")
|
||||
public R<Boolean> imports(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
Set<DocConfigExport> list= ExcelUtil.imports(file, DocConfigExport.class);
|
||||
Boolean state= baseService.imports(list);
|
||||
return R.ok(state,state?"数据导入成功!":"数据导入失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出-文档配置
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docConfig:export")
|
||||
@PostMapping("/export")
|
||||
public void export(@Validated(ValidatedGroupConfig.query.class) DocConfigBo bo,HttpServletResponse response) throws IOException {
|
||||
List<DocConfigVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocConfigExport> data= MapstructUtil.convert(list,DocConfigExport.class);
|
||||
ExcelUtil.export(response, DocConfigExport.class, "文档配置",data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印-文档配置
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docConfig:print")
|
||||
@PostMapping("/print")
|
||||
public R<PrintObject<DocConfigExport>> print(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocConfigBo bo) throws Exception {
|
||||
List<DocConfigVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocConfigExport> data= MapstructUtil.convert(list,DocConfigExport.class);
|
||||
PrintObject<DocConfigExport> printObject= new PrintObject<DocConfigExport>()
|
||||
.setTitle("文档配置")
|
||||
.setData(data);
|
||||
return R.response(Boolean.TRUE,printObject);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.sxpcwlkj.docAdmin.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.sxpcwlkj.common.annotation.MssSafety;
|
||||
import com.sxpcwlkj.common.code.controller.BaseController;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.R;
|
||||
import com.sxpcwlkj.common.code.entity.PrintObject;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import com.sxpcwlkj.framework.utils.ExcelUtil;
|
||||
import com.sxpcwlkj.common.code.entity.ThreeQueryBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocOrderBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocOrderVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocOrderExport;
|
||||
import com.sxpcwlkj.docAdmin.service.DocOrderService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档订单
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("docAdmin/docOrder")
|
||||
public class DocOrderController extends BaseController{
|
||||
private final DocOrderService baseService;
|
||||
|
||||
/**
|
||||
* 分页列表-文档订单
|
||||
* @param bo 查询条件
|
||||
* @return 分页对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docOrder:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo<DocOrderVo> listPage(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocOrderBo bo){
|
||||
return baseService.selectListVoPage(bo, bo.getPageQuery());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询-文档订单
|
||||
* @param id ID
|
||||
* @return 对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docOrder:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DocOrderVo> queryById(@PathVariable String id) {
|
||||
return success(baseService.selectVoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改-文档订单
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docOrder:edit")
|
||||
@PutMapping
|
||||
public R<Boolean> edit(@RequestBody @Validated(ValidatedGroupConfig.update.class) DocOrderBo bo) {
|
||||
return success(baseService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增-文档订单
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docOrder:insert")
|
||||
@PostMapping
|
||||
public R<Boolean> insert(@RequestBody @Validated(ValidatedGroupConfig.insert.class) DocOrderBo bo) {
|
||||
return success(baseService.insert(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除-文档订单
|
||||
* @param ids ID
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docOrder:delete")
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Boolean> delete(@PathVariable String ids) {
|
||||
return success(baseService.deleteById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 模版下载-文档订单
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docOrder:import")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
ExcelUtil.download(response, DocOrderExport.class, "文档订单");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入-文档订单
|
||||
* @param file 模版文件
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docOrder:import")
|
||||
@PostMapping("/import")
|
||||
public R<Boolean> imports(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
Set<DocOrderExport> list= ExcelUtil.imports(file, DocOrderExport.class);
|
||||
Boolean state= baseService.imports(list);
|
||||
return R.ok(state,state?"数据导入成功!":"数据导入失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出-文档订单
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docOrder:export")
|
||||
@PostMapping("/export")
|
||||
public void export(@Validated(ValidatedGroupConfig.query.class) DocOrderBo bo,HttpServletResponse response) throws IOException {
|
||||
List<DocOrderVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocOrderExport> data= MapstructUtil.convert(list,DocOrderExport.class);
|
||||
ExcelUtil.export(response, DocOrderExport.class, "文档订单",data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印-文档订单
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docOrder:print")
|
||||
@PostMapping("/print")
|
||||
public R<PrintObject<DocOrderExport>> print(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocOrderBo bo) throws Exception {
|
||||
List<DocOrderVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocOrderExport> data= MapstructUtil.convert(list,DocOrderExport.class);
|
||||
PrintObject<DocOrderExport> printObject= new PrintObject<DocOrderExport>()
|
||||
.setTitle("文档订单")
|
||||
.setData(data);
|
||||
return R.response(Boolean.TRUE,printObject);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.sxpcwlkj.docAdmin.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.sxpcwlkj.common.annotation.MssSafety;
|
||||
import com.sxpcwlkj.common.code.controller.BaseController;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.R;
|
||||
import com.sxpcwlkj.common.code.entity.PrintObject;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import com.sxpcwlkj.framework.utils.ExcelUtil;
|
||||
import com.sxpcwlkj.common.code.entity.ThreeQueryBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocProductBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocProductVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocProductExport;
|
||||
import com.sxpcwlkj.docAdmin.service.DocProductService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档商品
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("docAdmin/docProduct")
|
||||
public class DocProductController extends BaseController{
|
||||
private final DocProductService baseService;
|
||||
|
||||
/**
|
||||
* 分页列表-文档商品
|
||||
* @param bo 查询条件
|
||||
* @return 分页对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docProduct:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo<DocProductVo> listPage(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocProductBo bo){
|
||||
return baseService.selectListVoPage(bo, bo.getPageQuery());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询-文档商品
|
||||
* @param id ID
|
||||
* @return 对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docProduct:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DocProductVo> queryById(@PathVariable String id) {
|
||||
return success(baseService.selectVoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改-文档商品
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docProduct:edit")
|
||||
@PutMapping
|
||||
public R<Boolean> edit(@RequestBody @Validated(ValidatedGroupConfig.update.class) DocProductBo bo) {
|
||||
return success(baseService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增-文档商品
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docProduct:insert")
|
||||
@PostMapping
|
||||
public R<Boolean> insert(@RequestBody @Validated(ValidatedGroupConfig.insert.class) DocProductBo bo) {
|
||||
return success(baseService.insert(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除-文档商品
|
||||
* @param ids ID
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docProduct:delete")
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Boolean> delete(@PathVariable String ids) {
|
||||
return success(baseService.deleteById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 模版下载-文档商品
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docProduct:import")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
ExcelUtil.download(response, DocProductExport.class, "文档商品");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入-文档商品
|
||||
* @param file 模版文件
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docProduct:import")
|
||||
@PostMapping("/import")
|
||||
public R<Boolean> imports(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
Set<DocProductExport> list= ExcelUtil.imports(file, DocProductExport.class);
|
||||
Boolean state= baseService.imports(list);
|
||||
return R.ok(state,state?"数据导入成功!":"数据导入失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出-文档商品
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docProduct:export")
|
||||
@PostMapping("/export")
|
||||
public void export(@Validated(ValidatedGroupConfig.query.class) DocProductBo bo,HttpServletResponse response) throws IOException {
|
||||
List<DocProductVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocProductExport> data= MapstructUtil.convert(list,DocProductExport.class);
|
||||
ExcelUtil.export(response, DocProductExport.class, "文档商品",data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印-文档商品
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docProduct:print")
|
||||
@PostMapping("/print")
|
||||
public R<PrintObject<DocProductExport>> print(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocProductBo bo) throws Exception {
|
||||
List<DocProductVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocProductExport> data= MapstructUtil.convert(list,DocProductExport.class);
|
||||
PrintObject<DocProductExport> printObject= new PrintObject<DocProductExport>()
|
||||
.setTitle("文档商品")
|
||||
.setData(data);
|
||||
return R.response(Boolean.TRUE,printObject);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.sxpcwlkj.docAdmin.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.sxpcwlkj.common.annotation.MssSafety;
|
||||
import com.sxpcwlkj.common.code.controller.BaseController;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.R;
|
||||
import com.sxpcwlkj.common.code.entity.PrintObject;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import com.sxpcwlkj.framework.utils.ExcelUtil;
|
||||
import com.sxpcwlkj.common.code.entity.ThreeQueryBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocUserBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocUserExport;
|
||||
import com.sxpcwlkj.docAdmin.service.DocUserService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档用户
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("docAdmin/docUser")
|
||||
public class DocUserController extends BaseController{
|
||||
private final DocUserService baseService;
|
||||
|
||||
/**
|
||||
* 分页列表-文档用户
|
||||
* @param bo 查询条件
|
||||
* @return 分页对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docUser:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo<DocUserVo> listPage(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocUserBo bo){
|
||||
return baseService.selectListVoPage(bo, bo.getPageQuery());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询-文档用户
|
||||
* @param id ID
|
||||
* @return 对象
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docUser:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DocUserVo> queryById(@PathVariable String id) {
|
||||
return success(baseService.selectVoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改-文档用户
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docUser:edit")
|
||||
@PutMapping
|
||||
public R<Boolean> edit(@RequestBody @Validated(ValidatedGroupConfig.update.class) DocUserBo bo) {
|
||||
return success(baseService.updateById(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增-文档用户
|
||||
* @param bo 对象
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docUser:insert")
|
||||
@PostMapping
|
||||
public R<Boolean> insert(@RequestBody @Validated(ValidatedGroupConfig.insert.class) DocUserBo bo) {
|
||||
return success(baseService.insert(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除-文档用户
|
||||
* @param ids ID
|
||||
* @return true:成功 false:失败
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docUser:delete")
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Boolean> delete(@PathVariable String ids) {
|
||||
return success(baseService.deleteById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 模版下载-文档用户
|
||||
*/
|
||||
@SaCheckPermission("docAdmin:docUser:import")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
ExcelUtil.download(response, DocUserExport.class, "文档用户");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入-文档用户
|
||||
* @param file 模版文件
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docUser:import")
|
||||
@PostMapping("/import")
|
||||
public R<Boolean> imports(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
Set<DocUserExport> list= ExcelUtil.imports(file, DocUserExport.class);
|
||||
Boolean state= baseService.imports(list);
|
||||
return R.ok(state,state?"数据导入成功!":"数据导入失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出-文档用户
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docUser:export")
|
||||
@PostMapping("/export")
|
||||
public void export(@Validated(ValidatedGroupConfig.query.class) DocUserBo bo,HttpServletResponse response) throws IOException {
|
||||
List<DocUserVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocUserExport> data= MapstructUtil.convert(list,DocUserExport.class);
|
||||
ExcelUtil.export(response, DocUserExport.class, "文档用户",data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印-文档用户
|
||||
*/
|
||||
@MssSafety
|
||||
@SaCheckPermission("docAdmin:docUser:print")
|
||||
@PostMapping("/print")
|
||||
public R<PrintObject<DocUserExport>> print(@RequestBody @Validated(ValidatedGroupConfig.query.class) DocUserBo bo) throws Exception {
|
||||
List<DocUserVo> list= baseService.selectListVoPage(bo, bo.getPageQuery()).getRows();
|
||||
List<DocUserExport> data= MapstructUtil.convert(list,DocUserExport.class);
|
||||
PrintObject<DocUserExport> printObject= new PrintObject<DocUserExport>()
|
||||
.setTitle("文档用户")
|
||||
.setData(data);
|
||||
return R.response(Boolean.TRUE,printObject);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.sxpcwlkj.docAdmin.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档授权用户
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_authorize_user")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocAuthorizeUser extends BaseEntity {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 授权平台
|
||||
*/
|
||||
private String chan;
|
||||
/**
|
||||
* 授权平台标识
|
||||
*/
|
||||
private String appid;
|
||||
/**
|
||||
* 授权平台用户ID
|
||||
*/
|
||||
private String openid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.sxpcwlkj.docAdmin.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档配置
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_config")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocConfig extends BaseEntity {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
/**
|
||||
* KEY
|
||||
*/
|
||||
private String key;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.sxpcwlkj.docAdmin.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档订单
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_order")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocOrder extends BaseEntity {
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@TableId
|
||||
private String orderId;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal txnAmt;
|
||||
/**
|
||||
* 支付商户号
|
||||
*/
|
||||
private String payMchid;
|
||||
/**
|
||||
* 支付平台流水号
|
||||
*/
|
||||
private String payNo;
|
||||
/**
|
||||
* 支付超时时间
|
||||
*/
|
||||
private String payTimeout;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
private BigDecimal prodPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String prodType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.sxpcwlkj.docAdmin.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档商品
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_product")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocProduct extends BaseEntity {
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@TableId
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 销售单价
|
||||
*/
|
||||
private String unitPrice;
|
||||
/**
|
||||
* 市场价格
|
||||
*/
|
||||
private String markPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.sxpcwlkj.docAdmin.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档用户
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_user")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocUser extends BaseEntity {
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@TableId
|
||||
private String uid;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocAuthorizeUser;
|
||||
import java.util.Date;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文档授权用户Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocAuthorizeUser.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocAuthorizeUserBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotBlank(message = "ID不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@NotBlank(message = "用户编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String uid;
|
||||
/**
|
||||
* 授权平台
|
||||
*/
|
||||
@NotBlank(message = "授权平台不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String chan;
|
||||
/**
|
||||
* 授权平台标识
|
||||
*/
|
||||
@NotBlank(message = "授权平台标识不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String appid;
|
||||
/**
|
||||
* 授权平台用户ID
|
||||
*/
|
||||
@NotBlank(message = "授权平台用户ID不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String openid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotNull(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotNull(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocConfig;
|
||||
import java.util.Date;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文档配置Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocConfig.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocConfigBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotBlank(message = "ID不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String id;
|
||||
/**
|
||||
* KEY
|
||||
*/
|
||||
@NotBlank(message = "KEY不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String key;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@NotBlank(message = "值不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String value;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotNull(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotNull(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocOrder;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文档订单Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocOrder.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocOrderBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@NotBlank(message = "订单编号不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String orderId;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@NotBlank(message = "用户编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String uid;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
@NotNull(message = "订单金额不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private BigDecimal txnAmt;
|
||||
/**
|
||||
* 支付商户号
|
||||
*/
|
||||
@NotBlank(message = "支付商户号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String payMchid;
|
||||
/**
|
||||
* 支付平台流水号
|
||||
*/
|
||||
@NotBlank(message = "支付平台流水号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String payNo;
|
||||
/**
|
||||
* 支付超时时间
|
||||
*/
|
||||
@NotBlank(message = "支付超时时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String payTimeout;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@NotBlank(message = "产品编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@NotBlank(message = "产品名称不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodName;
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
@NotNull(message = "产品价格不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private BigDecimal prodPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
@NotBlank(message = "产品类型不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotBlank(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotBlank(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocProduct;
|
||||
import java.util.Date;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文档商品Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocProduct.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocProductBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@NotBlank(message = "产品编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@NotBlank(message = "产品名称不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodName;
|
||||
/**
|
||||
* 销售单价
|
||||
*/
|
||||
@NotBlank(message = "销售单价不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String unitPrice;
|
||||
/**
|
||||
* 市场价格
|
||||
*/
|
||||
@NotBlank(message = "市场价格不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String markPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
@NotBlank(message = "产品类型不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotBlank(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotBlank(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocUser;
|
||||
import java.util.Date;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文档用户Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocUser.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocUserBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@NotBlank(message = "用户编号不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String uid;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@NotBlank(message = "昵称不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String nickname;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@NotBlank(message = "头像不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String avatar;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@NotBlank(message = "用户类型不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotNull(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotNull(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.export;
|
||||
|
||||
import com.sxpcwlkj.common.annotation.Dict;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.sxpcwlkj.common.annotation.PrintColumn;
|
||||
import com.sxpcwlkj.common.enums.PrintTypeEnum;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocAuthorizeUserVo;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.sxpcwlkj.framework.interceptor.DictExcelConverter;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档授权用户Export
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocAuthorizeUserVo.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocAuthorizeUserExport extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("ID")
|
||||
@PrintColumn(title = "ID", type = PrintTypeEnum.TEXT)
|
||||
private String id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@ExcelProperty("用户编号")
|
||||
@PrintColumn(title = "用户编号", type = PrintTypeEnum.TEXT)
|
||||
private String uid;
|
||||
/**
|
||||
* 授权平台
|
||||
*/
|
||||
@ExcelProperty("授权平台")
|
||||
@PrintColumn(title = "授权平台", type = PrintTypeEnum.TEXT)
|
||||
private String chan;
|
||||
/**
|
||||
* 授权平台标识
|
||||
*/
|
||||
@ExcelProperty("授权平台标识")
|
||||
@PrintColumn(title = "授权平台标识", type = PrintTypeEnum.TEXT)
|
||||
private String appid;
|
||||
/**
|
||||
* 授权平台用户ID
|
||||
*/
|
||||
@ExcelProperty("授权平台用户ID")
|
||||
@PrintColumn(title = "授权平台用户ID", type = PrintTypeEnum.TEXT)
|
||||
private String openid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty("创建时间")
|
||||
@PrintColumn(title = "创建时间", type = PrintTypeEnum.TEXT)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty("更新时间")
|
||||
@PrintColumn(title = "更新时间", type = PrintTypeEnum.TEXT)
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.export;
|
||||
|
||||
import com.sxpcwlkj.common.annotation.Dict;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.sxpcwlkj.common.annotation.PrintColumn;
|
||||
import com.sxpcwlkj.common.enums.PrintTypeEnum;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocConfigVo;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.sxpcwlkj.framework.interceptor.DictExcelConverter;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档配置Export
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocConfigVo.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocConfigExport extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("ID")
|
||||
@PrintColumn(title = "ID", type = PrintTypeEnum.TEXT)
|
||||
private String id;
|
||||
/**
|
||||
* KEY
|
||||
*/
|
||||
@ExcelProperty("KEY")
|
||||
@PrintColumn(title = "KEY", type = PrintTypeEnum.TEXT)
|
||||
private String key;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@ExcelProperty("值")
|
||||
@PrintColumn(title = "值", type = PrintTypeEnum.TEXT)
|
||||
private String value;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty("创建时间")
|
||||
@PrintColumn(title = "创建时间", type = PrintTypeEnum.TEXT)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty("更新时间")
|
||||
@PrintColumn(title = "更新时间", type = PrintTypeEnum.TEXT)
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.export;
|
||||
|
||||
import com.sxpcwlkj.common.annotation.Dict;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.sxpcwlkj.common.annotation.PrintColumn;
|
||||
import com.sxpcwlkj.common.enums.PrintTypeEnum;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocOrderVo;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.sxpcwlkj.framework.interceptor.DictExcelConverter;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档订单Export
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocOrderVo.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocOrderExport extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("订单编号")
|
||||
@PrintColumn(title = "订单编号", type = PrintTypeEnum.TEXT)
|
||||
private String orderId;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@ExcelProperty("用户编号")
|
||||
@PrintColumn(title = "用户编号", type = PrintTypeEnum.TEXT)
|
||||
private String uid;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
@ExcelProperty("订单金额")
|
||||
@PrintColumn(title = "订单金额", type = PrintTypeEnum.TEXT)
|
||||
private BigDecimal txnAmt;
|
||||
/**
|
||||
* 支付商户号
|
||||
*/
|
||||
@ExcelProperty("支付商户号")
|
||||
@PrintColumn(title = "支付商户号", type = PrintTypeEnum.TEXT)
|
||||
private String payMchid;
|
||||
/**
|
||||
* 支付平台流水号
|
||||
*/
|
||||
@ExcelProperty("支付平台流水号")
|
||||
@PrintColumn(title = "支付平台流水号", type = PrintTypeEnum.TEXT)
|
||||
private String payNo;
|
||||
/**
|
||||
* 支付超时时间
|
||||
*/
|
||||
@ExcelProperty("支付超时时间")
|
||||
@PrintColumn(title = "支付超时时间", type = PrintTypeEnum.TEXT)
|
||||
private String payTimeout;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@ExcelProperty("产品编号")
|
||||
@PrintColumn(title = "产品编号", type = PrintTypeEnum.TEXT)
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@ExcelProperty("产品名称")
|
||||
@PrintColumn(title = "产品名称", type = PrintTypeEnum.TEXT)
|
||||
private String prodName;
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
@ExcelProperty("产品价格")
|
||||
@PrintColumn(title = "产品价格", type = PrintTypeEnum.TEXT)
|
||||
private BigDecimal prodPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
@ExcelProperty("产品类型")
|
||||
@PrintColumn(title = "产品类型", type = PrintTypeEnum.TEXT)
|
||||
private String prodType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty("创建时间")
|
||||
@PrintColumn(title = "创建时间", type = PrintTypeEnum.TEXT)
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty("更新时间")
|
||||
@PrintColumn(title = "更新时间", type = PrintTypeEnum.TEXT)
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.export;
|
||||
|
||||
import com.sxpcwlkj.common.annotation.Dict;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.sxpcwlkj.common.annotation.PrintColumn;
|
||||
import com.sxpcwlkj.common.enums.PrintTypeEnum;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocProductVo;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.sxpcwlkj.framework.interceptor.DictExcelConverter;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档商品Export
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocProductVo.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocProductExport extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@ExcelProperty("产品编号")
|
||||
@PrintColumn(title = "产品编号", type = PrintTypeEnum.TEXT)
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@ExcelProperty("产品名称")
|
||||
@PrintColumn(title = "产品名称", type = PrintTypeEnum.TEXT)
|
||||
private String prodName;
|
||||
/**
|
||||
* 销售单价
|
||||
*/
|
||||
@ExcelProperty("销售单价")
|
||||
@PrintColumn(title = "销售单价", type = PrintTypeEnum.TEXT)
|
||||
private String unitPrice;
|
||||
/**
|
||||
* 市场价格
|
||||
*/
|
||||
@ExcelProperty("市场价格")
|
||||
@PrintColumn(title = "市场价格", type = PrintTypeEnum.TEXT)
|
||||
private String markPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
@ExcelProperty("产品类型")
|
||||
@PrintColumn(title = "产品类型", type = PrintTypeEnum.TEXT)
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty("创建时间")
|
||||
@PrintColumn(title = "创建时间", type = PrintTypeEnum.TEXT)
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty("更新时间")
|
||||
@PrintColumn(title = "更新时间", type = PrintTypeEnum.TEXT)
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.export;
|
||||
|
||||
import com.sxpcwlkj.common.annotation.Dict;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.sxpcwlkj.common.annotation.PrintColumn;
|
||||
import com.sxpcwlkj.common.enums.PrintTypeEnum;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.sxpcwlkj.framework.interceptor.DictExcelConverter;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档用户Export
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocUserVo.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocUserExport extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("用户编号")
|
||||
@PrintColumn(title = "用户编号", type = PrintTypeEnum.TEXT)
|
||||
private String uid;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@ExcelProperty("昵称")
|
||||
@PrintColumn(title = "昵称", type = PrintTypeEnum.TEXT)
|
||||
private String nickname;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@ExcelProperty("头像")
|
||||
@PrintColumn(title = "头像", type = PrintTypeEnum.TEXT)
|
||||
private String avatar;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@ExcelProperty("用户类型")
|
||||
@PrintColumn(title = "用户类型", type = PrintTypeEnum.TEXT)
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty("创建时间")
|
||||
@PrintColumn(title = "创建时间", type = PrintTypeEnum.TEXT)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty("更新时间")
|
||||
@PrintColumn(title = "更新时间", type = PrintTypeEnum.TEXT)
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.vo;
|
||||
|
||||
|
||||
import java.io.Serial;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocAuthorizeUser;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档授权用户Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocAuthorizeUser.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocAuthorizeUserVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 授权平台
|
||||
*/
|
||||
private String chan;
|
||||
/**
|
||||
* 授权平台标识
|
||||
*/
|
||||
private String appid;
|
||||
/**
|
||||
* 授权平台用户ID
|
||||
*/
|
||||
private String openid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.vo;
|
||||
|
||||
|
||||
import java.io.Serial;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocConfig;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档配置Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocConfig.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocConfigVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* KEY
|
||||
*/
|
||||
private String key;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.vo;
|
||||
|
||||
|
||||
import java.io.Serial;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocOrder;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.List;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档订单Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocOrder.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocOrderVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal txnAmt;
|
||||
/**
|
||||
* 支付商户号
|
||||
*/
|
||||
private String payMchid;
|
||||
/**
|
||||
* 支付平台流水号
|
||||
*/
|
||||
private String payNo;
|
||||
/**
|
||||
* 支付超时时间
|
||||
*/
|
||||
private String payTimeout;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
private BigDecimal prodPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String prodType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.vo;
|
||||
|
||||
|
||||
import java.io.Serial;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocProduct;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档商品Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocProduct.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocProductVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 销售单价
|
||||
*/
|
||||
private String unitPrice;
|
||||
/**
|
||||
* 市场价格
|
||||
*/
|
||||
private String markPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.sxpcwlkj.docAdmin.entity.vo;
|
||||
|
||||
|
||||
import java.io.Serial;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocUser;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档用户Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocUser.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocUserVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docAdmin.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocAuthorizeUser;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocAuthorizeUserVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档授权用户-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocAuthorizeUserMapper extends BaseMapperPlus<DocAuthorizeUser, DocAuthorizeUserVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docAdmin.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocConfig;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocConfigVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档配置-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocConfigMapper extends BaseMapperPlus<DocConfig, DocConfigVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docAdmin.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocOrder;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocOrderVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档订单-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocOrderMapper extends BaseMapperPlus<DocOrder, DocOrderVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docAdmin.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocProduct;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocProductVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档商品-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocProductMapper extends BaseMapperPlus<DocProduct, DocProductVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docAdmin.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocUser;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocUserVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档用户-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocUserMapper extends BaseMapperPlus<DocUser, DocUserVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.sxpcwlkj.docAdmin.service;
|
||||
|
||||
import com.sxpcwlkj.framework.sercice.BaseService;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocAuthorizeUser;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocAuthorizeUserBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocAuthorizeUserVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocAuthorizeUserExport;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档授权用户-接口
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
* @describe 支持自定义扩展,已继承接口:{insert、deleteById、updateById、selectById、getByEntityListPage}(更多查看BaseService接口)
|
||||
*/
|
||||
public interface DocAuthorizeUserService extends BaseService<DocAuthorizeUser, DocAuthorizeUserVo, DocAuthorizeUserBo> {
|
||||
/**
|
||||
* 导出文档授权用户
|
||||
* @param list 文档授权用户列表
|
||||
* @return true:成功 false :失败
|
||||
*/
|
||||
Boolean imports(Set<DocAuthorizeUserExport> list);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.sxpcwlkj.docAdmin.service;
|
||||
|
||||
import com.sxpcwlkj.framework.sercice.BaseService;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocConfig;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocConfigBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocConfigVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocConfigExport;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档配置-接口
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
* @describe 支持自定义扩展,已继承接口:{insert、deleteById、updateById、selectById、getByEntityListPage}(更多查看BaseService接口)
|
||||
*/
|
||||
public interface DocConfigService extends BaseService<DocConfig, DocConfigVo, DocConfigBo> {
|
||||
/**
|
||||
* 导出文档配置
|
||||
* @param list 文档配置列表
|
||||
* @return true:成功 false :失败
|
||||
*/
|
||||
Boolean imports(Set<DocConfigExport> list);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.sxpcwlkj.docAdmin.service;
|
||||
|
||||
import com.sxpcwlkj.framework.sercice.BaseService;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocOrder;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocOrderBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocOrderVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocOrderExport;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档订单-接口
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
* @describe 支持自定义扩展,已继承接口:{insert、deleteById、updateById、selectById、getByEntityListPage}(更多查看BaseService接口)
|
||||
*/
|
||||
public interface DocOrderService extends BaseService<DocOrder, DocOrderVo, DocOrderBo> {
|
||||
/**
|
||||
* 导出文档订单
|
||||
* @param list 文档订单列表
|
||||
* @return true:成功 false :失败
|
||||
*/
|
||||
Boolean imports(Set<DocOrderExport> list);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.sxpcwlkj.docAdmin.service;
|
||||
|
||||
import com.sxpcwlkj.framework.sercice.BaseService;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocProduct;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocProductBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocProductVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocProductExport;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档商品-接口
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
* @describe 支持自定义扩展,已继承接口:{insert、deleteById、updateById、selectById、getByEntityListPage}(更多查看BaseService接口)
|
||||
*/
|
||||
public interface DocProductService extends BaseService<DocProduct, DocProductVo, DocProductBo> {
|
||||
/**
|
||||
* 导出文档商品
|
||||
* @param list 文档商品列表
|
||||
* @return true:成功 false :失败
|
||||
*/
|
||||
Boolean imports(Set<DocProductExport> list);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.sxpcwlkj.docAdmin.service;
|
||||
|
||||
import com.sxpcwlkj.framework.sercice.BaseService;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocUser;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocUserBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocUserExport;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档用户-接口
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
* @describe 支持自定义扩展,已继承接口:{insert、deleteById、updateById、selectById、getByEntityListPage}(更多查看BaseService接口)
|
||||
*/
|
||||
public interface DocUserService extends BaseService<DocUser, DocUserVo, DocUserBo> {
|
||||
/**
|
||||
* 导出文档用户
|
||||
* @param list 文档用户列表
|
||||
* @return true:成功 false :失败
|
||||
*/
|
||||
Boolean imports(Set<DocUserExport> list);
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package com.sxpcwlkj.docAdmin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sxpcwlkj.common.enums.SystemCommonEnum;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.DataUtil;
|
||||
import com.sxpcwlkj.common.utils.StringUtil;
|
||||
import com.sxpcwlkj.datasource.entity.page.PageQuery;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.framework.sercice.impl.BaseServiceImpl;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocAuthorizeUser;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocAuthorizeUserBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocAuthorizeUserVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocAuthorizeUserExport;
|
||||
import com.sxpcwlkj.docAdmin.mapper.DocAuthorizeUserMapper;
|
||||
import com.sxpcwlkj.docAdmin.service.DocAuthorizeUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
/**
|
||||
* 文档授权用户-接口实现
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@Service("doc_authorize_user")
|
||||
@RequiredArgsConstructor
|
||||
public class DocAuthorizeUserServiceImpl extends BaseServiceImpl<DocAuthorizeUser, DocAuthorizeUserVo,DocAuthorizeUserBo> implements DocAuthorizeUserService {
|
||||
|
||||
private final DocAuthorizeUserMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public BaseMapperPlus<DocAuthorizeUser, DocAuthorizeUserVo> getBaseMapper() {
|
||||
return baseMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(DocAuthorizeUserBo bo) {
|
||||
try {
|
||||
int row;
|
||||
bo.setId(null);
|
||||
DocAuthorizeUser obj = MapstructUtil.convert(bo, DocAuthorizeUser.class);
|
||||
assert obj != null;
|
||||
row = this.getBaseMapper().insert(obj);
|
||||
bo.setId(obj.getId());
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档授权用户,insert 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteById(Serializable ids) {
|
||||
try {
|
||||
String[] array = DataUtil.getCatStr(ids.toString(), ",");
|
||||
return this.getBaseMapper().deleteByIds(new ArrayList<>(List.of(array)))>0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档授权用户,deleteById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateById(DocAuthorizeUserBo bo) {
|
||||
try {
|
||||
int row;
|
||||
DocAuthorizeUser obj = MapstructUtil.convert(bo, DocAuthorizeUser.class);
|
||||
row = this.getBaseMapper().updateById(obj);
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档授权用户,updateById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocAuthorizeUserVo selectVoById(Serializable id) {
|
||||
return this.getBaseMapper().selectVoById(id);
|
||||
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<DocAuthorizeUserVo> selectListVoPage(DocAuthorizeUserBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DocAuthorizeUser> lqw = buildQueryWrapper(bo);
|
||||
Page<DocAuthorizeUserVo> page = baseMapper.selectVoPage(pageQuery.build(),lqw);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DocAuthorizeUser> buildQueryWrapper(DocAuthorizeUserBo query){
|
||||
if(query==null){
|
||||
query=new DocAuthorizeUserBo();
|
||||
}
|
||||
LambdaQueryWrapper<DocAuthorizeUser> wrapper = Wrappers.lambdaQuery();
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean imports(Set<DocAuthorizeUserExport> list) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package com.sxpcwlkj.docAdmin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sxpcwlkj.common.enums.SystemCommonEnum;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.DataUtil;
|
||||
import com.sxpcwlkj.common.utils.StringUtil;
|
||||
import com.sxpcwlkj.datasource.entity.page.PageQuery;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.framework.sercice.impl.BaseServiceImpl;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocConfig;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocConfigBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocConfigVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocConfigExport;
|
||||
import com.sxpcwlkj.docAdmin.mapper.DocConfigMapper;
|
||||
import com.sxpcwlkj.docAdmin.service.DocConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
/**
|
||||
* 文档配置-接口实现
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@Service("doc_config")
|
||||
@RequiredArgsConstructor
|
||||
public class DocConfigServiceImpl extends BaseServiceImpl<DocConfig, DocConfigVo,DocConfigBo> implements DocConfigService {
|
||||
|
||||
private final DocConfigMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public BaseMapperPlus<DocConfig, DocConfigVo> getBaseMapper() {
|
||||
return baseMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(DocConfigBo bo) {
|
||||
try {
|
||||
int row;
|
||||
bo.setId(null);
|
||||
DocConfig obj = MapstructUtil.convert(bo, DocConfig.class);
|
||||
assert obj != null;
|
||||
row = this.getBaseMapper().insert(obj);
|
||||
bo.setId(obj.getId());
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档配置,insert 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteById(Serializable ids) {
|
||||
try {
|
||||
String[] array = DataUtil.getCatStr(ids.toString(), ",");
|
||||
return this.getBaseMapper().deleteByIds(new ArrayList<>(List.of(array)))>0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档配置,deleteById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateById(DocConfigBo bo) {
|
||||
try {
|
||||
int row;
|
||||
DocConfig obj = MapstructUtil.convert(bo, DocConfig.class);
|
||||
row = this.getBaseMapper().updateById(obj);
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档配置,updateById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocConfigVo selectVoById(Serializable id) {
|
||||
return this.getBaseMapper().selectVoById(id);
|
||||
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<DocConfigVo> selectListVoPage(DocConfigBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DocConfig> lqw = buildQueryWrapper(bo);
|
||||
Page<DocConfigVo> page = baseMapper.selectVoPage(pageQuery.build(),lqw);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DocConfig> buildQueryWrapper(DocConfigBo query){
|
||||
if(query==null){
|
||||
query=new DocConfigBo();
|
||||
}
|
||||
LambdaQueryWrapper<DocConfig> wrapper = Wrappers.lambdaQuery();
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean imports(Set<DocConfigExport> list) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package com.sxpcwlkj.docAdmin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sxpcwlkj.common.enums.SystemCommonEnum;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.DataUtil;
|
||||
import com.sxpcwlkj.common.utils.StringUtil;
|
||||
import com.sxpcwlkj.datasource.entity.page.PageQuery;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.framework.sercice.impl.BaseServiceImpl;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocOrder;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocOrderBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocOrderVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocOrderExport;
|
||||
import com.sxpcwlkj.docAdmin.mapper.DocOrderMapper;
|
||||
import com.sxpcwlkj.docAdmin.service.DocOrderService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
/**
|
||||
* 文档订单-接口实现
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@Service("doc_order")
|
||||
@RequiredArgsConstructor
|
||||
public class DocOrderServiceImpl extends BaseServiceImpl<DocOrder, DocOrderVo,DocOrderBo> implements DocOrderService {
|
||||
|
||||
private final DocOrderMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public BaseMapperPlus<DocOrder, DocOrderVo> getBaseMapper() {
|
||||
return baseMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(DocOrderBo bo) {
|
||||
try {
|
||||
int row;
|
||||
bo.setOrderId(null);
|
||||
DocOrder obj = MapstructUtil.convert(bo, DocOrder.class);
|
||||
assert obj != null;
|
||||
row = this.getBaseMapper().insert(obj);
|
||||
bo.setOrderId(obj.getOrderId());
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档订单,insert 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteById(Serializable ids) {
|
||||
try {
|
||||
String[] array = DataUtil.getCatStr(ids.toString(), ",");
|
||||
return this.getBaseMapper().deleteByIds(new ArrayList<>(List.of(array)))>0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档订单,deleteById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateById(DocOrderBo bo) {
|
||||
try {
|
||||
int row;
|
||||
DocOrder obj = MapstructUtil.convert(bo, DocOrder.class);
|
||||
row = this.getBaseMapper().updateById(obj);
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档订单,updateById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocOrderVo selectVoById(Serializable id) {
|
||||
return this.getBaseMapper().selectVoById(id);
|
||||
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<DocOrderVo> selectListVoPage(DocOrderBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DocOrder> lqw = buildQueryWrapper(bo);
|
||||
Page<DocOrderVo> page = baseMapper.selectVoPage(pageQuery.build(),lqw);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DocOrder> buildQueryWrapper(DocOrderBo query){
|
||||
if(query==null){
|
||||
query=new DocOrderBo();
|
||||
}
|
||||
LambdaQueryWrapper<DocOrder> wrapper = Wrappers.lambdaQuery();
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean imports(Set<DocOrderExport> list) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package com.sxpcwlkj.docAdmin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sxpcwlkj.common.enums.SystemCommonEnum;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.DataUtil;
|
||||
import com.sxpcwlkj.common.utils.StringUtil;
|
||||
import com.sxpcwlkj.datasource.entity.page.PageQuery;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.framework.sercice.impl.BaseServiceImpl;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocProduct;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocProductBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocProductVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocProductExport;
|
||||
import com.sxpcwlkj.docAdmin.mapper.DocProductMapper;
|
||||
import com.sxpcwlkj.docAdmin.service.DocProductService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
/**
|
||||
* 文档商品-接口实现
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@Service("doc_product")
|
||||
@RequiredArgsConstructor
|
||||
public class DocProductServiceImpl extends BaseServiceImpl<DocProduct, DocProductVo,DocProductBo> implements DocProductService {
|
||||
|
||||
private final DocProductMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public BaseMapperPlus<DocProduct, DocProductVo> getBaseMapper() {
|
||||
return baseMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(DocProductBo bo) {
|
||||
try {
|
||||
int row;
|
||||
bo.setProdId(null);
|
||||
DocProduct obj = MapstructUtil.convert(bo, DocProduct.class);
|
||||
assert obj != null;
|
||||
row = this.getBaseMapper().insert(obj);
|
||||
bo.setProdId(obj.getProdId());
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档商品,insert 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteById(Serializable ids) {
|
||||
try {
|
||||
String[] array = DataUtil.getCatStr(ids.toString(), ",");
|
||||
return this.getBaseMapper().deleteByIds(new ArrayList<>(List.of(array)))>0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档商品,deleteById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateById(DocProductBo bo) {
|
||||
try {
|
||||
int row;
|
||||
DocProduct obj = MapstructUtil.convert(bo, DocProduct.class);
|
||||
row = this.getBaseMapper().updateById(obj);
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档商品,updateById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocProductVo selectVoById(Serializable id) {
|
||||
return this.getBaseMapper().selectVoById(id);
|
||||
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<DocProductVo> selectListVoPage(DocProductBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DocProduct> lqw = buildQueryWrapper(bo);
|
||||
Page<DocProductVo> page = baseMapper.selectVoPage(pageQuery.build(),lqw);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DocProduct> buildQueryWrapper(DocProductBo query){
|
||||
if(query==null){
|
||||
query=new DocProductBo();
|
||||
}
|
||||
LambdaQueryWrapper<DocProduct> wrapper = Wrappers.lambdaQuery();
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean imports(Set<DocProductExport> list) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package com.sxpcwlkj.docAdmin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sxpcwlkj.common.enums.SystemCommonEnum;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.common.utils.DataUtil;
|
||||
import com.sxpcwlkj.common.utils.StringUtil;
|
||||
import com.sxpcwlkj.datasource.entity.page.PageQuery;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.framework.sercice.impl.BaseServiceImpl;
|
||||
import com.sxpcwlkj.docAdmin.entity.DocUser;
|
||||
import com.sxpcwlkj.docAdmin.entity.bo.DocUserBo;
|
||||
import com.sxpcwlkj.docAdmin.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.docAdmin.entity.export.DocUserExport;
|
||||
import com.sxpcwlkj.docAdmin.mapper.DocUserMapper;
|
||||
import com.sxpcwlkj.docAdmin.service.DocUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
/**
|
||||
* 文档用户-接口实现
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@Service("doc_user")
|
||||
@RequiredArgsConstructor
|
||||
public class DocUserServiceImpl extends BaseServiceImpl<DocUser, DocUserVo,DocUserBo> implements DocUserService {
|
||||
|
||||
private final DocUserMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public BaseMapperPlus<DocUser, DocUserVo> getBaseMapper() {
|
||||
return baseMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(DocUserBo bo) {
|
||||
try {
|
||||
int row;
|
||||
bo.setUid(null);
|
||||
DocUser obj = MapstructUtil.convert(bo, DocUser.class);
|
||||
assert obj != null;
|
||||
row = this.getBaseMapper().insert(obj);
|
||||
bo.setUid(obj.getUid());
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档用户,insert 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteById(Serializable ids) {
|
||||
try {
|
||||
String[] array = DataUtil.getCatStr(ids.toString(), ",");
|
||||
return this.getBaseMapper().deleteByIds(new ArrayList<>(List.of(array)))>0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档用户,deleteById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateById(DocUserBo bo) {
|
||||
try {
|
||||
int row;
|
||||
DocUser obj = MapstructUtil.convert(bo, DocUser.class);
|
||||
row = this.getBaseMapper().updateById(obj);
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档用户,updateById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocUserVo selectVoById(Serializable id) {
|
||||
return this.getBaseMapper().selectVoById(id);
|
||||
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<DocUserVo> selectListVoPage(DocUserBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DocUser> lqw = buildQueryWrapper(bo);
|
||||
Page<DocUserVo> page = baseMapper.selectVoPage(pageQuery.build(),lqw);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DocUser> buildQueryWrapper(DocUserBo query){
|
||||
if(query==null){
|
||||
query=new DocUserBo();
|
||||
}
|
||||
LambdaQueryWrapper<DocUser> wrapper = Wrappers.lambdaQuery();
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean imports(Set<DocUserExport> list) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
<?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.sxpcwlkj.docAdmin.mapper.DocAuthorizeUserMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,6 @@
|
||||
<?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.sxpcwlkj.docAdmin.mapper.DocConfigMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,6 @@
|
||||
<?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.sxpcwlkj.docAdmin.mapper.DocOrderMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,6 @@
|
||||
<?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.sxpcwlkj.docAdmin.mapper.DocProductMapper">
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,6 @@
|
||||
<?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.sxpcwlkj.docAdmin.mapper.DocUserMapper">
|
||||
|
||||
</mapper>
|
||||
103
mms-docs/mms-doc-api/.gitignore
vendored
Normal file
103
mms-docs/mms-doc-api/.gitignore
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# Eclipse & IntelliJ IDEA
|
||||
.classpath
|
||||
.settings/
|
||||
.idea
|
||||
.idea/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
.settings
|
||||
.project
|
||||
.flattened-pom.xml
|
||||
|
||||
# Maven
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.mvn/timing.properties
|
||||
.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
# Gradle
|
||||
.gradle
|
||||
.gradle/
|
||||
build/
|
||||
**/build/
|
||||
bin/
|
||||
!src/**/build/
|
||||
gradle-app.setting
|
||||
!gradle-wrapper.jar
|
||||
.gradletasknamecache
|
||||
gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
# VS Code
|
||||
.vscode/
|
||||
|
||||
# STS
|
||||
.apt_generated
|
||||
.factorypath
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
# NetBeans
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
# DB
|
||||
/script/db/.back_sxpcwlkj/
|
||||
/script/db/.version_sxpcwlkj/
|
||||
!/script/db/.back_sxpcwlkj/
|
||||
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
25
mms-docs/mms-doc-api/Dockerfile
Normal file
25
mms-docs/mms-doc-api/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
#FROM findepi/graalvm:java17-native
|
||||
FROM openjdk:17.0.2-oraclelinux8
|
||||
|
||||
MAINTAINER SXPCWLKJ
|
||||
|
||||
RUN mkdir -p /sxpcwlkj \
|
||||
/sxpcwlkj/mms-doc \
|
||||
/sxpcwlkj/mms-doc/logs \
|
||||
/sxpcwlkj/mms-doc/files
|
||||
|
||||
WORKDIR /sxpcwlkj/mms-doc
|
||||
|
||||
ENV SERVER_PORT=8070 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
||||
|
||||
EXPOSE ${SERVER_PORT}
|
||||
|
||||
ADD ./target/mms-doc-api.jar ./app.jar
|
||||
|
||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
|
||||
# 应用名称 如果想区分集群节点监控 改成不同的名称即可
|
||||
#-Dskywalking.agent.service_name=sxpcwlkj-mms \
|
||||
#-javaagent:/sxpcwlkj/mms/skywalking/agent/skywalking-agent.jar \
|
||||
-jar app.jar \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*,:time,tags,level -XX:+UseZGC ${JAVA_OPTS}
|
||||
|
||||
284
mms-docs/mms-doc-api/README.md
Normal file
284
mms-docs/mms-doc-api/README.md
Normal file
@ -0,0 +1,284 @@
|
||||
# 声明
|
||||
|
||||
本项目是用于 [[VitePress 会员主题]](https://vitepress.mosong.cc/) 的用户注册/登录,支付等接口服务。
|
||||
|
||||
> 详细文档大家请访问: 官方 [[VitePress 会员主题]](https://vitepress.mosong.cc/) 官方是Go语言服务接口工程 。
|
||||
|
||||
> 以下是用Java扩展 ‘会员主题’ 服务接口,具体看下面的接口列表:
|
||||
|
||||
|
||||
# 接口列表
|
||||
|
||||
## 一、用户信息
|
||||
|
||||
POST /vpapi/meb/userinfo
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称|位置|类型|必选| 值 |
|
||||
|---|---|---|---|------------|
|
||||
|cookie|header|string| 否 | mss= |
|
||||
|
||||
> 返回示例
|
||||
|
||||
未登录
|
||||
|
||||
```json
|
||||
{
|
||||
"body":{},
|
||||
"errmsg":"会话过期",
|
||||
"errno":"99910",
|
||||
"host_time":"20250528093635"
|
||||
}
|
||||
```
|
||||
已登录
|
||||
|
||||
```json
|
||||
{
|
||||
"body": {
|
||||
"uid": "674fe3bb2c8b61045f6eaff6",
|
||||
"nickname": "单先生-软件开发",
|
||||
"avatar": "https://thirdwx.qlogo.cn/mmopen/vi_32/gWYQezqOl40WauDqyA7c5HGPQQgUQmXg0aLJVhMwdAIxD2DHs19urHkzB5CJm12vraHGT9a1lQIBNyGYBzCJ4yJuib8bctnE9rS5CH9GY3NY/132",
|
||||
"ctime": "20241204130811",
|
||||
"type": "vip",
|
||||
"vip_date": "2025-05-28"
|
||||
},
|
||||
"errmsg": "ok",
|
||||
"errno": "00000",
|
||||
"host_time": "20250528095709"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## 二、获取登录二维码
|
||||
|
||||
POST /vpapi/meb/oauth-authorize
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称|位置|类型|必选| 值 |
|
||||
|---|---|---|---|---|
|
||||
|cookie|header|string| 否 | mss= |
|
||||
|
||||
> 返回示例
|
||||
|
||||
```json
|
||||
{
|
||||
"body": {
|
||||
"state": "68366991f2d7af56647fb645",
|
||||
"url": "https://vpapi.mosong.cc/vpapi/meb/weixin-authorize?scope=snsapi_userinfo&state=68366991f2d7af56647fb645"
|
||||
},
|
||||
"errmsg": "ok",
|
||||
"errno": "00000",
|
||||
"host_time": "20250528094033"
|
||||
}
|
||||
```
|
||||
|
||||
## 三、微信授权跳转
|
||||
|
||||
GET /vpapi/meb/weixin-authorize?state=x&scope=x
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称|位置|类型|必选| 值 |
|
||||
|---|---|---|---|---|
|
||||
|cookie|header|string| 否 | mss= |
|
||||
|state| param |string| 是 | 68366991f2d7af56647fb645 |
|
||||
|scope| param |string| 是 | snsapi_userinfo |
|
||||
|
||||
> 返回示例
|
||||
> '状态 1=正常 0=重试'
|
||||
|
||||
```json
|
||||
{
|
||||
"body": {
|
||||
"status":1
|
||||
},
|
||||
"errmsg": "ok",
|
||||
"errno": "00000",
|
||||
"host_time": "20250528094033"
|
||||
}
|
||||
```
|
||||
|
||||
## 四、查询扫码状态
|
||||
|
||||
POST /vpapi/meb/oauth-polling
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称| 位置 |类型| 必选 | 值 |
|
||||
|---|--------|---|----|---|
|
||||
|cookie| header |string| 否 | mss= |
|
||||
|state| param |string| 是 | 68366991f2d7af56647fb645 |
|
||||
|
||||
|
||||
> 返回示例
|
||||
|
||||
未扫码
|
||||
|
||||
```json
|
||||
{
|
||||
"body": {
|
||||
"status": "0",
|
||||
"token": ""
|
||||
},
|
||||
"errmsg": "ok",
|
||||
"errno": "00000",
|
||||
"host_time": "20250528094039"
|
||||
}
|
||||
```
|
||||
扫码成功
|
||||
```json
|
||||
{
|
||||
"body": {
|
||||
"status": "1",
|
||||
"token": "3092447f3f26snCUIBpCShl3_kRxkaJsephz_DfFtPWtrFNCz6IiMAjYYlU1bN1YbQ9Vs_3HFCUGYzRlSoE-eKGpPmFsTBlxIjGueCALtm3wkn9grjM6UPFC_C8W5sgCAZLIdOLvLYwu"
|
||||
},
|
||||
"errmsg": "ok",
|
||||
"errno": "00000",
|
||||
"host_time": "20250528095709"
|
||||
}
|
||||
```
|
||||
|
||||
## 五、开通会员
|
||||
|
||||
POST /vpapi/meb/product-list
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称| 位置 |类型| 必选 | 值 |
|
||||
|---|--------|---|----|---------------------------------------------------------|
|
||||
|cookie| header |string| 是 | mss=3092447f3f26snCUIBpCShl3_kRxkaJsephz*************** |
|
||||
|
||||
|
||||
> 返回示例
|
||||
|
||||
```json
|
||||
{
|
||||
"body": {
|
||||
"items": [
|
||||
{
|
||||
"prod_id": "240003",
|
||||
"prod_name": "天卡会员",
|
||||
"unit_price": 990,
|
||||
"mark_price": 990,
|
||||
"intro": "",
|
||||
"buy_url": "付款二维码Url"
|
||||
},
|
||||
{
|
||||
"prod_id": "240002",
|
||||
"prod_name": "月卡会员",
|
||||
"unit_price": 3000,
|
||||
"mark_price": 4900,
|
||||
"intro": "",
|
||||
"buy_url": "付款二维码Url"
|
||||
},
|
||||
{
|
||||
"prod_id": "240001",
|
||||
"prod_name": "年费会员",
|
||||
"unit_price": 9800,
|
||||
"mark_price": 36500,
|
||||
"intro": "",
|
||||
"buy_url": "付款二维码Url"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errmsg": "ok",
|
||||
"errno": "00000",
|
||||
"host_time": "20250528102206"
|
||||
}
|
||||
```
|
||||
|
||||
## 六、查询付款状态
|
||||
|
||||
POST /vpapi/meb/product-buy-qry
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称| 位置 |类型| 必选 | 值 |
|
||||
|---|--------|---|----|---------------------------------------------------------|
|
||||
|cookie| header |string| 是 | mss=3092447f3f26snCUIBpCShl3_kRxkaJsephz*************** |
|
||||
|prod_id| param |string| 是 | 240002 |
|
||||
|
||||
> 返回示例
|
||||
|
||||
未支付
|
||||
|
||||
```json
|
||||
{
|
||||
"body":{},
|
||||
"errmsg":"没有查到订单",
|
||||
"errno":"ERROR",
|
||||
"host_time":"20250528102227"
|
||||
}
|
||||
```
|
||||
已支付
|
||||
|
||||
```json
|
||||
{
|
||||
"body":{
|
||||
"status":"paysuc"
|
||||
},
|
||||
"errmsg":"没有查到订单",
|
||||
"errno":"ERROR",
|
||||
"host_time":"20250528102227"
|
||||
}
|
||||
```
|
||||
|
||||
## 七、查询付款状态
|
||||
|
||||
POST /vpapi/meb/product-buy-qry
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称| 位置 |类型| 必选 | 值 |
|
||||
|---|--------|---|----|---------------------------------------------------------|
|
||||
|cookie| header |string| 是 | mss=3092447f3f26snCUIBpCShl3_kRxkaJsephz*************** |
|
||||
|prod_id| param |string| 是 | 240002 |
|
||||
|
||||
> 返回示例
|
||||
|
||||
未支付
|
||||
|
||||
```json
|
||||
{
|
||||
"body":{},
|
||||
"errmsg":"没有查到订单",
|
||||
"errno":"ERROR",
|
||||
"host_time":"20250528102227"
|
||||
}
|
||||
```
|
||||
已支付
|
||||
|
||||
```json
|
||||
{
|
||||
"body":{
|
||||
"status":"paysuc"
|
||||
},
|
||||
"errmsg":"没有查到订单",
|
||||
"errno":"ERROR",
|
||||
"host_time":"20250528102227"
|
||||
}
|
||||
```
|
||||
|
||||
八、退出
|
||||
|
||||
POST /vpapi/meb/logout
|
||||
|
||||
### 请求参数
|
||||
|
||||
|名称| 位置 |类型| 必选 | 值 |
|
||||
|---|--------|---|----|---------------------------------------------------------|
|
||||
|cookie| header |string| 是 | mss=3092447f3f26snCUIBpCShl3_kRxkaJsephz*************** |
|
||||
|
||||
> 返回示例
|
||||
|
||||
```json
|
||||
{
|
||||
"body":{},
|
||||
"errmsg":"ok",
|
||||
"errno":"00000",
|
||||
"host_time":"20250528104040"
|
||||
}
|
||||
|
||||
```
|
||||
81
mms-docs/mms-doc-api/pom.xml
Normal file
81
mms-docs/mms-doc-api/pom.xml
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<artifactId>mms-docs</artifactId>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>mms-doc-api</artifactId>
|
||||
<description>文档接口模块</description>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- 后台管理系统核心包 -->
|
||||
<dependency>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms-framework</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms-oss</artifactId>
|
||||
<exclusions>
|
||||
<!-- 解决slf4j冲突 -->
|
||||
<exclusion>
|
||||
<artifactId>slf4j-reload4j</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms-sms</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms-wx</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,46 @@
|
||||
package com.sxpcwlkj;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.x.file.storage.spring.EnableFileStorage;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* @author 西决
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@Slf4j
|
||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||
@MapperScan(basePackages = {"com.sxpcwlkj.**.mapper"})
|
||||
|
||||
@EnableFileStorage
|
||||
public class MmsDocApiApplication {
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
|
||||
ConfigurableApplicationContext applicationContext = SpringApplication.run(MmsDocApiApplication.class, args);
|
||||
Environment env = applicationContext.getEnvironment();
|
||||
System.out.println("文档API端: 系统启动成功,当前环境为: " + env.getProperty("spring.profiles.active"));
|
||||
log.info("\n----------------------------------------------------------\n\t" +
|
||||
"Application '{}' is running! Access URLs:\n\t" +
|
||||
"Local: \t\thttp://localhost:{}\n\t" +
|
||||
"External: \thttp://{}:{}\n\t" +
|
||||
"Doc: \t\t{}\n" +
|
||||
"----------------------------------------------------------",
|
||||
env.getProperty("sxpcwlkj.name"),
|
||||
env.getProperty("server.port"),
|
||||
InetAddress.getLocalHost().getHostAddress(),
|
||||
env.getProperty("server.port"),
|
||||
env.getProperty("sxpcwlkj.docUrl"));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.sxpcwlkj.docApi.config;
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 西决
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class InitConfig {
|
||||
private final ApplicationContext applicationContext;
|
||||
/**
|
||||
* 初始化配置参数到缓存中
|
||||
*/
|
||||
@PostConstruct
|
||||
private void init() {
|
||||
Map<Long, Config> configMap = new HashMap<>();
|
||||
applicationContext.publishEvent(new ContextRefreshedEvent(applicationContext));
|
||||
log.info("项目初始化....");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,315 @@
|
||||
package com.sxpcwlkj.docApi.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
|
||||
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
|
||||
import com.ijpay.core.enums.TradeType;
|
||||
import com.ijpay.core.kit.WxPayKit;
|
||||
import com.sxpcwlkj.authority.LoginObject;
|
||||
import com.sxpcwlkj.common.code.entity.WxCodeBo;
|
||||
import com.sxpcwlkj.common.enums.DeviceEnum;
|
||||
import com.sxpcwlkj.common.enums.WxCodeStatusEnum;
|
||||
import com.sxpcwlkj.common.utils.*;
|
||||
import com.sxpcwlkj.docApi.entity.DocOrder;
|
||||
import com.sxpcwlkj.docApi.entity.DocProduct;
|
||||
import com.sxpcwlkj.docApi.entity.DocUser;
|
||||
import com.sxpcwlkj.docApi.entity.bo.MyRequest;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocOrderVo;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.docApi.mapper.DocConfigMapper;
|
||||
import com.sxpcwlkj.docApi.mapper.DocOrderMapper;
|
||||
import com.sxpcwlkj.docApi.mapper.DocProductMapper;
|
||||
import com.sxpcwlkj.docApi.service.DocOrderService;
|
||||
import com.sxpcwlkj.docApi.service.DocUserService;
|
||||
import com.sxpcwlkj.docApi.utils.DocR;
|
||||
import com.sxpcwlkj.redis.RedisUtil;
|
||||
import com.sxpcwlkj.redis.constant.RedisConstant;
|
||||
import com.sxpcwlkj.wx.service.WxCodeService;
|
||||
import com.sxpcwlkj.wx.service.WxOrderService;
|
||||
import com.sxpcwlkj.wx.service.WxService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author shanpengnian
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/doc-api/meb/v1")
|
||||
public class DocUserController{
|
||||
|
||||
private final DocUserService docUserService;
|
||||
private final DocOrderMapper docOrderMapper;
|
||||
private final DocConfigMapper docConfigMapper;
|
||||
private final WxCodeService wxCodeService;
|
||||
private final DocProductMapper docProductMapper;
|
||||
private final WxOrderService wxOrderService;
|
||||
private final WxService wxService;
|
||||
private final DocOrderService docOrderService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param request 请求
|
||||
* @param response 响应
|
||||
* @return 用户信息
|
||||
*/
|
||||
@SaIgnore
|
||||
@PostMapping("/userinfo")
|
||||
public R<DocUserVo> userinfo(HttpServletRequest request, HttpServletResponse response){
|
||||
DocUserVo docUserVo = LoginObject.getLoginObject(DocUserVo.class);
|
||||
if(docUserVo==null){
|
||||
return R.fail("会话过期");
|
||||
}
|
||||
docOrderMapper.delete(new LambdaQueryWrapper<DocOrder>().eq(DocOrder::getUid,docUserVo.getUid())
|
||||
.eq(DocOrder::getStatus,0)
|
||||
.le(DocOrder::getCtime,DateUtil.getAddDate(new Date(),0,0,0,1,0,0,0))
|
||||
);
|
||||
List<DocOrderVo> orderVos= docOrderMapper.selectVoList(new LambdaQueryWrapper<DocOrder>()
|
||||
.eq(DocOrder::getUid,docUserVo.getUid())
|
||||
.eq(DocOrder::getStatus, 1)
|
||||
.orderByAsc(DocOrder::getCtime));
|
||||
//根据付款时间,计算累计的VIP天数
|
||||
|
||||
Date expireTime=docUserVo.getCtime();
|
||||
for (DocOrderVo docOrderVo : orderVos) {
|
||||
//判断订单时间,是否大于 到期时间
|
||||
if(docOrderVo.getCtime().after(expireTime)){
|
||||
expireTime=docOrderVo.getCtime();
|
||||
}
|
||||
String day= docConfigMapper.selectByKey(docOrderVo.getProdId());
|
||||
if(day==null){
|
||||
day="0";
|
||||
}
|
||||
expireTime=DateUtil.getAddDate(expireTime,0,0, Integer.parseInt(day),0,0,0,0);
|
||||
}
|
||||
|
||||
if(!new Date().after(expireTime)){
|
||||
docUserVo.setType("vip");
|
||||
docUserVo.setVip_date(expireTime);
|
||||
}else {
|
||||
docUserVo.setVip_date(DateUtil.getStrToDate("2025-01-01 00:00:00"));
|
||||
docUserVo.setType("usr");
|
||||
}
|
||||
|
||||
return R.success(docUserVo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 登录二维码
|
||||
* @return 二维码
|
||||
*/
|
||||
@SaIgnore
|
||||
@PostMapping("/oauth-authorize")
|
||||
public R<Map<String,String>> oauthAuthorize(){
|
||||
Map<String,String> data= new HashMap<>();
|
||||
String state=RandomUtil.getRandomUUID();
|
||||
String codeUrl= wxCodeService.getCode(new WxCodeBo(state)
|
||||
.typeDocLogin()
|
||||
.expireTime(1000*60)
|
||||
.paramData(state));
|
||||
data.put("url",codeUrl);
|
||||
data.put("state",state);
|
||||
return R.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录二维码轮询
|
||||
* @param bo 请求
|
||||
* @return 登录状态
|
||||
*/
|
||||
@SaIgnore
|
||||
@PostMapping("/oauth-polling")
|
||||
public R<Map<String,String>> oauthPolling(@RequestBody MyRequest bo,HttpServletRequest request, HttpServletResponse response){
|
||||
String state = bo.getState();
|
||||
|
||||
Map<String,String> data= new HashMap<>();
|
||||
data.put("status","0");
|
||||
if(state==null){
|
||||
return R.fail("state不能为空!");
|
||||
}
|
||||
//登录二维码
|
||||
WxCodeBo wxCodeBo= wxCodeService.getCodeState(new WxCodeBo(state).typeDocLogin());
|
||||
if(Objects.equals(wxCodeBo.getState(), WxCodeStatusEnum.SUCCEED.getValue())){
|
||||
log.info(wxCodeBo.getOpenId());
|
||||
DocUser vo= docUserService.bindingOpenId(wxCodeBo.getOpenId());
|
||||
data.put("status","1");
|
||||
String token = LoginObject.loginToken(vo.getUid(), DeviceEnum.PC.getType(), 10000000L, "id", vo.getUid());
|
||||
RedisUtil.setCacheObject(RedisConstant.PC_KEY+vo.getUid(),vo, Duration.ofSeconds(10000000L));
|
||||
//data.put("token",token);
|
||||
CookieUtil.setCookie(response,"docToken",token,1000*60*60*24*7);
|
||||
}
|
||||
return R.success(data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
* @param request 请求
|
||||
* @return 商品列表
|
||||
*/
|
||||
@SaCheckLogin
|
||||
@PostMapping("/product-list")
|
||||
public R<Map<String,Object>> productList(HttpServletRequest request){
|
||||
String uid= LoginObject.getLoginId();
|
||||
List<DocProduct> docProducts= docProductMapper.selectList(new LambdaQueryWrapper<DocProduct>().eq(DocProduct::getStatus,1).orderByAsc(DocProduct::getSort));
|
||||
Map<String,Object> endData= new HashMap<>();
|
||||
List<Map<String,String>> data= new ArrayList<>();
|
||||
for (DocProduct docProduct : docProducts) {
|
||||
Map<String,String> map= new HashMap<>();
|
||||
map.put("prod_id",docProduct.getProdId());
|
||||
map.put("prod_name",docProduct.getProdName());
|
||||
map.put("unit_price",docProduct.getUnitPrice());
|
||||
map.put("mark_price",docProduct.getMarkPrice());
|
||||
map.put("intro",docProduct.getType());
|
||||
|
||||
DocUserVo docUserVo= docUserService.selectVoById(uid);
|
||||
if(docUserVo==null){
|
||||
return R.fail("会话过期");
|
||||
}
|
||||
Map<String,Object> orderInfo= new HashMap<>();
|
||||
orderInfo.put("openId",docUserVo.getOpenId());
|
||||
orderInfo.put("orderNo",System.currentTimeMillis()+"");
|
||||
orderInfo.put("productTitle",docProduct.getProdName());
|
||||
orderInfo.put("productId",docProduct.getProdId());
|
||||
orderInfo.put("productType",docProduct.getType());
|
||||
orderInfo.put("payPrice",docProduct.getUnitPrice());
|
||||
orderInfo.put("ip",IPUtil.getIp(request));
|
||||
orderInfo.put("tradeType", TradeType.NATIVE.getTradeType());
|
||||
orderInfo.put("mchId","");
|
||||
orderInfo.put("expireTime",System.currentTimeMillis()+1000*60*3);
|
||||
//获取当前请求域名
|
||||
String url=request.getHeader("Host");
|
||||
System.out.println("回调:"+url);
|
||||
orderInfo.put("notifyUrl","https://mmsadmin.cn/doc-api/meb/v1/payNotify");
|
||||
R<Object> r= wxOrderService.createPay(orderInfo);
|
||||
map.put("orderNo",orderInfo.get("orderNo").toString());
|
||||
map.put("buy_url",r.getData().toString());
|
||||
|
||||
docOrderService.create(docUserVo,orderInfo);
|
||||
|
||||
data.add(map);
|
||||
}
|
||||
endData.put("items",data);
|
||||
|
||||
return R.success(endData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 付款状态轮询
|
||||
* @param request 请求
|
||||
* @return 登录状态
|
||||
*/
|
||||
@SaCheckLogin
|
||||
@PostMapping("/product-buy-qry")
|
||||
public R<Map<String,String>> productBuyQry(@RequestBody MyRequest bo,HttpServletRequest request){
|
||||
String orderNo = bo.getOrderNo();
|
||||
|
||||
Map<String,String> data= new HashMap<>();
|
||||
data.put("status","0");
|
||||
if(orderNo==null){
|
||||
return R.fail("prodId不能为空!");
|
||||
}
|
||||
data.put("status",docOrderService.selectPayState(orderNo,LoginObject.getLoginId()));
|
||||
return R.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*/
|
||||
@SaCheckLogin
|
||||
@PostMapping("/logout")
|
||||
public R<String> logout(HttpServletResponse response){
|
||||
StpUtil.logout();
|
||||
CookieUtil.setCookie(response,"token","",0);
|
||||
return R.success("退出成功!");
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 支付回调-官方微信
|
||||
// * @param req 请求
|
||||
// * @param resp 响应
|
||||
// * @param body 请求体
|
||||
// * @return 响应
|
||||
// */
|
||||
// @SaIgnore
|
||||
// @PostMapping("/notify")
|
||||
// public String notify(HttpServletRequest req, HttpServletResponse resp, @RequestBody String body){
|
||||
// WxPayOrderNotifyResult result = null;
|
||||
// try {
|
||||
// System.out.println("X=:" + body);
|
||||
// result = wxService.getWxPayService(TradeType.NATIVE.getTradeType()).parseOrderNotifyResult(body,TradeType.NATIVE.getTradeType());
|
||||
// // 结果正确 outTradeNo
|
||||
// log.warn("交易单号:" + result.getTransactionId());
|
||||
// log.warn("订单号:" + result.getOutTradeNo());
|
||||
// log.warn("付款金额:" + BaseWxPayResult.fenToYuan(result.getTotalFee()));
|
||||
//
|
||||
// if ("SUCCESS".equals(result.getResultCode())) {
|
||||
// log.warn("支付回调进来了:付款成功");
|
||||
// // 更新订单状态
|
||||
// // 更新库存
|
||||
// // 发送通知
|
||||
// // 发送邮件
|
||||
// // 发送短信
|
||||
// // 发送微信消息
|
||||
// docOrderService.updateByOrderNo(result.getTransactionId());
|
||||
// return "SUCCESS";
|
||||
// } else {
|
||||
// log.warn("支付回调进来了:付款失败");
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("商品支付报错了",e);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 微信支付WxPay
|
||||
* 异步通知
|
||||
*/
|
||||
@RequestMapping(value = "/payNotify", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
@ResponseBody
|
||||
@SaIgnore
|
||||
public String payNotify(HttpServletRequest request,@RequestBody String body) {
|
||||
String xmlMsg = body;
|
||||
log.info("支付通知=" + xmlMsg);
|
||||
Map<String, String> params = WxPayKit.xmlToMap(xmlMsg);
|
||||
|
||||
String returnCode = params.get("return_code");
|
||||
|
||||
// 注意重复通知的情况,同一订单号可能收到多次通知,请注意一定先判断订单状态
|
||||
// 注意此处签名方式需与统一下单的签名类型一致
|
||||
if (wxOrderService.verifyNotify(params)) {
|
||||
if (WxPayKit.codeIsOk(returnCode)) {
|
||||
// 更新订单信息
|
||||
docOrderService.updateByOrderNo(params.get("out_trade_no"));
|
||||
// 发送通知等
|
||||
Map<String, String> xml = new HashMap<String, String>(2);
|
||||
xml.put("return_code", "SUCCESS");
|
||||
xml.put("return_msg", "OK");
|
||||
return WxPayKit.toXml(xml);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package com.sxpcwlkj.docApi.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档授权用户
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_authorize_user")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocAuthorizeUser extends BaseEntity {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 授权平台
|
||||
*/
|
||||
private String chan;
|
||||
/**
|
||||
* 授权平台标识
|
||||
*/
|
||||
private String appid;
|
||||
/**
|
||||
* 授权平台用户ID
|
||||
*/
|
||||
private String openid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.sxpcwlkj.docApi.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档配置
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_config")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocConfig extends BaseEntity {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
/**
|
||||
* KEY
|
||||
*/
|
||||
private String key;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.sxpcwlkj.docApi.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档订单
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_order")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocOrder extends BaseEntity {
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@TableId
|
||||
private String orderId;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal txnAmt;
|
||||
/**
|
||||
* 支付商户号
|
||||
*/
|
||||
private String payMchid;
|
||||
/**
|
||||
* 支付平台流水号
|
||||
*/
|
||||
private String payNo;
|
||||
/**
|
||||
* 支付超时时间
|
||||
*/
|
||||
private String payTimeout;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
private BigDecimal prodPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String prodType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.sxpcwlkj.docApi.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档商品
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_product")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocProduct extends BaseEntity {
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@TableId
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 销售单价
|
||||
*/
|
||||
private String unitPrice;
|
||||
/**
|
||||
* 市场价格
|
||||
*/
|
||||
private String markPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.sxpcwlkj.docApi.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档用户
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_user")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DocUser extends BaseEntity {
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@TableId
|
||||
private String uid;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
/**
|
||||
* 微信ID
|
||||
*/
|
||||
private String openId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.sxpcwlkj.docApi.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import com.sxpcwlkj.docApi.entity.DocAuthorizeUser;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档授权用户Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocAuthorizeUser.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocAuthorizeUserBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotBlank(message = "ID不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@NotBlank(message = "用户编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String uid;
|
||||
/**
|
||||
* 授权平台
|
||||
*/
|
||||
@NotBlank(message = "授权平台不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String chan;
|
||||
/**
|
||||
* 授权平台标识
|
||||
*/
|
||||
@NotBlank(message = "授权平台标识不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String appid;
|
||||
/**
|
||||
* 授权平台用户ID
|
||||
*/
|
||||
@NotBlank(message = "授权平台用户ID不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String openid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotNull(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotNull(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.sxpcwlkj.docApi.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import com.sxpcwlkj.docApi.entity.DocConfig;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档配置Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocConfig.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocConfigBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotBlank(message = "ID不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String id;
|
||||
/**
|
||||
* KEY
|
||||
*/
|
||||
@NotBlank(message = "KEY不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String key;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@NotBlank(message = "值不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String value;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotNull(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotNull(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.sxpcwlkj.docApi.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import com.sxpcwlkj.docApi.entity.DocOrder;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档订单Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocOrder.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocOrderBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@NotBlank(message = "订单编号不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String orderId;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@NotBlank(message = "用户编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String uid;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
@NotNull(message = "订单金额不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private BigDecimal txnAmt;
|
||||
/**
|
||||
* 支付商户号
|
||||
*/
|
||||
@NotBlank(message = "支付商户号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String payMchid;
|
||||
/**
|
||||
* 支付平台流水号
|
||||
*/
|
||||
@NotBlank(message = "支付平台流水号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String payNo;
|
||||
/**
|
||||
* 支付超时时间
|
||||
*/
|
||||
@NotBlank(message = "支付超时时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String payTimeout;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@NotBlank(message = "产品编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@NotBlank(message = "产品名称不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodName;
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
@NotNull(message = "产品价格不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private BigDecimal prodPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
@NotBlank(message = "产品类型不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotBlank(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotBlank(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.sxpcwlkj.docApi.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import com.sxpcwlkj.docApi.entity.DocProduct;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 文档商品Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocProduct.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocProductBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@NotBlank(message = "产品编号不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@NotBlank(message = "产品名称不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String prodName;
|
||||
/**
|
||||
* 销售单价
|
||||
*/
|
||||
@NotBlank(message = "销售单价不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String unitPrice;
|
||||
/**
|
||||
* 市场价格
|
||||
*/
|
||||
@NotBlank(message = "市场价格不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String markPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
@NotBlank(message = "产品类型不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotBlank(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotBlank(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String mtime;
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.sxpcwlkj.docApi.entity.bo;
|
||||
|
||||
import com.sxpcwlkj.datasource.entity.BaseEntity;
|
||||
import com.sxpcwlkj.docApi.entity.DocUser;
|
||||
import com.sxpcwlkj.framework.config.ValidatedGroupConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档用户Bo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Data
|
||||
@AutoMapper(target = DocUser.class, reverseConvertGenerate = false)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocUserBo extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@NotBlank(message = "用户编号不能为空" ,groups = {ValidatedGroupConfig.update.class})
|
||||
private String uid;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@NotBlank(message = "昵称不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String nickname;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@NotBlank(message = "头像不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String avatar;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@NotBlank(message = "用户类型不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@NotNull(message = "创建时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@NotNull(message = "更新时间不能为空" ,groups = {ValidatedGroupConfig.insert.class,ValidatedGroupConfig.update.class})
|
||||
private Date mtime;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.sxpcwlkj.docApi.entity.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author xijue
|
||||
*/
|
||||
@Data
|
||||
public class MyRequest {
|
||||
|
||||
private String state;
|
||||
|
||||
private String orderNo;
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package com.sxpcwlkj.docApi.entity.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.docApi.entity.DocAuthorizeUser;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档授权用户Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocAuthorizeUser.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocAuthorizeUserVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 授权平台
|
||||
*/
|
||||
private String chan;
|
||||
/**
|
||||
* 授权平台标识
|
||||
*/
|
||||
private String appid;
|
||||
/**
|
||||
* 授权平台用户ID
|
||||
*/
|
||||
private String openid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.sxpcwlkj.docApi.entity.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.docApi.entity.DocConfig;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档配置Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocConfig.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocConfigVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* KEY
|
||||
*/
|
||||
private String key;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.sxpcwlkj.docApi.entity.vo;
|
||||
|
||||
|
||||
import com.sxpcwlkj.docApi.entity.DocOrder;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档订单Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocOrder.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocOrderVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal txnAmt;
|
||||
/**
|
||||
* 支付商户号
|
||||
*/
|
||||
private String payMchid;
|
||||
/**
|
||||
* 支付平台流水号
|
||||
*/
|
||||
private String payNo;
|
||||
/**
|
||||
* 支付超时时间
|
||||
*/
|
||||
private String payTimeout;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
private BigDecimal prodPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String prodType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package com.sxpcwlkj.docApi.entity.vo;
|
||||
|
||||
|
||||
import com.sxpcwlkj.docApi.entity.DocProduct;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 文档商品Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocProduct.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocProductVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String prodId;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
/**
|
||||
* 销售单价
|
||||
*/
|
||||
private String unitPrice;
|
||||
/**
|
||||
* 市场价格
|
||||
*/
|
||||
private String markPrice;
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String mtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package com.sxpcwlkj.docApi.entity.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sxpcwlkj.common.utils.DateUtil;
|
||||
import com.sxpcwlkj.docApi.entity.DocUser;
|
||||
import com.sxpcwlkj.framework.entity.BaseEntityVo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文档用户Vo
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AutoMapper(target = DocUser.class)
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DocUserVo extends BaseEntityVo{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String uid;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date ctime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
|
||||
private Date mtime;
|
||||
|
||||
private Date vip_date;
|
||||
|
||||
private String openId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.sxpcwlkj.docApi.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 接口返回错误码枚举
|
||||
*/
|
||||
public enum DefStaticEnum implements IEnum {
|
||||
|
||||
/**
|
||||
* 会员默认注册头像
|
||||
*/
|
||||
MEMBER_DEF_HEADER_IMG("MEMBER_DEF_HEADER_IMG","https://picsum.photos/30/30"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
@Getter
|
||||
private String key;
|
||||
private String value;
|
||||
|
||||
DefStaticEnum(String key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docApi.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docApi.entity.DocAuthorizeUser;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocAuthorizeUserVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档授权用户-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocAuthorizeUserMapper extends BaseMapperPlus<DocAuthorizeUser, DocAuthorizeUserVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.sxpcwlkj.docApi.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docApi.entity.DocConfig;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocConfigVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档配置-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocConfigMapper extends BaseMapperPlus<DocConfig, DocConfigVo> {
|
||||
|
||||
@Select("select COALESCE(c.value, 0) AS value from doc_config c left join doc_product p on c.`key`=p.code where p.prod_id=#{prodId}")
|
||||
String selectByKey(@Param("prodId") String prodId);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docApi.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docApi.entity.DocOrder;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocOrderVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档订单-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocOrderMapper extends BaseMapperPlus<DocOrder, DocOrderVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docApi.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docApi.entity.DocProduct;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocProductVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档商品-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocProductMapper extends BaseMapperPlus<DocProduct, DocProductVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.sxpcwlkj.docApi.mapper;
|
||||
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docApi.entity.DocUser;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocUserVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 文档用户-Mapper
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DocUserMapper extends BaseMapperPlus<DocUser, DocUserVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.sxpcwlkj.docApi.service;
|
||||
|
||||
import com.sxpcwlkj.docApi.entity.DocOrder;
|
||||
import com.sxpcwlkj.docApi.entity.bo.DocOrderBo;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocOrderVo;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.framework.sercice.BaseService;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档订单-接口
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
* @describe 支持自定义扩展,已继承接口:{insert、deleteById、updateById、selectById、getByEntityListPage}(更多查看BaseService接口)
|
||||
*/
|
||||
public interface DocOrderService extends BaseService<DocOrder, DocOrderVo, DocOrderBo> {
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
* @param docUserVo 用户信息
|
||||
* @param orderInfo 订单信息
|
||||
* @return true:成功 false :失败
|
||||
*/
|
||||
Boolean create(DocUserVo docUserVo, Map<String, Object> orderInfo);
|
||||
|
||||
/**
|
||||
* 查询支付状态
|
||||
* @param orderId 订单编号
|
||||
* @param uid 用户编号
|
||||
* @return 支付状态
|
||||
*/
|
||||
String selectPayState(String orderId,String uid);
|
||||
|
||||
/**
|
||||
* 更新订单状态
|
||||
* @param transactionId 订单编号
|
||||
* @return true:成功 false :失败
|
||||
*/
|
||||
Boolean updateByOrderNo(String transactionId);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.sxpcwlkj.docApi.service;
|
||||
|
||||
import com.sxpcwlkj.docApi.entity.DocUser;
|
||||
import com.sxpcwlkj.docApi.entity.bo.DocUserBo;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.framework.sercice.BaseService;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档用户-接口
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
* @describe 支持自定义扩展,已继承接口:{insert、deleteById、updateById、selectById、getByEntityListPage}(更多查看BaseService接口)
|
||||
*/
|
||||
public interface DocUserService extends BaseService<DocUser, DocUserVo, DocUserBo> {
|
||||
|
||||
/**
|
||||
* 绑定openId
|
||||
* @param openId openId
|
||||
* @return 用户
|
||||
*/
|
||||
DocUser bindingOpenId(String openId);
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package com.sxpcwlkj.docApi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sxpcwlkj.common.utils.DataUtil;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.datasource.entity.page.PageQuery;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docApi.entity.DocOrder;
|
||||
import com.sxpcwlkj.docApi.entity.bo.DocOrderBo;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocOrderVo;
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.docApi.mapper.DocOrderMapper;
|
||||
import com.sxpcwlkj.docApi.service.DocOrderService;
|
||||
import com.sxpcwlkj.framework.sercice.impl.BaseServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author shanpengnian
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@Service("doc_order")
|
||||
@RequiredArgsConstructor
|
||||
public class DocOrderServiceImpl extends BaseServiceImpl<DocOrder, DocOrderVo, DocOrderBo> implements DocOrderService {
|
||||
|
||||
private final DocOrderMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public BaseMapperPlus<DocOrder, DocOrderVo> getBaseMapper() {
|
||||
return baseMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(DocOrderBo bo) {
|
||||
try {
|
||||
int row;
|
||||
bo.setOrderId(null);
|
||||
DocOrder obj = MapstructUtil.convert(bo, DocOrder.class);
|
||||
assert obj != null;
|
||||
row = this.getBaseMapper().insert(obj);
|
||||
bo.setOrderId(obj.getOrderId());
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档订单,insert 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteById(Serializable ids) {
|
||||
try {
|
||||
String[] array = DataUtil.getCatStr(ids.toString(), ",");
|
||||
return this.getBaseMapper().deleteByIds(new ArrayList<>(List.of(array)))>0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档订单,deleteById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateById(DocOrderBo bo) {
|
||||
try {
|
||||
int row;
|
||||
DocOrder obj = MapstructUtil.convert(bo, DocOrder.class);
|
||||
row = this.getBaseMapper().updateById(obj);
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档订单,updateById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocOrderVo selectVoById(Serializable id) {
|
||||
return this.getBaseMapper().selectVoById(id);
|
||||
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<DocOrderVo> selectListVoPage(DocOrderBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DocOrder> lqw = buildQueryWrapper(bo);
|
||||
Page<DocOrderVo> page = baseMapper.selectVoPage(pageQuery.build(),lqw);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DocOrder> buildQueryWrapper(DocOrderBo query){
|
||||
if(query==null){
|
||||
query=new DocOrderBo();
|
||||
}
|
||||
LambdaQueryWrapper<DocOrder> wrapper = Wrappers.lambdaQuery();
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean create(DocUserVo docUserVo, Map<String, Object> orderInfo) {
|
||||
DocOrderBo docOrderBo= new DocOrderBo();
|
||||
docOrderBo.setUid(docUserVo.getUid());
|
||||
docOrderBo.setTxnAmt(new BigDecimal(orderInfo.get("payPrice").toString()));
|
||||
docOrderBo.setProdId(orderInfo.get("productId").toString());
|
||||
docOrderBo.setProdName(orderInfo.get("productTitle").toString());
|
||||
docOrderBo.setProdPrice(new BigDecimal(orderInfo.get("payPrice").toString()));
|
||||
docOrderBo.setProdType(orderInfo.get("productType").toString());
|
||||
docOrderBo.setStatus(0);
|
||||
docOrderBo.setPayNo(orderInfo.get("orderNo").toString());
|
||||
docOrderBo.setPayTimeout(orderInfo.get("expireTime").toString());
|
||||
docOrderBo.setCtime(new Date());
|
||||
docOrderBo.setMtime(new Date());
|
||||
|
||||
return this.insert(docOrderBo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectPayState(String orderNo,String uid) {
|
||||
DocOrder docOrder= baseMapper.selectOne(new LambdaQueryWrapper<DocOrder>()
|
||||
.eq(DocOrder::getPayNo,orderNo).eq(DocOrder::getUid,uid)
|
||||
.eq(DocOrder::getStatus,1)
|
||||
.orderByDesc(DocOrder::getCtime)
|
||||
);
|
||||
if(docOrder!=null){
|
||||
return "finish";
|
||||
}
|
||||
return "unpaid";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByOrderNo(String transactionId) {
|
||||
DocOrder docOrder= baseMapper.selectOne(new LambdaQueryWrapper<DocOrder>().eq(DocOrder::getPayNo,transactionId));
|
||||
if(docOrder!=null){
|
||||
docOrder.setStatus(1);
|
||||
docOrder.setMtime(new Date());
|
||||
return baseMapper.updateById(docOrder)>0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package com.sxpcwlkj.docApi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sxpcwlkj.common.utils.DataUtil;
|
||||
import com.sxpcwlkj.common.utils.MapstructUtil;
|
||||
import com.sxpcwlkj.datasource.entity.page.PageQuery;
|
||||
import com.sxpcwlkj.datasource.entity.page.TableDataInfo;
|
||||
import com.sxpcwlkj.datasource.mapper.BaseMapperPlus;
|
||||
import com.sxpcwlkj.docApi.entity.DocUser;
|
||||
import com.sxpcwlkj.docApi.entity.bo.DocUserBo;
|
||||
|
||||
import com.sxpcwlkj.docApi.entity.vo.DocUserVo;
|
||||
import com.sxpcwlkj.docApi.enums.DefStaticEnum;
|
||||
import com.sxpcwlkj.docApi.mapper.DocUserMapper;
|
||||
import com.sxpcwlkj.docApi.service.DocUserService;
|
||||
import com.sxpcwlkj.docApi.utils.NicknameGenerator;
|
||||
import com.sxpcwlkj.framework.sercice.impl.BaseServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 文档用户-接口实现
|
||||
*
|
||||
* @author 西决
|
||||
* @Doc <a href='https://www.mmsadmin.com'>MMS文档</a>
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@Service("doc_user")
|
||||
@RequiredArgsConstructor
|
||||
public class DocUserServiceImpl extends BaseServiceImpl<DocUser, DocUserVo,DocUserBo> implements DocUserService {
|
||||
|
||||
private final DocUserMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public BaseMapperPlus<DocUser, DocUserVo> getBaseMapper() {
|
||||
return baseMapper;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(DocUserBo bo) {
|
||||
try {
|
||||
int row;
|
||||
bo.setUid(null);
|
||||
DocUser obj = MapstructUtil.convert(bo, DocUser.class);
|
||||
assert obj != null;
|
||||
row = this.getBaseMapper().insert(obj);
|
||||
bo.setUid(obj.getUid());
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档用户,insert 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteById(Serializable ids) {
|
||||
try {
|
||||
String[] array = DataUtil.getCatStr(ids.toString(), ",");
|
||||
return this.getBaseMapper().deleteByIds(new ArrayList<>(List.of(array)))>0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档用户,deleteById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateById(DocUserBo bo) {
|
||||
try {
|
||||
int row;
|
||||
DocUser obj = MapstructUtil.convert(bo, DocUser.class);
|
||||
row = this.getBaseMapper().updateById(obj);
|
||||
return row > 0;
|
||||
} catch (Exception e) {
|
||||
log.error("文档用户,updateById 操作失败", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocUserVo selectVoById(Serializable id) {
|
||||
return this.getBaseMapper().selectVoById(id);
|
||||
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<DocUserVo> selectListVoPage(DocUserBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DocUser> lqw = buildQueryWrapper(bo);
|
||||
Page<DocUserVo> page = baseMapper.selectVoPage(pageQuery.build(),lqw);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DocUser> buildQueryWrapper(DocUserBo query){
|
||||
if(query==null){
|
||||
query=new DocUserBo();
|
||||
}
|
||||
LambdaQueryWrapper<DocUser> wrapper = Wrappers.lambdaQuery();
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocUser bindingOpenId(String openId) {
|
||||
DocUser docUser= baseMapper.selectOne(new LambdaQueryWrapper<DocUser>().eq(DocUser::getOpenId,openId));
|
||||
if(docUser!=null){
|
||||
return docUser;
|
||||
}else {
|
||||
docUser= new DocUser();
|
||||
docUser.setNickname(NicknameGenerator.generateRandomNickname());
|
||||
docUser.setType("usr");
|
||||
docUser.setAvatar(DefStaticEnum.MEMBER_DEF_HEADER_IMG.getValue());
|
||||
docUser.setCtime(new Date());
|
||||
docUser.setMtime(new Date());
|
||||
docUser.setOpenId(openId);
|
||||
baseMapper.insert(docUser);
|
||||
}
|
||||
return docUser;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.sxpcwlkj.docApi.utils;
|
||||
|
||||
|
||||
import com.sxpcwlkj.common.enums.HttpStatusEnum;
|
||||
import com.sxpcwlkj.common.utils.R;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
/**
|
||||
* 返回结果集
|
||||
*
|
||||
* @author javadog
|
||||
**/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DocR<T> {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*/
|
||||
|
||||
private String errno;
|
||||
|
||||
|
||||
/**
|
||||
* 返回信息
|
||||
*/
|
||||
|
||||
private String errmsg;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
|
||||
private T body;
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
private String host_time;
|
||||
|
||||
/**
|
||||
* 全参数方法
|
||||
* @param errno 状态
|
||||
* @param body 数据
|
||||
* @return 返回结果
|
||||
* @param <T> 泛型
|
||||
*/
|
||||
public static <T> DocR<T> response(String errno, String errmsg, T body) {
|
||||
DocR<T> ajaxResult = new DocR<>();
|
||||
ajaxResult.setErrno(errno);
|
||||
ajaxResult.setErrmsg(errmsg);
|
||||
ajaxResult.setBody(body);
|
||||
ajaxResult.setHost_time(System.currentTimeMillis()+"");
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功
|
||||
* @param body 数据
|
||||
* @return 返回结果
|
||||
* @param <T> 泛型
|
||||
*/
|
||||
public static <T> DocR<T> success(String errmsg, T body) {
|
||||
DocR<T> ajaxResult = new DocR<>();
|
||||
ajaxResult.setErrno("00000");
|
||||
ajaxResult.setErrmsg(errmsg);
|
||||
ajaxResult.setBody(body);
|
||||
ajaxResult.setHost_time(System.currentTimeMillis()+"");
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功 + OK
|
||||
* @param body 数据
|
||||
* @return 返回结果
|
||||
* @param <T> 泛型
|
||||
*/
|
||||
public static <T> DocR<T> ok( T body) {
|
||||
DocR<T> ajaxResult = new DocR<>();
|
||||
ajaxResult.setErrno("00000");
|
||||
ajaxResult.setErrmsg("OK");
|
||||
ajaxResult.setBody(body);
|
||||
ajaxResult.setHost_time(System.currentTimeMillis()+"");
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
public static <T> DocR<T> error(String errno, String errmsg) {
|
||||
DocR<T> ajaxResult = new DocR<>();
|
||||
ajaxResult.setErrno(errno);
|
||||
ajaxResult.setErrmsg(errmsg);
|
||||
ajaxResult.setHost_time(System.currentTimeMillis()+"");
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
package com.sxpcwlkj.docApi.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.jwt.JWT;
|
||||
import cn.hutool.jwt.JWTHeader;
|
||||
import cn.hutool.jwt.JWTUtil;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.hutool.core.lang.Singleton.put;
|
||||
|
||||
/**
|
||||
* @author shanpengnian
|
||||
*/
|
||||
@Slf4j
|
||||
public class JwtUtil {
|
||||
|
||||
private final String KEY= "4548912314JKJ85HT==";
|
||||
|
||||
public String getId(HttpServletRequest request){
|
||||
String cookie = getCookieValue(request,"token");
|
||||
if(cookie!=null){
|
||||
if (StrUtil.isBlank(cookie) || cookie.split("\\.").length != 3) {
|
||||
log.error("无效的JWT格式: " + cookie);
|
||||
return "-1";
|
||||
}
|
||||
boolean verify = JWTUtil.verify(cookie, KEY.getBytes());
|
||||
if(verify){
|
||||
final JWT jwt = JWTUtil.parseToken(cookie);
|
||||
jwt.getHeader(JWTHeader.TYPE);
|
||||
return jwt.getPayload("id").toString();
|
||||
}
|
||||
}
|
||||
return "-1";
|
||||
}
|
||||
|
||||
public String createToken(String id){
|
||||
Map<String, Object> map = new HashMap<String, Object>() {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
put("id", id);
|
||||
put("expire_time", System.currentTimeMillis() + 1000 * 60 * 60 * 24 * 7);
|
||||
}
|
||||
};
|
||||
|
||||
return JWTUtil.createToken(map, KEY.getBytes());
|
||||
}
|
||||
|
||||
public String getCookieValue(HttpServletRequest request, String key) {
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if (cookies != null) {
|
||||
for (Cookie cookie : cookies) {
|
||||
if (key.equals(cookie.getName())) {
|
||||
return cookie.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.sxpcwlkj.docApi.utils;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author shanpengnian
|
||||
*/
|
||||
public class NicknameGenerator {
|
||||
// 形容词列表(可自行扩展)
|
||||
private static final String[] ADJECTIVES = {
|
||||
"快乐的", "神秘的", "勇敢的", "聪明的", "优雅的", "顽皮的", "阳光的", "冷静的",
|
||||
"热情的", "幽默的", "勤奋的", "温柔的", "机灵的", "威武的", "浪漫的", "潇洒的"
|
||||
};
|
||||
|
||||
// 名词列表(可自行扩展)
|
||||
private static final String[] NOUNS = {
|
||||
"熊猫", "狮子", "猎豹", "海豚", "雄鹰", "狐狸", "鲨鱼", "老虎",
|
||||
"飞鸟", "骏马", "天鹅", "鲸鱼", "蝴蝶", "狼", "孔雀", "凤凰"
|
||||
};
|
||||
|
||||
public static String generateRandomNickname() {
|
||||
Random random = new Random();
|
||||
|
||||
// 随机选择形容词和名词
|
||||
String adjective = ADJECTIVES[random.nextInt(ADJECTIVES.length)];
|
||||
String noun = NOUNS[random.nextInt(NOUNS.length)];
|
||||
|
||||
// 随机生成2-4位数字(可选部分)// 0-2的随机数决定是否添加数字
|
||||
int numberSuffix = random.nextInt(3);
|
||||
StringBuilder nickname = new StringBuilder(adjective + noun);
|
||||
// 50%概率添加数字
|
||||
if (numberSuffix > 0) {
|
||||
// 2-4位数字
|
||||
int digitCount = random.nextInt(3) + 2;
|
||||
for (int i = 0; i < digitCount; i++) {
|
||||
// 添加0-9的随机数字
|
||||
nickname.append(random.nextInt(10));
|
||||
}
|
||||
}
|
||||
|
||||
return nickname.toString();
|
||||
}
|
||||
|
||||
// 测试方法
|
||||
public static void main(String[] args) {
|
||||
// 生成10个示例昵称
|
||||
for (int i = 0; i < 10; i++) {
|
||||
System.out.println(generateRandomNickname());
|
||||
}
|
||||
}
|
||||
}
|
||||
139
mms-docs/mms-doc-api/src/main/resources/application-dev.yml
Normal file
139
mms-docs/mms-doc-api/src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,139 @@
|
||||
# 项目基础信息
|
||||
sxpcwlkj:
|
||||
# 开启验证码: true:开启 false: 关闭
|
||||
isOpenCaptcha: false
|
||||
|
||||
--- # powerjob 配置
|
||||
powerjob:
|
||||
worker:
|
||||
# 如何开启调度中心请查看文档教程
|
||||
enabled: false
|
||||
# 需要先在 powerjob 登录页执行应用注册后才能使用
|
||||
app-name: mms
|
||||
enable-test-mode: false
|
||||
max-appended-wf-context-length: 4096
|
||||
max-result-length: 4096
|
||||
# 28080 端口 随着主应用端口飘逸 避免集群冲突
|
||||
port: 2${server.port}
|
||||
protocol: http
|
||||
server-address: 127.0.0.1:7700
|
||||
store-strategy: disk
|
||||
|
||||
|
||||
--- # Spring Boot Admin
|
||||
spring:
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
enabled: false #启用/禁用
|
||||
instance:
|
||||
service-host-type: IP
|
||||
# Spring Boot Admin
|
||||
url: http://localhost:9001 #监控服务器端地址
|
||||
username: admin #账号
|
||||
password: 123456 #密码
|
||||
|
||||
--- #配置项目的数据源 https://www.kancloud.cn/tracy5546/dynamic-datasource/2344619
|
||||
--- # 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
dynamic:
|
||||
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||
p6spy: true
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
# 严格模式 匹配不到数据源则报错
|
||||
strict: true
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 123456
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||||
# username: ROOT
|
||||
# password: root
|
||||
# hikari:
|
||||
# connectionTestQuery: SELECT 1 FROM DUAL
|
||||
# postgres:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||
# username: root
|
||||
# password: root
|
||||
# sqlserver:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
||||
# username: SA
|
||||
# password: root
|
||||
hikari:
|
||||
# 最大连接池数量
|
||||
maxPoolSize: 20
|
||||
# 最小空闲线程数量
|
||||
minIdle: 10
|
||||
# 配置获取连接等待超时的时间
|
||||
connectionTimeout: 30000
|
||||
# 校验超时时间
|
||||
validationTimeout: 5000
|
||||
# 空闲连接存活最大时间,默认10分钟
|
||||
idleTimeout: 600000
|
||||
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||
maxLifetime: 1800000
|
||||
# 连接测试query(配置检测连接是否有效)
|
||||
connectionTestQuery: SELECT 1
|
||||
# 多久检查一次连接的活性
|
||||
keepaliveTime: 30000
|
||||
|
||||
--- # Redis配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
database: 0
|
||||
password: 123456
|
||||
timeout: 100s
|
||||
ssl:
|
||||
enabled: false
|
||||
|
||||
--- # Redis 扩展工具
|
||||
redisson:
|
||||
# redis key前缀
|
||||
keyPrefix:
|
||||
# 线程池数量
|
||||
threads: 4
|
||||
# Netty线程池数量
|
||||
nettyThreads: 8
|
||||
# 单节点配置
|
||||
singleServerConfig:
|
||||
# 客户端名称
|
||||
clientName: ${sxpcwlkj.name}
|
||||
# 最小空闲连接数
|
||||
connectionMinimumIdleSize: 8
|
||||
# 连接池大小
|
||||
connectionPoolSize: 32
|
||||
# 连接空闲超时,单位:毫秒
|
||||
idleConnectionTimeout: 10000
|
||||
# 命令等待超时,单位:毫秒
|
||||
timeout: 3000
|
||||
# 发布和订阅连接池大小
|
||||
subscriptionConnectionPoolSize: 50
|
||||
|
||||
wx:
|
||||
doc:
|
||||
payNotify: https://mmsadmin.cn/doc-api/meb/v1/payNotify
|
||||
139
mms-docs/mms-doc-api/src/main/resources/application-local.yml
Normal file
139
mms-docs/mms-doc-api/src/main/resources/application-local.yml
Normal file
@ -0,0 +1,139 @@
|
||||
# 项目基础信息
|
||||
sxpcwlkj:
|
||||
# 开启验证码: true:开启 false: 关闭
|
||||
isOpenCaptcha: false
|
||||
|
||||
--- # powerjob 配置
|
||||
powerjob:
|
||||
worker:
|
||||
# 如何开启调度中心请查看文档教程
|
||||
enabled: false
|
||||
# 需要先在 powerjob 登录页执行应用注册后才能使用
|
||||
app-name: mms
|
||||
enable-test-mode: false
|
||||
max-appended-wf-context-length: 4096
|
||||
max-result-length: 4096
|
||||
# 28080 端口 随着主应用端口飘逸 避免集群冲突
|
||||
port: 2${server.port}
|
||||
protocol: http
|
||||
server-address: 127.0.0.1:7700
|
||||
store-strategy: disk
|
||||
|
||||
--- # Spring Boot Admin
|
||||
spring:
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
enabled: false #启用/禁用
|
||||
instance:
|
||||
service-host-type: IP
|
||||
# Spring Boot Admin
|
||||
url: http://localhost:9001 #监控服务器端地址
|
||||
username: admin #账号
|
||||
password: 123456 #密码
|
||||
|
||||
--- #配置项目的数据源 https://www.kancloud.cn/tracy5546/dynamic-datasource/2344619
|
||||
--- # 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
dynamic:
|
||||
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||
p6spy: true
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
# 严格模式 匹配不到数据源则报错
|
||||
strict: true
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 123456
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||||
# username: ROOT
|
||||
# password: root
|
||||
# hikari:
|
||||
# connectionTestQuery: SELECT 1 FROM DUAL
|
||||
# postgres:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||
# username: root
|
||||
# password: root
|
||||
# sqlserver:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
||||
# username: SA
|
||||
# password: root
|
||||
hikari:
|
||||
# 最大连接池数量
|
||||
maxPoolSize: 20
|
||||
# 最小空闲线程数量
|
||||
minIdle: 10
|
||||
# 配置获取连接等待超时的时间
|
||||
connectionTimeout: 30000
|
||||
# 校验超时时间
|
||||
validationTimeout: 5000
|
||||
# 空闲连接存活最大时间,默认10分钟
|
||||
idleTimeout: 600000
|
||||
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||
maxLifetime: 1800000
|
||||
# 连接测试query(配置检测连接是否有效)
|
||||
connectionTestQuery: SELECT 1
|
||||
# 多久检查一次连接的活性
|
||||
keepaliveTime: 30000
|
||||
|
||||
--- # Redis配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
database: 0
|
||||
password: 123456
|
||||
timeout: 100s
|
||||
ssl:
|
||||
enabled: false
|
||||
|
||||
--- # Redis 扩展工具
|
||||
redisson:
|
||||
# redis key前缀
|
||||
keyPrefix:
|
||||
# 线程池数量
|
||||
threads: 4
|
||||
# Netty线程池数量
|
||||
nettyThreads: 8
|
||||
# 单节点配置
|
||||
singleServerConfig:
|
||||
# 客户端名称
|
||||
clientName: ${sxpcwlkj.name}
|
||||
# 最小空闲连接数
|
||||
connectionMinimumIdleSize: 8
|
||||
# 连接池大小
|
||||
connectionPoolSize: 32
|
||||
# 连接空闲超时,单位:毫秒
|
||||
idleConnectionTimeout: 10000
|
||||
# 命令等待超时,单位:毫秒
|
||||
timeout: 3000
|
||||
# 发布和订阅连接池大小
|
||||
subscriptionConnectionPoolSize: 50
|
||||
|
||||
|
||||
wx:
|
||||
doc:
|
||||
payNotify: https://mmsadmin.cn/doc-api/meb/v1/payNotify
|
||||
139
mms-docs/mms-doc-api/src/main/resources/application-prod.yml
Normal file
139
mms-docs/mms-doc-api/src/main/resources/application-prod.yml
Normal file
@ -0,0 +1,139 @@
|
||||
# 项目基础信息
|
||||
sxpcwlkj:
|
||||
# 开启验证码: true:开启 false: 关闭
|
||||
isOpenCaptcha: true
|
||||
|
||||
--- # powerjob 配置
|
||||
powerjob:
|
||||
worker:
|
||||
# 如何开启调度中心请查看文档教程
|
||||
enabled: false
|
||||
# 需要先在 powerjob 登录页执行应用注册后才能使用
|
||||
app-name: mms
|
||||
enable-test-mode: false
|
||||
max-appended-wf-context-length: 4096
|
||||
max-result-length: 4096
|
||||
# 28080 端口 随着主应用端口飘逸 避免集群冲突
|
||||
port: 2${server.port}
|
||||
protocol: http
|
||||
server-address: 127.0.0.1:7700
|
||||
store-strategy: disk
|
||||
|
||||
|
||||
--- # Spring Boot Admin
|
||||
spring:
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
enabled: false #启用/禁用
|
||||
instance:
|
||||
service-host-type: IP
|
||||
# Spring Boot Admin
|
||||
url: http://localhost:9001 #监控服务器端地址
|
||||
username: admin #账号
|
||||
password: 123456 #密码
|
||||
|
||||
#配置项目的数据源 https://www.kancloud.cn/tracy5546/dynamic-datasource/2344619
|
||||
--- # 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
dynamic:
|
||||
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||
p6spy: true
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
# 严格模式 匹配不到数据源则报错
|
||||
strict: true
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: mms
|
||||
password: ZKKxz8KGmpGfLGf3
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: mms
|
||||
password: ZKKxz8KGmpGfLGf3
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||||
# username: ROOT
|
||||
# password: root
|
||||
# hikari:
|
||||
# connectionTestQuery: SELECT 1 FROM DUAL
|
||||
# postgres:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||
# username: root
|
||||
# password: root
|
||||
# sqlserver:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
||||
# username: SA
|
||||
# password: root
|
||||
hikari:
|
||||
# 最大连接池数量
|
||||
maxPoolSize: 20
|
||||
# 最小空闲线程数量
|
||||
minIdle: 10
|
||||
# 配置获取连接等待超时的时间
|
||||
connectionTimeout: 30000
|
||||
# 校验超时时间
|
||||
validationTimeout: 5000
|
||||
# 空闲连接存活最大时间,默认10分钟
|
||||
idleTimeout: 600000
|
||||
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||
maxLifetime: 1800000
|
||||
# 连接测试query(配置检测连接是否有效)
|
||||
connectionTestQuery: SELECT 1
|
||||
# 多久检查一次连接的活性
|
||||
keepaliveTime: 30000
|
||||
|
||||
--- # Redis配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
database: 2
|
||||
password: 123456
|
||||
timeout: 100s
|
||||
ssl:
|
||||
enabled: false
|
||||
|
||||
--- # Redis 扩展工具
|
||||
redisson:
|
||||
# redis key前缀
|
||||
keyPrefix:
|
||||
# 线程池数量
|
||||
threads: 4
|
||||
# Netty线程池数量
|
||||
nettyThreads: 8
|
||||
# 单节点配置
|
||||
singleServerConfig:
|
||||
# 客户端名称
|
||||
clientName: ${sxpcwlkj.name}
|
||||
# 最小空闲连接数
|
||||
connectionMinimumIdleSize: 8
|
||||
# 连接池大小
|
||||
connectionPoolSize: 32
|
||||
# 连接空闲超时,单位:毫秒
|
||||
idleConnectionTimeout: 10000
|
||||
# 命令等待超时,单位:毫秒
|
||||
timeout: 3000
|
||||
# 发布和订阅连接池大小
|
||||
subscriptionConnectionPoolSize: 50
|
||||
|
||||
wx:
|
||||
doc:
|
||||
payNotify: https://mmsadmin.cn/doc-api/meb/v1/payNotify
|
||||
259
mms-docs/mms-doc-api/src/main/resources/application.yml
Normal file
259
mms-docs/mms-doc-api/src/main/resources/application.yml
Normal file
@ -0,0 +1,259 @@
|
||||
# 项目基础信息
|
||||
sxpcwlkj:
|
||||
#名称
|
||||
name: MMS
|
||||
#描述
|
||||
describe: 一款多模块化管理系统(Modular management system),简称:MMS,是一款基于多应用模块用户、商品、支付、订单、分销、日志、定时、通信、直播、广告、文章等多模块应用开源系统,可快速的应用与各类项目研发中,定期更新功能修复、上新、技术栈分享 (十年磨一剑,我们的目标是做最优价值的开源项目)!
|
||||
#版本
|
||||
version: ${version}
|
||||
#文档地址
|
||||
docUrl: https://www.sxpcwlkj.com/htmls/mms/index.html
|
||||
# 年份
|
||||
copyrightYear: 2018
|
||||
# 机构团队
|
||||
organization: 陕西品创网络
|
||||
# 开启验证码: true:开启 false: 关闭
|
||||
isOpenCaptcha: false
|
||||
|
||||
|
||||
--- # 环境配置
|
||||
server:
|
||||
# 服务端口,默认为8080
|
||||
port: 8070
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
# undertow 高性能java web容器
|
||||
undertow:
|
||||
# HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
|
||||
max-http-post-size: -1
|
||||
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
|
||||
# 每块buffer的空间大小,越小的空间被利用越充分
|
||||
buffer-size: 512
|
||||
# 是否分配的直接内存
|
||||
direct-buffers: true
|
||||
threads:
|
||||
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
|
||||
io: 8
|
||||
# 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
|
||||
worker: 256
|
||||
|
||||
--- # Spring配置
|
||||
spring:
|
||||
application:
|
||||
name: ${sxpcwlkj.name} Mobile
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
|
||||
jackson:
|
||||
# 日期格式化
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
serialization:
|
||||
# 格式化输出
|
||||
indent_output: false
|
||||
# 忽略无法转换的对象
|
||||
fail_on_empty_beans: false
|
||||
deserialization:
|
||||
# 允许对象忽略json中不存在的属性
|
||||
fail_on_unknown_properties: false
|
||||
|
||||
web:
|
||||
is-open: true
|
||||
# 排除路径
|
||||
excludes:
|
||||
# 放行
|
||||
- /static/**, # 静态资源目录
|
||||
- /public/**, # 公共资源目录
|
||||
- /resources/**, # 默认资源路径
|
||||
- /favicon.ico, # 网站图标
|
||||
- /error # 错误页面
|
||||
- /.well-known/**
|
||||
|
||||
--- # Sa-Token配置
|
||||
sa-token:
|
||||
# token名称 (同时也是cookie名称)
|
||||
token-name: docToken
|
||||
# token 有效期(单位:秒) 默认30天,-1 代表永久有效
|
||||
timeout: 86400
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
active-timeout: 1800
|
||||
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
|
||||
is-concurrent: false
|
||||
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token)
|
||||
is-share: false
|
||||
# 是否尝试从header里读取token
|
||||
is-read-header: true
|
||||
# 是否在header读取不到token时,继续从请求题参数里继续尝试读取
|
||||
is-read-body: true
|
||||
# 是否尝试从cookie里读取token
|
||||
is-read-cookie: true
|
||||
# token前缀
|
||||
# token-prefix: "Token_"
|
||||
# jwt秘钥
|
||||
jwt-secret-key: 01213456789abcdefghijklmnopqrstuvwxyz
|
||||
# token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik)
|
||||
token-style: uuid
|
||||
# 是否输出操作日志
|
||||
is-log: false
|
||||
# 是否开启有效时间打印
|
||||
info-time-open: true
|
||||
|
||||
# 排除路径
|
||||
excludes:
|
||||
# 游客
|
||||
- /visitor/**
|
||||
# 静态资源
|
||||
- /*.html
|
||||
- /**/*.html
|
||||
- /**/*.css
|
||||
- /**/*.js
|
||||
# swagger 文档配置
|
||||
- /favicon.ico
|
||||
- /*/api-docs
|
||||
- /*/api-docs/**
|
||||
# actuator 监控配置
|
||||
- /actuator
|
||||
- /actuator/**
|
||||
# 代码生成
|
||||
- /maku-generator/**
|
||||
|
||||
--- # MyBatisPlus配置
|
||||
# https://baomidou.com/pages/981406
|
||||
mybatis-plus:
|
||||
# xml扫描,多个目录用逗号或者分号分隔(告诉 Mapper 所对应的 XML 文件位置)
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 实体扫描,定义所有操作类的别名所在包,多个package用逗号或者分号分隔
|
||||
typeAliasesPackage: com.sxpcwlkj.**.entity
|
||||
# 启动时是否检查 MyBatis XML 文件的存在,默认不检查
|
||||
checkConfigLocation: true
|
||||
configuration:
|
||||
# 自动驼峰命名规则(camel case)映射
|
||||
mapUnderscoreToCamelCase: true
|
||||
# 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段
|
||||
callSettersOnNulls: true
|
||||
# MyBatis 自动映射策略
|
||||
# NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
|
||||
autoMappingBehavior: PARTIAL
|
||||
# MyBatis 自动映射时未知列或未知属性处理策
|
||||
# NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
|
||||
autoMappingUnknownColumnBehavior: NONE
|
||||
# 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
# 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||
logImpl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
# 是否 mybatis-plus 在控制台输出的logo
|
||||
banner: false
|
||||
dbConfig:
|
||||
# 主键类型 AUTO 数据库ID自增 ,NONE 空 ,INPUT 用户SET对象ID ,ASSIGN_ID 雪花 ,ASSIGN_UUID 全局唯一 UUID
|
||||
idType: ASSIGN_ID
|
||||
# 逻辑已删除值
|
||||
logicDeleteValue: 2
|
||||
# 逻辑未删除值
|
||||
logicNotDeleteValue: 0
|
||||
# 字段验证策略之 insert,在 insert 的时候的字段验证策略
|
||||
# IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
|
||||
insertStrategy: NOT_NULL
|
||||
# 字段验证策略之 update,在 update 的时候的字段验证策略
|
||||
updateStrategy: NOT_NULL
|
||||
# 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
|
||||
where-strategy: NOT_NULL
|
||||
|
||||
--- # 多租户
|
||||
tenant:
|
||||
# 是否开启租户模式
|
||||
enable: false
|
||||
# 需要排除的多租户的表
|
||||
exclusionTable:
|
||||
- "t_sys_district"
|
||||
- "oauth_client_details"
|
||||
# 租户字段名称
|
||||
column: tenant_id
|
||||
|
||||
--- # springdoc
|
||||
springdoc:
|
||||
api-docs:
|
||||
# 是否开启接口文档
|
||||
enabled: true
|
||||
path: /v3/api-docs # 自定义路径,默认为 "/v3/api-docs"
|
||||
swagger-ui:
|
||||
enabled: true # 开启swagger界面,依赖OpenApi,需要OpenApi同时开启
|
||||
path: /swagger-ui/index.html # 自定义路径,默认为"/swagger-ui/index.html"
|
||||
# # 持久化认证数据
|
||||
# persistAuthorization: true
|
||||
#这里定义了两个分组,可定义多个,也可以不定义
|
||||
group-configs:
|
||||
- group: 1.演示模块
|
||||
packages-to-scan: com.sxpcwlkj.demo
|
||||
- group: 2.系统模块
|
||||
packages-to-scan: com.sxpcwlkj.system
|
||||
info:
|
||||
# 标题
|
||||
title: '标题:${sxpcwlkj.name}多租户管理系统_接口文档'
|
||||
# 描述
|
||||
description: '描述:${sxpcwlkj.describe}'
|
||||
# 版本
|
||||
version: '版本号: ${sxpcwlkj.version}'
|
||||
# 作者信息
|
||||
contact:
|
||||
name: Xi Jue
|
||||
email: sxpcwlkj@163.com
|
||||
url: https://gitee.com/mmsAdmin/mms
|
||||
components:
|
||||
# 鉴权方式配置
|
||||
security-schemes:
|
||||
apiKey:
|
||||
type: APIKEY
|
||||
in: HEADER
|
||||
name: ${sa-token.token-name}
|
||||
|
||||
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.sxpcwlkj: @logging.level@
|
||||
org.springframework: warn
|
||||
config: classpath:logback.xml
|
||||
|
||||
--- # 对象存储 配置教程 https://x-file-storage.xuyanwu.cn/#/快速入门
|
||||
dromara:
|
||||
x-file-storage: #文件存储配置
|
||||
default-platform: aliyun-oss-1 #默认使用的存储平台
|
||||
aliyun-oss:
|
||||
- platform: aliyun-oss-1 # 存储平台标识
|
||||
enable-storage: true # 启用存储
|
||||
# 短信
|
||||
sms:
|
||||
# 标注从yml读取配置
|
||||
config-type: yaml
|
||||
# 账户上限
|
||||
account-max: 4
|
||||
|
||||
--- # Actuator 监控端点的配置项
|
||||
management:
|
||||
endpoints:
|
||||
enabled-by-default: true #暴露所有端点信息
|
||||
web:
|
||||
exposure:
|
||||
include: '*' #以web方式暴露
|
||||
endpoint:
|
||||
health:
|
||||
show-details: ALWAYS
|
||||
logfile:
|
||||
external-file: ./logs/mobile-console.log
|
||||
|
||||
--- # websocket
|
||||
websocket:
|
||||
enable: true
|
||||
BIN
mms-docs/mms-doc-api/src/main/resources/ip2region.xdb
Executable file
BIN
mms-docs/mms-doc-api/src/main/resources/ip2region.xdb
Executable file
Binary file not shown.
109
mms-docs/mms-doc-api/src/main/resources/logback.xml
Normal file
109
mms-docs/mms-doc-api/src/main/resources/logback.xml
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<property name="log.path" value="./logs"/>
|
||||
<property name="console.log.pattern"
|
||||
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
||||
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${console.log.pattern}</pattern>
|
||||
<charset>utf-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-console.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-console.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大 1天 -->
|
||||
<maxHistory>1</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
<charset>utf-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- info异步输出 -->
|
||||
<appender name="async_info" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
||||
<queueSize>512</queueSize>
|
||||
<!-- 添加附加的appender,最多只能添加一个 -->
|
||||
<appender-ref ref="file_info"/>
|
||||
</appender>
|
||||
|
||||
<!-- error异步输出 -->
|
||||
<appender name="async_error" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
||||
<queueSize>512</queueSize>
|
||||
<!-- 添加附加的appender,最多只能添加一个 -->
|
||||
<appender-ref ref="file_error"/>
|
||||
</appender>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
<appender-ref ref="async_info" />
|
||||
<appender-ref ref="async_error" />
|
||||
<appender-ref ref="file_console" />
|
||||
<!-- <appender-ref ref="sky_log"/>-->
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
2
mms-docs/mms-doc-api/src/main/resources/spy.properties
Normal file
2
mms-docs/mms-doc-api/src/main/resources/spy.properties
Normal file
@ -0,0 +1,2 @@
|
||||
# ???????,??slf4j????? ??????????
|
||||
appender=com.p6spy.engine.spy.appender.Slf4JLogger
|
||||
22
mms-docs/pom.xml
Normal file
22
mms-docs/pom.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.sxpcwlkj</groupId>
|
||||
<artifactId>mms</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<packaging>pom</packaging>
|
||||
<artifactId>mms-docs</artifactId>
|
||||
<description>文档模块集</description>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>mms-doc-admin</module>
|
||||
<module>mms-doc-api</module>
|
||||
</modules>
|
||||
</project>
|
||||
Loading…
x
Reference in New Issue
Block a user