feat: initial iShare project code

This commit is contained in:
purovps
2026-02-16 23:20:59 +08:00
parent 8c83a6fd46
commit 6f270a972e
1910 changed files with 218015 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<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.pig4cloud</groupId>
<artifactId>as-app-server</artifactId>
<version>5.2.0</version>
</parent>
<artifactId>as-app-server-api</artifactId>
<dependencies>
<!--core 工具类-->
<dependency>
<groupId>com.pig4cloud</groupId>
<artifactId>pigx-common-core</artifactId>
</dependency>
<!--mybatis plus extension,包含了mybatis plus core-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
</dependency>
<!--feign 工具类-->
<dependency>
<groupId>com.pig4cloud</groupId>
<artifactId>pigx-common-feign</artifactId>
</dependency>
<!-- excel 导入导出 -->
<dependency>
<groupId>com.pig4cloud</groupId>
<artifactId>pigx-common-excel</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,30 @@
package com.pig4cloud.pigx.app.api.dto;
import com.pig4cloud.pigx.app.api.entity.AppUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
@Data
@Schema(description = "APP用户传输对象")
@EqualsAndHashCode(callSuper = true)
public class AppUserDTO extends AppUser {
/**
* 角色ID
*/
@Schema(description = "角色id集合")
private List<Long> role;
/**
* 新密码
*/
@Schema(description = "新密码")
private String newpassword1;
@Schema(description = "验证码")
private String mobileCode;
}

View File

@@ -0,0 +1,54 @@
/*
*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*
*/
package com.pig4cloud.pigx.app.api.dto;
import com.pig4cloud.pigx.app.api.entity.AppUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author lengleng
* @date 2017/11/11
*/
@Data
@Schema(description = "用户信息")
public class AppUserInfo implements Serializable {
/**
* 用户基本信息
*/
@Schema(description = "用户基本信息")
private AppUser appUser;
/**
* 权限标识集合
*/
@Schema(description = "权限标识集合")
private String[] permissions;
/**
* 角色集合
*/
@Schema(description = "角色标识集合")
private Long[] roles;
}

View File

@@ -0,0 +1,62 @@
package com.pig4cloud.pigx.app.api.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author ami
* @date 2023/10
*/
@Data
public class AppUserInfoDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户id
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "userId")
private Long userId;
/**
* 用户名
*/
@Schema(description = "用户名")
private String username;
/**
* 手机号 -> 加密&模糊梳理
*/
// @Schema(description = "手机号")
// private String phone;
/**
* 头像
*/
@Schema(description = "头像")
private String avatar;
/**
* 昵称
*/
@Schema(description = "拓展字段:昵称")
private String nickname;
/**
* 邮箱 -> 加密&模糊梳理
*/
@Schema(description = "拓展字段:邮箱")
private String email;
/**
* 所属租户
*/
// @Schema(description = "所属租户", hidden = true)
// private Long tenantId;
}

View File

@@ -0,0 +1,31 @@
package com.pig4cloud.pigx.app.api.dto;
import com.pig4cloud.pigx.app.api.entity.as.AsSubProduct;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
@Schema(description = "网站首页数据传输对象")
public class AsInitDTO {
private static final long serialVersionUID = 1L;
//合租产品信息
//title price desc icon orderType/自营/个人
private List<AsSubProduct> products;
private List<SubOrderDTO> orders;
//合租订单展示
//title desc price
//用户评价
//用户名 头像 使用时常(上车时间) 评论时间 评分?
//最近订单ws推送
}

View File

@@ -0,0 +1,33 @@
package com.pig4cloud.pigx.app.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@Schema(description = "订阅统计数据传输对象")
public class AsUserSubDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 订阅数量
*/
private Integer subCount;
/**
* 平台id
*/
private Integer platformId;
/**
* 平台名称
*/
private String platformName;
private String subPrice;
private String title;
private List<SubComment> comments;//object
private List<RealTimeOrder> realTimeOrders;//object
private String remark;
}

View File

@@ -0,0 +1,18 @@
package com.pig4cloud.pigx.app.api.dto;
/**
* 首页实时订单
*/
public class RealTimeOrder {
//order time
//platform id
//subtype id
//user id
//avatar
}

View File

