feat(generator): 添加代码生成工具及应用实体模块
- 新增 AppGenerator 代码生成工具类,支持多平台模板生成 - 生成 app_credential 应用密钥凭证的完整CRUD功能模块 - 生成 app_event 应用操作动态的完整CRUD功能模块 - 添加对应的 Entity、Controller、Service、Mapper 和 Param 类 - 配置多平台模板支持(Vue、UniApp、移动端页面) - 实现 app.config.ts 自动更新功能 - 优化后端实现指南文档说明
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
package com.gxwebsoft.app.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.app.service.AppCredentialService;
|
||||
import com.gxwebsoft.app.entity.AppCredential;
|
||||
import com.gxwebsoft.app.param.AppCredentialParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用密钥凭证控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Tag(name = "应用密钥凭证管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/app/app-credential")
|
||||
public class AppCredentialController extends BaseController {
|
||||
@Resource
|
||||
private AppCredentialService appCredentialService;
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:list')")
|
||||
@Operation(summary = "分页查询应用密钥凭证")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<AppCredential>> page(AppCredentialParam param) {
|
||||
// 使用关联查询
|
||||
return success(appCredentialService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:list')")
|
||||
@Operation(summary = "查询全部应用密钥凭证")
|
||||
@GetMapping()
|
||||
public ApiResult<List<AppCredential>> list(AppCredentialParam param) {
|
||||
// 使用关联查询
|
||||
return success(appCredentialService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:list')")
|
||||
@Operation(summary = "根据id查询应用密钥凭证")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<AppCredential> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(appCredentialService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加应用密钥凭证")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody AppCredential appCredential) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
appCredential.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (appCredentialService.save(appCredential)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改应用密钥凭证")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody AppCredential appCredential) {
|
||||
if (appCredentialService.updateById(appCredential)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除应用密钥凭证")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (appCredentialService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加应用密钥凭证")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<AppCredential> list) {
|
||||
if (appCredentialService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改应用密钥凭证")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<AppCredential> batchParam) {
|
||||
if (batchParam.update(appCredentialService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appCredential:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除应用密钥凭证")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (appCredentialService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.gxwebsoft.app.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.app.service.AppEventService;
|
||||
import com.gxwebsoft.app.entity.AppEvent;
|
||||
import com.gxwebsoft.app.param.AppEventParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用操作动态控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Tag(name = "应用操作动态管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/app/app-event")
|
||||
public class AppEventController extends BaseController {
|
||||
@Resource
|
||||
private AppEventService appEventService;
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:list')")
|
||||
@Operation(summary = "分页查询应用操作动态")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<AppEvent>> page(AppEventParam param) {
|
||||
// 使用关联查询
|
||||
return success(appEventService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:list')")
|
||||
@Operation(summary = "查询全部应用操作动态")
|
||||
@GetMapping()
|
||||
public ApiResult<List<AppEvent>> list(AppEventParam param) {
|
||||
// 使用关联查询
|
||||
return success(appEventService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:list')")
|
||||
@Operation(summary = "根据id查询应用操作动态")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<AppEvent> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(appEventService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加应用操作动态")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody AppEvent appEvent) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
appEvent.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (appEventService.save(appEvent)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改应用操作动态")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody AppEvent appEvent) {
|
||||
if (appEventService.updateById(appEvent)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除应用操作动态")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (appEventService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加应用操作动态")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<AppEvent> list) {
|
||||
if (appEventService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改应用操作动态")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<AppEvent> batchParam) {
|
||||
if (batchParam.update(appEventService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appEvent:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除应用操作动态")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (appEventService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.gxwebsoft.app.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.app.service.AppUserService;
|
||||
import com.gxwebsoft.app.entity.AppUser;
|
||||
import com.gxwebsoft.app.param.AppUserParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Tag(name = "应用成员管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/app/app-user")
|
||||
public class AppUserController extends BaseController {
|
||||
@Resource
|
||||
private AppUserService appUserService;
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:list')")
|
||||
@Operation(summary = "分页查询应用成员")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<AppUser>> page(AppUserParam param) {
|
||||
// 使用关联查询
|
||||
return success(appUserService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:list')")
|
||||
@Operation(summary = "查询全部应用成员")
|
||||
@GetMapping()
|
||||
public ApiResult<List<AppUser>> list(AppUserParam param) {
|
||||
// 使用关联查询
|
||||
return success(appUserService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:list')")
|
||||
@Operation(summary = "根据id查询应用成员")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<AppUser> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(appUserService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加应用成员")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody AppUser appUser) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
appUser.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (appUserService.save(appUser)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改应用成员")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody AppUser appUser) {
|
||||
if (appUserService.updateById(appUser)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除应用成员")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (appUserService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加应用成员")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<AppUser> list) {
|
||||
if (appUserService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改应用成员")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<AppUser> batchParam) {
|
||||
if (batchParam.update(appUserService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appUser:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除应用成员")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (appUserService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.gxwebsoft.app.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.app.service.AppVersionService;
|
||||
import com.gxwebsoft.app.entity.AppVersion;
|
||||
import com.gxwebsoft.app.param.AppVersionParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用版本发布记录控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Tag(name = "应用版本发布记录管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/app/app-version")
|
||||
public class AppVersionController extends BaseController {
|
||||
@Resource
|
||||
private AppVersionService appVersionService;
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:list')")
|
||||
@Operation(summary = "分页查询应用版本发布记录")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<AppVersion>> page(AppVersionParam param) {
|
||||
// 使用关联查询
|
||||
return success(appVersionService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:list')")
|
||||
@Operation(summary = "查询全部应用版本发布记录")
|
||||
@GetMapping()
|
||||
public ApiResult<List<AppVersion>> list(AppVersionParam param) {
|
||||
// 使用关联查询
|
||||
return success(appVersionService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:list')")
|
||||
@Operation(summary = "根据id查询应用版本发布记录")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<AppVersion> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(appVersionService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加应用版本发布记录")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody AppVersion appVersion) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
appVersion.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (appVersionService.save(appVersion)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改应用版本发布记录")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody AppVersion appVersion) {
|
||||
if (appVersionService.updateById(appVersion)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除应用版本发布记录")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (appVersionService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加应用版本发布记录")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<AppVersion> list) {
|
||||
if (appVersionService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改应用版本发布记录")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<AppVersion> batchParam) {
|
||||
if (batchParam.update(appVersionService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('app:appVersion:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除应用版本发布记录")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (appVersionService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
80
src/main/java/com/gxwebsoft/app/entity/AppCredential.java
Normal file
80
src/main/java/com/gxwebsoft/app/entity/AppCredential.java
Normal file
@@ -0,0 +1,80 @@
|
||||
package com.gxwebsoft.app.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用密钥凭证
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:43
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "AppCredential对象", description = "应用密钥凭证")
|
||||
public class AppCredential implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "凭证名称,如生产环境密钥")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "App ID(公开)")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "App Secret(加密存储)")
|
||||
private String appSecret;
|
||||
|
||||
@Schema(description = "凭证类型: server/client/webhook")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "权限范围,空格分隔")
|
||||
private String scopes;
|
||||
|
||||
@Schema(description = "到期时间,NULL=永不过期")
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
@Schema(description = "最后使用时间")
|
||||
private LocalDateTime lastUsedAt;
|
||||
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
76
src/main/java/com/gxwebsoft/app/entity/AppEvent.java
Normal file
76
src/main/java/com/gxwebsoft/app/entity/AppEvent.java
Normal file
@@ -0,0 +1,76 @@
|
||||
package com.gxwebsoft.app.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用操作动态
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "AppEvent对象", description = "应用操作动态")
|
||||
public class AppEvent implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "事件类型: created/published/updated/domain_bound/member_added/status_changed")
|
||||
private String eventType;
|
||||
|
||||
@Schema(description = "事件标题,如已发布")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "详细描述")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "操作人用户ID")
|
||||
private Long operatorId;
|
||||
|
||||
@Schema(description = "操作人名称(冗余)")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "关联ID,如版本ID")
|
||||
private Long refId;
|
||||
|
||||
@Schema(description = "关联类型")
|
||||
private String refType;
|
||||
|
||||
@Schema(description = "扩展数据")
|
||||
private String extra;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
67
src/main/java/com/gxwebsoft/app/entity/AppUser.java
Normal file
67
src/main/java/com/gxwebsoft/app/entity/AppUser.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package com.gxwebsoft.app.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用成员
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "AppUser对象", description = "应用成员")
|
||||
public class AppUser implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "用户名(冗余)")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "头像(冗余)")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "角色: owner/admin/developer/viewer")
|
||||
private String role;
|
||||
|
||||
@Schema(description = "邀请人用户ID")
|
||||
private Long inviteBy;
|
||||
|
||||
@Schema(description = "加入时间")
|
||||
private LocalDateTime inviteTime;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
85
src/main/java/com/gxwebsoft/app/entity/AppVersion.java
Normal file
85
src/main/java/com/gxwebsoft/app/entity/AppVersion.java
Normal file
@@ -0,0 +1,85 @@
|
||||
package com.gxwebsoft.app.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用版本发布记录
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "AppVersion对象", description = "应用版本发布记录")
|
||||
public class AppVersion implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "版本号,如 1.0.0")
|
||||
private String versionNo;
|
||||
|
||||
@Schema(description = "版本名称")
|
||||
private String versionName;
|
||||
|
||||
@Schema(description = "版本更新说明")
|
||||
private String changelog;
|
||||
|
||||
@Schema(description = "安装包地址")
|
||||
private String packageUrl;
|
||||
|
||||
@Schema(description = "包大小(字节)")
|
||||
private Long packageSize;
|
||||
|
||||
@Schema(description = "包MD5/SHA256")
|
||||
private String packageHash;
|
||||
|
||||
@Schema(description = "环境: development/staging/production")
|
||||
private String env;
|
||||
|
||||
@Schema(description = "状态 0=构建中 1=已发布 2=已回滚 3=构建失败")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否为当前版本")
|
||||
private Boolean isCurrent;
|
||||
|
||||
@Schema(description = "发布人用户ID")
|
||||
private Long publishBy;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.app.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.app.entity.AppCredential;
|
||||
import com.gxwebsoft.app.param.AppCredentialParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用密钥凭证Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:43
|
||||
*/
|
||||
public interface AppCredentialMapper extends BaseMapper<AppCredential> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<AppCredential>
|
||||
*/
|
||||
List<AppCredential> selectPageRel(@Param("page") IPage<AppCredential> page,
|
||||
@Param("param") AppCredentialParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<AppCredential> selectListRel(@Param("param") AppCredentialParam param);
|
||||
|
||||
}
|
||||
37
src/main/java/com/gxwebsoft/app/mapper/AppEventMapper.java
Normal file
37
src/main/java/com/gxwebsoft/app/mapper/AppEventMapper.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.app.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.app.entity.AppEvent;
|
||||
import com.gxwebsoft.app.param.AppEventParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用操作动态Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
public interface AppEventMapper extends BaseMapper<AppEvent> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<AppEvent>
|
||||
*/
|
||||
List<AppEvent> selectPageRel(@Param("page") IPage<AppEvent> page,
|
||||
@Param("param") AppEventParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<AppEvent> selectListRel(@Param("param") AppEventParam param);
|
||||
|
||||
}
|
||||
37
src/main/java/com/gxwebsoft/app/mapper/AppUserMapper.java
Normal file
37
src/main/java/com/gxwebsoft/app/mapper/AppUserMapper.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.app.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.app.entity.AppUser;
|
||||
import com.gxwebsoft.app.param.AppUserParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
public interface AppUserMapper extends BaseMapper<AppUser> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<AppUser>
|
||||
*/
|
||||
List<AppUser> selectPageRel(@Param("page") IPage<AppUser> page,
|
||||
@Param("param") AppUserParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<AppUser> selectListRel(@Param("param") AppUserParam param);
|
||||
|
||||
}
|
||||
37
src/main/java/com/gxwebsoft/app/mapper/AppVersionMapper.java
Normal file
37
src/main/java/com/gxwebsoft/app/mapper/AppVersionMapper.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.app.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.app.entity.AppVersion;
|
||||
import com.gxwebsoft.app.param.AppVersionParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用版本发布记录Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
public interface AppVersionMapper extends BaseMapper<AppVersion> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<AppVersion>
|
||||
*/
|
||||
List<AppVersion> selectPageRel(@Param("page") IPage<AppVersion> page,
|
||||
@Param("param") AppVersionParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<AppVersion> selectListRel(@Param("param") AppVersionParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?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.gxwebsoft.app.mapper.AppCredentialMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM app_credential a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.websiteId != null">
|
||||
AND a.website_id LIKE CONCAT('%', #{param.websiteId}, '%')
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id LIKE CONCAT('%', #{param.appId}, '%')
|
||||
</if>
|
||||
<if test="param.appSecret != null">
|
||||
AND a.app_secret LIKE CONCAT('%', #{param.appSecret}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.scopes != null">
|
||||
AND a.scopes LIKE CONCAT('%', #{param.scopes}, '%')
|
||||
</if>
|
||||
<if test="param.expireTime != null">
|
||||
AND a.expire_time LIKE CONCAT('%', #{param.expireTime}, '%')
|
||||
</if>
|
||||
<if test="param.lastUsedAt != null">
|
||||
AND a.last_used_at LIKE CONCAT('%', #{param.lastUsedAt}, '%')
|
||||
</if>
|
||||
<if test="param.remark != null">
|
||||
AND a.remark LIKE CONCAT('%', #{param.remark}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.app.entity.AppCredential">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.app.entity.AppCredential">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?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.gxwebsoft.app.mapper.AppEventMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM app_event a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.websiteId != null">
|
||||
AND a.website_id LIKE CONCAT('%', #{param.websiteId}, '%')
|
||||
</if>
|
||||
<if test="param.eventType != null">
|
||||
AND a.event_type LIKE CONCAT('%', #{param.eventType}, '%')
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.operatorId != null">
|
||||
AND a.operator_id LIKE CONCAT('%', #{param.operatorId}, '%')
|
||||
</if>
|
||||
<if test="param.operator != null">
|
||||
AND a.operator LIKE CONCAT('%', #{param.operator}, '%')
|
||||
</if>
|
||||
<if test="param.refId != null">
|
||||
AND a.ref_id LIKE CONCAT('%', #{param.refId}, '%')
|
||||
</if>
|
||||
<if test="param.refType != null">
|
||||
AND a.ref_type LIKE CONCAT('%', #{param.refType}, '%')
|
||||
</if>
|
||||
<if test="param.extra != null">
|
||||
AND a.extra LIKE CONCAT('%', #{param.extra}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.app.entity.AppEvent">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.app.entity.AppEvent">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
63
src/main/java/com/gxwebsoft/app/mapper/xml/AppUserMapper.xml
Normal file
63
src/main/java/com/gxwebsoft/app/mapper/xml/AppUserMapper.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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.gxwebsoft.app.mapper.AppUserMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM app_user a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.websiteId != null">
|
||||
AND a.website_id LIKE CONCAT('%', #{param.websiteId}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id LIKE CONCAT('%', #{param.userId}, '%')
|
||||
</if>
|
||||
<if test="param.username != null">
|
||||
AND a.username LIKE CONCAT('%', #{param.username}, '%')
|
||||
</if>
|
||||
<if test="param.avatar != null">
|
||||
AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%')
|
||||
</if>
|
||||
<if test="param.role != null">
|
||||
AND a.role LIKE CONCAT('%', #{param.role}, '%')
|
||||
</if>
|
||||
<if test="param.inviteBy != null">
|
||||
AND a.invite_by LIKE CONCAT('%', #{param.inviteBy}, '%')
|
||||
</if>
|
||||
<if test="param.inviteTime != null">
|
||||
AND a.invite_time LIKE CONCAT('%', #{param.inviteTime}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.app.entity.AppUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.app.entity.AppUser">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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.gxwebsoft.app.mapper.AppVersionMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM app_version a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.websiteId != null">
|
||||
AND a.website_id LIKE CONCAT('%', #{param.websiteId}, '%')
|
||||
</if>
|
||||
<if test="param.versionNo != null">
|
||||
AND a.version_no LIKE CONCAT('%', #{param.versionNo}, '%')
|
||||
</if>
|
||||
<if test="param.versionName != null">
|
||||
AND a.version_name LIKE CONCAT('%', #{param.versionName}, '%')
|
||||
</if>
|
||||
<if test="param.changelog != null">
|
||||
AND a.changelog LIKE CONCAT('%', #{param.changelog}, '%')
|
||||
</if>
|
||||
<if test="param.packageUrl != null">
|
||||
AND a.package_url LIKE CONCAT('%', #{param.packageUrl}, '%')
|
||||
</if>
|
||||
<if test="param.packageSize != null">
|
||||
AND a.package_size LIKE CONCAT('%', #{param.packageSize}, '%')
|
||||
</if>
|
||||
<if test="param.packageHash != null">
|
||||
AND a.package_hash LIKE CONCAT('%', #{param.packageHash}, '%')
|
||||
</if>
|
||||
<if test="param.env != null">
|
||||
AND a.env LIKE CONCAT('%', #{param.env}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.isCurrent != null">
|
||||
AND a.is_current = #{param.isCurrent}
|
||||
</if>
|
||||
<if test="param.publishBy != null">
|
||||
AND a.publish_by LIKE CONCAT('%', #{param.publishBy}, '%')
|
||||
</if>
|
||||
<if test="param.publishTime != null">
|
||||
AND a.publish_time LIKE CONCAT('%', #{param.publishTime}, '%')
|
||||
</if>
|
||||
<if test="param.remark != null">
|
||||
AND a.remark LIKE CONCAT('%', #{param.remark}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.app.entity.AppVersion">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.app.entity.AppVersion">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.gxwebsoft.app.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用密钥凭证查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:43
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "AppCredentialParam对象", description = "应用密钥凭证查询参数")
|
||||
public class AppCredentialParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "凭证名称,如生产环境密钥")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "App ID(公开)")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "App Secret(加密存储)")
|
||||
private String appSecret;
|
||||
|
||||
@Schema(description = "凭证类型: server/client/webhook")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "权限范围,空格分隔")
|
||||
private String scopes;
|
||||
|
||||
@Schema(description = "到期时间,NULL=永不过期")
|
||||
private String expireTime;
|
||||
|
||||
@Schema(description = "最后使用时间")
|
||||
private String lastUsedAt;
|
||||
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
68
src/main/java/com/gxwebsoft/app/param/AppEventParam.java
Normal file
68
src/main/java/com/gxwebsoft/app/param/AppEventParam.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package com.gxwebsoft.app.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用操作动态查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "AppEventParam对象", description = "应用操作动态查询参数")
|
||||
public class AppEventParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "事件类型: created/published/updated/domain_bound/member_added/status_changed")
|
||||
private String eventType;
|
||||
|
||||
@Schema(description = "事件标题,如已发布")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "详细描述")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "操作人用户ID")
|
||||
private Long operatorId;
|
||||
|
||||
@Schema(description = "操作人名称(冗余)")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "关联ID,如版本ID")
|
||||
private Long refId;
|
||||
|
||||
@Schema(description = "关联类型")
|
||||
private String refType;
|
||||
|
||||
@Schema(description = "扩展数据")
|
||||
private String extra;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
58
src/main/java/com/gxwebsoft/app/param/AppUserParam.java
Normal file
58
src/main/java/com/gxwebsoft/app/param/AppUserParam.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package com.gxwebsoft.app.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用成员查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "AppUserParam对象", description = "应用成员查询参数")
|
||||
public class AppUserParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户名(冗余)")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "头像(冗余)")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "角色: owner/admin/developer/viewer")
|
||||
private String role;
|
||||
|
||||
@Schema(description = "邀请人用户ID")
|
||||
private Long inviteBy;
|
||||
|
||||
@Schema(description = "加入时间")
|
||||
private String inviteTime;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
78
src/main/java/com/gxwebsoft/app/param/AppVersionParam.java
Normal file
78
src/main/java/com/gxwebsoft/app/param/AppVersionParam.java
Normal file
@@ -0,0 +1,78 @@
|
||||
package com.gxwebsoft.app.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用版本发布记录查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "AppVersionParam对象", description = "应用版本发布记录查询参数")
|
||||
public class AppVersionParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联应用ID")
|
||||
private Long websiteId;
|
||||
|
||||
@Schema(description = "版本号,如 1.0.0")
|
||||
private String versionNo;
|
||||
|
||||
@Schema(description = "版本名称")
|
||||
private String versionName;
|
||||
|
||||
@Schema(description = "版本更新说明")
|
||||
private String changelog;
|
||||
|
||||
@Schema(description = "安装包地址")
|
||||
private String packageUrl;
|
||||
|
||||
@Schema(description = "包大小(字节)")
|
||||
private Long packageSize;
|
||||
|
||||
@Schema(description = "包MD5/SHA256")
|
||||
private String packageHash;
|
||||
|
||||
@Schema(description = "环境: development/staging/production")
|
||||
private String env;
|
||||
|
||||
@Schema(description = "状态 0=构建中 1=已发布 2=已回滚 3=构建失败")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否为当前版本")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean isCurrent;
|
||||
|
||||
@Schema(description = "发布人用户ID")
|
||||
private Long publishBy;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
private String publishTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.app.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.app.entity.AppCredential;
|
||||
import com.gxwebsoft.app.param.AppCredentialParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用密钥凭证Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:43
|
||||
*/
|
||||
public interface AppCredentialService extends IService<AppCredential> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<AppCredential>
|
||||
*/
|
||||
PageResult<AppCredential> pageRel(AppCredentialParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<AppCredential>
|
||||
*/
|
||||
List<AppCredential> listRel(AppCredentialParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return AppCredential
|
||||
*/
|
||||
AppCredential getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
42
src/main/java/com/gxwebsoft/app/service/AppEventService.java
Normal file
42
src/main/java/com/gxwebsoft/app/service/AppEventService.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.app.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.app.entity.AppEvent;
|
||||
import com.gxwebsoft.app.param.AppEventParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用操作动态Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
public interface AppEventService extends IService<AppEvent> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<AppEvent>
|
||||
*/
|
||||
PageResult<AppEvent> pageRel(AppEventParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<AppEvent>
|
||||
*/
|
||||
List<AppEvent> listRel(AppEventParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return AppEvent
|
||||
*/
|
||||
AppEvent getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
42
src/main/java/com/gxwebsoft/app/service/AppUserService.java
Normal file
42
src/main/java/com/gxwebsoft/app/service/AppUserService.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.app.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.app.entity.AppUser;
|
||||
import com.gxwebsoft.app.param.AppUserParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
public interface AppUserService extends IService<AppUser> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<AppUser>
|
||||
*/
|
||||
PageResult<AppUser> pageRel(AppUserParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<AppUser>
|
||||
*/
|
||||
List<AppUser> listRel(AppUserParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return AppUser
|
||||
*/
|
||||
AppUser getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.app.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.app.entity.AppVersion;
|
||||
import com.gxwebsoft.app.param.AppVersionParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用版本发布记录Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
public interface AppVersionService extends IService<AppVersion> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<AppVersion>
|
||||
*/
|
||||
PageResult<AppVersion> pageRel(AppVersionParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<AppVersion>
|
||||
*/
|
||||
List<AppVersion> listRel(AppVersionParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return AppVersion
|
||||
*/
|
||||
AppVersion getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.app.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.app.mapper.AppCredentialMapper;
|
||||
import com.gxwebsoft.app.service.AppCredentialService;
|
||||
import com.gxwebsoft.app.entity.AppCredential;
|
||||
import com.gxwebsoft.app.param.AppCredentialParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用密钥凭证Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:43
|
||||
*/
|
||||
@Service
|
||||
public class AppCredentialServiceImpl extends ServiceImpl<AppCredentialMapper, AppCredential> implements AppCredentialService {
|
||||
|
||||
@Override
|
||||
public PageResult<AppCredential> pageRel(AppCredentialParam param) {
|
||||
PageParam<AppCredential, AppCredentialParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<AppCredential> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppCredential> listRel(AppCredentialParam param) {
|
||||
List<AppCredential> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<AppCredential, AppCredentialParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppCredential getByIdRel(Integer id) {
|
||||
AppCredentialParam param = new AppCredentialParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.app.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.app.mapper.AppEventMapper;
|
||||
import com.gxwebsoft.app.service.AppEventService;
|
||||
import com.gxwebsoft.app.entity.AppEvent;
|
||||
import com.gxwebsoft.app.param.AppEventParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用操作动态Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Service
|
||||
public class AppEventServiceImpl extends ServiceImpl<AppEventMapper, AppEvent> implements AppEventService {
|
||||
|
||||
@Override
|
||||
public PageResult<AppEvent> pageRel(AppEventParam param) {
|
||||
PageParam<AppEvent, AppEventParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<AppEvent> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppEvent> listRel(AppEventParam param) {
|
||||
List<AppEvent> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<AppEvent, AppEventParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppEvent getByIdRel(Integer id) {
|
||||
AppEventParam param = new AppEventParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.app.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.app.mapper.AppUserMapper;
|
||||
import com.gxwebsoft.app.service.AppUserService;
|
||||
import com.gxwebsoft.app.entity.AppUser;
|
||||
import com.gxwebsoft.app.param.AppUserParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用成员Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Service
|
||||
public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser> implements AppUserService {
|
||||
|
||||
@Override
|
||||
public PageResult<AppUser> pageRel(AppUserParam param) {
|
||||
PageParam<AppUser, AppUserParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<AppUser> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppUser> listRel(AppUserParam param) {
|
||||
List<AppUser> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<AppUser, AppUserParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppUser getByIdRel(Integer id) {
|
||||
AppUserParam param = new AppUserParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.app.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.app.mapper.AppVersionMapper;
|
||||
import com.gxwebsoft.app.service.AppVersionService;
|
||||
import com.gxwebsoft.app.entity.AppVersion;
|
||||
import com.gxwebsoft.app.param.AppVersionParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用版本发布记录Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2026-03-28 21:29:44
|
||||
*/
|
||||
@Service
|
||||
public class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVersion> implements AppVersionService {
|
||||
|
||||
@Override
|
||||
public PageResult<AppVersion> pageRel(AppVersionParam param) {
|
||||
PageParam<AppVersion, AppVersionParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<AppVersion> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppVersion> listRel(AppVersionParam param) {
|
||||
List<AppVersion> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<AppVersion, AppVersionParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppVersion getByIdRel(Integer id) {
|
||||
AppVersionParam param = new AppVersionParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user