@@ -0,0 +1,18 @@
package com.pig4cloud.pigx.app.api.dto;
/**
* 订阅评价
*/
public class SubComment {
//comment time
//comment
//id
//avatar
//name
}

View File

@@ -0,0 +1,21 @@
package com.pig4cloud.pigx.app.api.dto;
/**
* 订阅订单DTO
*/
public class SubOrderDTO {
//order time
//platform id
//subtype id
//user id
//avatar
//comment
//star
}

View File

@@ -0,0 +1,8 @@
package com.pig4cloud.pigx.app.api.dto;
/**
* 订阅产品DTO
*/
public class SubProductDTO {
}

View File

@@ -0,0 +1,84 @@
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 文章分类表
*
* @author pig
* @date 2023-06-07 16:28:03
*/
@Data
@TableName("app_article_category")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "文章分类表")
public class AppArticleCategoryEntity extends Model<AppArticleCategoryEntity> {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 名称
*/
@Schema(description = "名称")
private String name;
/**
* 排序
*/
@Schema(description = "排序")
private Integer sort;
/**
* 是否显示: 0=否, 1=是
*/
@Schema(description = "是否显示: 0=否, 1=是")
private Integer isShow;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 更新人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新人")
private String updateBy;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 是否删除: 0=否, 1=是
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "是否删除: 0=否, 1=是")
private String delFlag;
}

View File

@@ -0,0 +1,84 @@
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 文章收藏表
*
* @author pig
* @date 2023-06-16 14:33:41
*/
@Data
@TableName("app_article_collect")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "文章收藏表")
public class AppArticleCollectEntity extends Model<AppArticleCollectEntity> {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 用户ID
*/
@Schema(description = "用户ID")
private Long userId;
/**
* 文章ID
*/
@Schema(description = "文章ID")
private Long articleId;
/**
* 文章标题
*/
@TableField(exist = false)
private String title;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 更新人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新人")
private String updateBy;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 是否删除
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "是否删除")
private String delFlag;
}

View File

@@ -0,0 +1,134 @@
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.FieldNameConstants;
import java.time.LocalDateTime;
/**
* 文章资讯
*
* @author pig
* @date 2023-06-07 16:32:35
*/
@Data
@FieldNameConstants
@TableName("app_article")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "文章资讯")
public class AppArticleEntity extends Model<AppArticleEntity> {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 分类
*/
@Schema(description = "分类")
private Long cid;
/**
* 标题
*/
@Schema(description = "标题")
private String title;
/**
* 简介
*/
@Schema(description = "简介")
private String intro;
/**
* 摘要
*/
@Schema(description = "摘要")
private String summary;
/**
* 封面
*/
@Schema(description = "封面")
private String image;
/**
* 内容
*/
@Schema(description = "内容")
private String content;
/**
* 作者
*/
@Schema(description = "作者")
private String author;
/**
* 浏览
*/
@Schema(description = "浏览")
private Integer visit;
/**
* 排序
*/
@Schema(description = "排序")
private Integer sort;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 更新人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新人")
private String updateBy;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 删除时间
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标志")
private String delFlag;
/**
* 当前用户是否已收藏
*/
@TableField(exist = false)
private boolean collect;
/**
* 分类名称
*/
@TableField(exist = false)
private String cname;
}

View File

@@ -0,0 +1,83 @@
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 页面
*
* @author lengleng
* @date 2023-06-08 11:19:23
*/
@Data
@TableName("app_page")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "页面")
public class AppPageEntity extends Model<AppPageEntity> {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 页面类型
*/
@Schema(description = "页面类型")
private Integer pageType;
/**
* 页面名称
*/
@Schema(description = "页面名称")
private String pageName;
/**
* 页面数据
*/
@Schema(description = "页面数据")
private String pageData;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改人")
private String updateBy;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改时间")
private LocalDateTime updateTime;
/**
* 删除标记
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标记")
private String delFlag;
}

View File

@@ -0,0 +1,105 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* app角色表
*
* @author aeizzz
* @date 2022-12-07 09:52:03
*/
@Data
@TableName("app_role")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "app角色表")
public class AppRole extends Model<AppRole> {
private static final long serialVersionUID = 1L;
/**
* roleId
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "roleId")
private Long roleId;
/**
* roleName
*/
@Schema(description = "roleName")
private String roleName;
/**
* roleCode
*/
@Schema(description = "roleCode")
private String roleCode;
/**
* roleDesc
*/
@Schema(description = "roleDesc")
private String roleDesc;
/**
* 创建人
*/
@Schema(description = "创建人")
private String createBy;
/**
* 修改人
*/
@Schema(description = "修改人")
private String updateBy;
/**
* createTime
*/
@Schema(description = "createTime")
private LocalDateTime createTime;
/**
* updateTime
*/
@Schema(description = "updateTime")
private LocalDateTime updateTime;
/**
* delFlag
*/
@Schema(description = "delFlag")
private String delFlag;
/**
* tenantId
*/
@Schema(description = "tenantId", hidden = true)
private Long tenantId;
}

View File

@@ -0,0 +1,125 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.pig4cloud.pigx.common.core.sensitive.Sensitive;
import com.pig4cloud.pigx.common.core.util.ValidGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/**
* app 社交账号登录
*/
@Data
@Schema(description = "第三方账号信息")
@EqualsAndHashCode(callSuper = true)
public class AppSocialDetails extends Model<AppSocialDetails> {
private static final long serialVersionUID = 1L;
/**
* 主鍵
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 类型
*/
@NotBlank(message = "类型不能为空")
@Schema(description = "账号类型")
private String type;
/**
* 描述
*/
@Schema(description = "描述")
private String remark;
/**
* appid
*/
@Sensitive(prefixNoMaskLen = 4, suffixNoMaskLen = 4)
@NotBlank(message = "账号不能为空")
@Schema(description = "appId")
private String appId;
/**
* app_secret
*/
@Sensitive(prefixNoMaskLen = 4, suffixNoMaskLen = 4)
@NotBlank(message = "密钥不能为空", groups = { ValidGroup.Insert.class })
@Schema(description = "app secret")
private String appSecret;
/**
* 回调地址
*/
@Schema(description = "回调地址")
private String redirectUrl;
/**
* 拓展字段
*/
@Schema(description = "拓展字段")
private String ext;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 修改人
*/
@TableField(fill = FieldFill.UPDATE)
@Schema(description = "修改人")
private String updateBy;
/**
* 创建时间
*/
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@Schema(description = "更新时间")
@TableField(fill = FieldFill.UPDATE)
private LocalDateTime updateTime;
/**
* 删除标记
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标记,1:已删除,0:正常")
private String delFlag;
}

View File

@@ -0,0 +1,94 @@
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 导航栏
*
* @author lengleng
* @date 2023-06-08 11:18:46
*/
@Data
@TableName("app_tabbar")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "导航栏")
public class AppTabbarEntity extends Model<AppTabbarEntity> {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 导航名称
*/
@Schema(description = "导航名称")
private String name;
/**
* 未选图标
*/
@Schema(description = "未选图标")
private String selected;
/**
* 已选图标
*/
@Schema(description = "已选图标")
private String unselected;
/**
* 链接地址
*/
@Schema(description = "链接地址")
@JsonRawValue
@JsonDeserialize()
private String link;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 更新人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新人")
private String updateBy;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 删除标记
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标记")
private String delFlag;
}

View File

@@ -0,0 +1,159 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* app用户表
*
* @author aeizzz
* @date 2022-12-07 09:52:03
*/
@Data
@TableName("app_user")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "app用户表")
public class AppUser extends Model<AppUser> {
private static final long serialVersionUID = 1L;
/**
* userId
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "userId")
private Long userId;
/**
* 用户名
*/
@Schema(description = "用户名")
private String username;
/**
* 密码
*/
@Schema(description = "密码")
private String password;
/**
* 随机盐
*/
@JsonIgnore
@Schema(description = "随机盐")
private String salt;
/**
* 手机号
*/
@Schema(description = "手机号")
private String phone;
/**
* 头像
*/
@Schema(description = "头像")
private String avatar;
/**
* 昵称
*/
@Schema(description = "拓展字段:昵称")
private String nickname;
/**
* 姓名
*/
@Schema(description = "拓展字段:姓名")
private String name;
/**
* 邮箱
*/
@Schema(description = "拓展字段:邮箱")
private String email;
/**
* 创建人
*/
@Schema(description = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
* 修改人
*/
@Schema(description = "修改人")
@TableField(fill = FieldFill.UPDATE)
private String updateBy;
/**
* 创建时间
*/
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 修改时间
*/
@Schema(description = "修改时间")
@TableField(fill = FieldFill.UPDATE)
private LocalDateTime updateTime;
/**
* 删除标记
*/
@Schema(description = "删除标记,1:已删除,0:正常")
@TableField(fill = FieldFill.INSERT)
@TableLogic
private String delFlag;
/**
* 所属租户
*/
@Schema(description = "所属租户", hidden = true)
private Long tenantId;
/**
* 最后一次密码修改时间
*/
@Schema(description = "最后一次密码修改时间")
private LocalDateTime lastModifiedTime;
/**
* 锁定标记
*/
@Schema(description = "锁定标记")
private String lockFlag;
/**
* 微信小程序登录openId
*/
@Schema(description = "微信小程序登录openId")
private String wxOpenid;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.app.api.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 用户角色表
*
* @author aeizzz
* @date 2022-12-07 09:52:03
*/
@Data
@TableName("app_user_role")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "用户角色表")
public class AppUserRole extends Model<AppUserRole> {
private static final long serialVersionUID = 1L;
/**
* 用户ID
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "用户ID")
private Long userId;
/**
* 角色ID
*/
@Schema(description = "角色ID")
private Long roleId;
}

View File

@@ -0,0 +1,47 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 媒体平台
*
* @author amigo
* @date 2023-07
*/
@Data
@TableName("as_platform")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "媒体平台表")
public class AsPlatform extends Model<AsPlatform> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "ID")
private Long id;
@Schema(description = "平台名称")
private String platformName;
@Schema(description = "平台类型 0全部")
private Integer platformType;
@Schema(description = "应用图标")
private String icon;
@Schema(description = "公司")
private String company;
@Schema(description = "平台网站")
private String website;
@Schema(description = "sort")
private String sortOrder;
@Schema(description = "产品code: 类型_名称_id")
private String productCode;
}

View File

@@ -0,0 +1,38 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 平台类型表
*
* @author amigo
* @date 2023-07
*/
@Data
@TableName("as_platform_type")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "平台类型表")
public class AsPlatformType extends Model<AsPlatformType> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "ID")
private Long id;
@Schema(description = "名称")
private String name;
@Schema(description = "平台类型 0全部")
private Integer platformType;
@Schema(description = "平台类型")
private String sortOrder;
}

View File

@@ -0,0 +1,101 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 流媒体订阅账号
*
* @author amigo
* @date 2023-08
*/
@Data
@TableName("as_sub_account")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "as流媒体订阅账号")
public class AsSubAccount extends Model<AsSubAccount> {
private static final long serialVersionUID = 1L;
/**
* 产品id
*/
@Schema(description = "product_id")
private Long productId;
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "ID")
private Long id;
/**
* 订阅计划id
*/
@Schema(description = "sub_plan_id")
private Integer subPlanId;
/**
* main user
*/
@Schema(description = "user_id")
private Integer userId;
/**
* 付费计划id
*/
@Schema(description = "sub_payroll_id")
private Integer subPayrollId;
/**
* 地区
*/
@Schema(description = "region")
private String region;
/**
* 分享类型
*/
@Schema(description = "share_type")
private Integer shareType;
/**
* 账号类型
*/
@Schema(description = "account_type")
private Integer accountType;
/**
* 续费日期
*/
@Schema(description = "renew_date")
private LocalDateTime renewDate;
/**
* 平台id
*/
@Schema(description = "platform_id")
private Integer platformId;
/**
* 用户名
*/
@Schema(description = "account_name")
private String accountName;
/**
* 用户密码
*/
@Schema(description = "account_passwd")
private String accountPasswd;
/**
* 密码salt
*/
@Schema(description = "passwd_salt")
private Integer passwdSalt;
}

View File

@@ -0,0 +1,53 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 付费计划表
*
* @author amigo
* @date 2023-07
*/
@Data
@TableName("as_sub_payroll")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "as付费计划")
public class AsSubPayroll extends Model<AsSubPayroll> {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "ID")
private Long id;
/**
* 订阅计划id +=,
*/
@Schema(description = "sub_plans")
private Long subPlans;
@Schema(description = "platform_id")
private Integer platformId;
/**
* 付费方式 月/季/年 - 1/2/3
*/
@Schema(description = "payroll")
private Integer payroll;
@Schema(description = "price")
private BigDecimal price;
@Schema(description = "currency")
private String currency;
@Schema(description = "region")
private String region;
@Schema(description = "产品code")
private String productCode;
}

View File

@@ -0,0 +1,37 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 流媒体订阅计划表
*
* @author amigo
* @date 2023-07
*/
@Data
@TableName("as_sub_plan")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "as订阅计划")
public class AsSubPlan extends Model<AsSubPlan> {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "订阅计划ID")
private Long id;
@Schema(description = "订阅名称")
private String name;
@Schema(description = "平台id")
private String platformId;
@Schema(description = "用户容量")
private String capacity;
@Schema(description = "备注")
private String remark;
@Schema(description = "排序")
private String sortOrder;
}

View File

@@ -0,0 +1,45 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@TableName("as_sub_product")
@Schema(description = "订阅产品")
public class AsSubProduct {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private Long id;
@Schema(description = "综合评分")
private Integer star;
@Schema(description = "标题")
private String title;
@Schema(description = "描述")
private String description;
@Schema(description = "标签s")
private String Tags;
@Schema(description = "订阅ids")
private String subPlanIds;
@Schema(description = "总价")
private BigDecimal amount;
@Schema(description = "用户id")
private Long userId;
@Schema(description = "产品类型 1自营 2个人")
private Long productType;
@Schema(description = "创建时间")
private LocalDateTime createTime;
@Schema(description = "更新时间")
private LocalDateTime updateTime;
@Schema(description = "产品code: 类型_名称_id")
private String productCode;
@Schema(description = "订阅类型 1单品 2多品")
private Long subType;
}

View File

@@ -0,0 +1,30 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Data
@TableName("as_sub_product_comment")
@Schema(description = "订阅产品评价")
public class AsSubProductComment {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private Long id;
@Schema(description = "评分")
private Integer star;
@Schema(description = "评价")
private String comment;
@Schema(description = "用户id")
private Long userId;
@Schema(description = "产品id")
private Long productId;
@Schema(description = "创建时间")
private LocalDateTime createTime;
@Schema(description = "更新时间")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,52 @@
package com.pig4cloud.pigx.app.api.entity.as;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 流媒体订阅计划表
*
* @author amigo
* @date 2023-07
*/
@Data
@TableName("as_user_sub")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "账号订阅表")
public class AsUserSub extends Model<AsUserSub> {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "ID")
private Long id;
@Schema(description = "platformId")
private Integer platformId;
@Schema(description = "capacity")
private Integer capacity;
@Schema(description = "capacity_loaded")
private Integer capacityLoaded;
@Schema(description = "plan_id")
private Integer planId;
@Schema(description = "user_id")
private Integer userId;
@Schema(description = "main_account")
private Integer mainAccount;
@Schema(description = "region")
private String region;
@Schema(description = "target_ip")
private String targetIp;
@Schema(description = "remark")
private Integer remark;
}

View File

@@ -0,0 +1,66 @@
/*
*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*
*/
package com.pig4cloud.pigx.app.api.feign;
import com.pig4cloud.pigx.app.api.dto.AppUserInfo;
import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* @author lengleng
* @date 2018/6/22
*/
@FeignClient(contextId = "remoteAppUserService", value = ServiceNameConstants.APP_SERVER)
public interface RemoteAppUserService {
/**
* 通过用户名查询用户、角色信息
* @param username 用户名
* @param from 调用标志
* @return R
*/
@GetMapping("/appuser/info/{username}")
R<AppUserInfo> info(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM) String from);
/**
* 通过社交账号或手机号查询用户、角色信息
* @param inStr appid@code
* @param from 调用标志
* @return
*/
@GetMapping("/appsocial/info/{inStr}")
R<AppUserInfo> social(@PathVariable("inStr") String inStr, @RequestHeader(SecurityConstants.FROM) String from);
/**
* 锁定用户
* @param username 用户名
* @param from 调用标识
* @return
*/
@PutMapping("/appuser/lock/{username}")
R<Boolean> lockUser(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM) String from);
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.app.api.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.pig4cloud.pigx.common.excel.annotation.ExcelLine;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author lengleng
* @date 2020/2/10
*/
@Data
@Schema(description = "前端角色展示对象")
@ColumnWidth(30)
public class AppRoleExcelVO {
/**
* 导入时候回显行号
*/
@ExcelLine
@ExcelIgnore
private Long lineNum;
/**
* roleName
*/
@ExcelProperty("角色名称")
private String roleName;
/**
* roleCode
*/
@ExcelProperty("角色标识")
private String roleCode;
/**
* roleDesc
*/
@ExcelProperty("角色描述")
private String roleDesc;
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.app.api.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author lengleng
* @date 2020/2/10
*/
@Data
@Schema(description = "前端角色展示对象")
public class AppRoleVO {
/**
* 角色id
*/
private Long roleId;
/**
* 菜单列表
*/
private String menuIds;
}

View File

@@ -0,0 +1,83 @@
package com.pig4cloud.pigx.app.api.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.pig4cloud.pigx.common.excel.annotation.ExcelLine;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
@Data
@ColumnWidth(30)
public class AppUserExcelVO {
/**
* 导入时候回显行号
*/
@ExcelLine
@ExcelIgnore
private Long lineNum;
/**
* 主键ID
*/
@ExcelProperty("用户编号")
private Long userId;
/**
* 用户名
*/
@NotBlank(message = "用户名不能为空")
@ExcelProperty("用户名")
private String username;
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空")
@ExcelProperty("手机号")
private String phone;
/**
* 手机号
*/
@NotBlank(message = "昵称不能为空")
@ExcelProperty("昵称")
private String nickname;
/**
* 手机号
*/
@NotBlank(message = "姓名不能为空")
@ExcelProperty("姓名")
private String name;
/**
* 手机号
*/
@NotBlank(message = "邮箱不能为空")
@ExcelProperty("邮箱")
private String email;
/**
* 角色列表
*/
@NotBlank(message = "角色不能为空")
@ExcelProperty("角色")
private String roleNameList;
/**
* 锁定标记
*/
@ExcelProperty("锁定标记,0:正常,9:已锁定")
private String lockFlag;
/**
* 创建时间
*/
@ExcelProperty(value = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,101 @@
package com.pig4cloud.pigx.app.api.vo;
import com.pig4cloud.pigx.app.api.entity.AppRole;
import com.pig4cloud.pigx.common.core.sensitive.Sensitive;
import com.pig4cloud.pigx.common.core.sensitive.SensitiveTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
@Data
public class AppUserVO implements Serializable {
/**
* 主键
*/
@Schema(description = "主键")
private Long userId;
/**
* 用户名
*/
@Schema(description = "用户名")
private String username;
/**
* 密码
*/
@Schema(description = "密码")
private String password;
/**
* 手机号
*/
@Schema(description = "手机号")
@Sensitive(type = SensitiveTypeEnum.MOBILE_PHONE)
private String phone;
/**
* 头像
*/
@Schema(description = "头像")
private String avatar;
/**
* 昵称
*/
@Schema(description = "拓展字段:昵称")
private String nickname;
/**
* 姓名
*/
@Schema(description = "拓展字段:姓名")
private String name;
/**
* 邮箱
*/
@Schema(description = "拓展字段:邮箱")
private String email;
/**
* 创建时间
*/
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 删除标记
*/
@Schema(description = "删除标记,1:已删除,0:正常")
private String delFlag;
/**
* 所属租户
*/
@Schema(description = "所属租户")
private Long tenantId;
/**
* 最后一次密码修改时间
*/
@Schema(description = "最后一次密码修改时间")
private LocalDateTime lastModifiedTime;
/**
* 锁定标记
*/
@Schema(description = "锁定标记")
private String lockFlag;
/**
* 角色列表
*/
@Schema(description = "拥有的角色列表")
private List<AppRole> roleList;
}

View File

@@ -0,0 +1,2 @@
com.pig4cloud.pigx.common.feign.PigxFeignAutoConfiguration=\
com.pig4cloud.pigx.app.api.feign.RemoteAppUserService