diff --git a/cn.wsdns.file/README.md b/cn.wsdns.file/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/controller/AppController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/controller/AppController.java deleted file mode 100644 index bd0c1bf..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/controller/AppController.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.gxwebsoft.common.system.controller; - -import com.gxwebsoft.common.core.web.ApiResult; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.oa.entity.App; -import com.gxwebsoft.oa.service.AppService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; - -/** - * 应用管理记录表控制器 - * - * @author 科技小王子 - * @since 2023-03-28 10:45:39 - */ -@Api(tags = "应用管理记录表管理") -@RestController -@RequestMapping("/app-info") -public class AppController extends BaseController { - @Resource - private AppService appService; - - @ApiOperation("APP应用授权身份效验") - @GetMapping("/{appid}") - public ApiResult authentication(@PathVariable("appid") String appid) { - final App appInfo = appService.getById(appid); - if(appInfo == null){ - return fail("应用不存在:".concat(appid)); - } - return success("应用信息",appInfo); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/controller/CompanyController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/controller/CompanyController.java deleted file mode 100644 index 3bda2cf..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/controller/CompanyController.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.gxwebsoft.common.system.controller; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.gxwebsoft.common.core.annotation.OperationLog; -import com.gxwebsoft.common.core.web.ApiResult; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.core.web.BatchParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.common.system.entity.Company; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.common.system.param.CompanyParam; -import com.gxwebsoft.common.system.service.CompanyService; -import com.gxwebsoft.common.system.service.FileRecordService; -import com.gxwebsoft.common.system.service.UserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 企业信息控制器 - * - * @author 科技小王子 - * @since 2023-05-27 14:57:34 - */ -@Api(tags = "企业信息管理") -@RestController -@RequestMapping("/api/system/company") -public class CompanyController extends BaseController { - @Resource - private CompanyService companyService; - @Resource - private UserService userService; - @Resource - private FileRecordService fileRecordService; - - @PreAuthorize("hasAuthority('sys:company:list')") - @OperationLog - @ApiOperation("分页查询企业信息") - @GetMapping("/page") - public ApiResult> page(CompanyParam param) { -// PageParam page = new PageParam<>(param); -// page.setDefaultOrder("create_time desc"); -// return success(companyService.page(page, page.getWrapper())); - // 使用关联查询 - return success(companyService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('sys:company:list')") - @OperationLog - @ApiOperation("查询全部企业信息") - @GetMapping() - public ApiResult> list(CompanyParam param) { -// PageParam page = new PageParam<>(param); -// page.setDefaultOrder("create_time desc"); -// return success(companyService.list(page.getOrderWrapper())); - // 使用关联查询 - return success(companyService.listRel(param)); - } - - @PreAuthorize("hasAuthority('sys:company:list')") - @OperationLog - @ApiOperation("根据id查询企业信息") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { -// return success(companyService.getById(id)); - // 使用关联查询 - return success(companyService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('sys:company:save')") - @OperationLog - @ApiOperation("添加企业信息") - @PostMapping() - public ApiResult save(@RequestBody Company company) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - company.setUserId(loginUser.getUserId()); - } - if (companyService.save(company)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('sys:company:profile')") - @OperationLog - @ApiOperation("修改企业信息") - @PutMapping() - public ApiResult update(@RequestBody Company company) { - if (companyService.updateById(company)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('sys:company:remove')") - @OperationLog - @ApiOperation("删除企业信息") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (companyService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('sys:company:save')") - @OperationLog - @ApiOperation("批量添加企业信息") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (companyService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('sys:company:update')") - @OperationLog - @ApiOperation("批量修改企业信息") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(companyService, "company_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('sys:company:remove')") - @OperationLog - @ApiOperation("批量删除企业信息") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (companyService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('sys:company:profile')") - @ApiOperation("根据id查询企业信息") - @GetMapping("/profile") - public ApiResult profile() { - // 使用关联查询 - final Company company = companyService.getByTenantIdRel(getTenantId()); - try { - company.setUsers(userService.count(new LambdaQueryWrapper().gt(User::getOrganizationId, 0))); - companyService.updateById(company); - } catch (Exception e) { - e.printStackTrace(); - } - return success(company); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/AppInfo.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/AppInfo.java deleted file mode 100644 index b56c9b9..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/AppInfo.java +++ /dev/null @@ -1,243 +0,0 @@ -package com.gxwebsoft.common.system.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.gxwebsoft.oa.entity.AppUser; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; - -/** - * 应用管理记录表 - * - * @author 科技小王子 - * @since 2023-03-28 10:45:39 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "App对象", description = "应用管理记录表") -@TableName("oa_app") -public class AppInfo implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "应用ID") - @TableId(value = "app_id", type = IdType.AUTO) - private Integer appId; - - @ApiModelProperty(value = "应用名称") - private String appName; - - @ApiModelProperty(value = "上级id, 0是顶级") - private Integer parentId; - - @ApiModelProperty(value = "应用标识") - private String appCode; - - @ApiModelProperty(value = "类型, 0菜单, 1按钮") - private String appType; - - @ApiModelProperty(value = "应用类型多选") - private String appTypeMultiple; - - @ApiModelProperty(value = "类型, 0菜单, 1按钮") - private Integer menuType; - - @ApiModelProperty(value = "企业ID") - private Integer companyId; - - @ApiModelProperty(value = "应用图标") - private String appIcon; - - @ApiModelProperty(value = "二维码") - private String appQrcode; - - @ApiModelProperty(value = "链接地址") - private String appUrl; - - @ApiModelProperty(value = "后台管理地址") - private String adminUrl; - - @ApiModelProperty(value = "下载地址") - private String downUrl; - - @ApiModelProperty(value = "服务器地址") - private String serverUrl; - - @ApiModelProperty(value = "回调地址") - private String callbackUrl; - - @ApiModelProperty(value = "腾讯文档地址") - private String docsUrl; - - @ApiModelProperty(value = "仓库地址") - private String gitUrl; - - @ApiModelProperty(value = "文件服务器") - private String fileUrl; - - @ApiModelProperty(value = "原型图地址") - private String prototypeUrl; - - @ApiModelProperty(value = "IP白名单") - private String ipAddress; - - @ApiModelProperty(value = "应用截图") - private String images; - - @ApiModelProperty(value = "应用包名") - private String packageName; - - @ApiModelProperty(value = "下载次数") - private Integer clicks; - - @ApiModelProperty(value = "安装次数") - private Integer installs; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "应用介绍") - private String content; - - @ApiModelProperty(value = "项目需求") - private String requirement; - - @ApiModelProperty(value = "开发者(个人或公司)") - private String developer; - - @ApiModelProperty(value = "项目负责人") - private String director; - - @ApiModelProperty(value = "项目经理") - private String projectDirector; - - @ApiModelProperty(value = "业务经理") - private String salesman; - - @ApiModelProperty(value = "软件定价") - private BigDecimal price; - - @ApiModelProperty(value = "划线价格") - private BigDecimal linePrice; - - @ApiModelProperty(value = "评分") - private String score; - - @ApiModelProperty(value = "星级") - private String star; - - @ApiModelProperty(value = "菜单路由地址") - private String path; - - @ApiModelProperty(value = "菜单组件地址, 目录可为空") - private String component; - - @ApiModelProperty(value = "权限标识") - private String authority; - - @ApiModelProperty(value = "打开位置") - private String target; - - @ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)") - private Integer hide; - - @ApiModelProperty(value = "禁止搜索,1禁止 0 允许") - private Integer search; - - @ApiModelProperty(value = "菜单侧栏选中的path") - private String active; - - @ApiModelProperty(value = "其它路由元信息") - private String meta; - - @ApiModelProperty(value = "版本,0正式版 1体验版 2开发版") - private String edition; - - @ApiModelProperty(value = "版本号") - private String version; - - @ApiModelProperty(value = "是否已安装") - private Integer isUse; - - @ApiModelProperty(value = "应用状态") - private String appStatus; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "机构id") - private Integer organizationId; - - @ApiModelProperty(value = "应用秘钥") - @TableField(exist = false) - private String appSecret; - - @ApiModelProperty(value = "租户编号") - private String tenantCode; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - - @ApiModelProperty(value = "附件1") - private String file1; - - @ApiModelProperty(value = "附件2") - private String file2; - - @ApiModelProperty(value = "附件3") - private String file3; - - @ApiModelProperty(value = "成员管理") - @TableField(exist = false) - private List users; - - @ApiModelProperty(value = "主体名称") - @TableField(exist = false) - private String tenantName; - - @ApiModelProperty(value = "主体ID") - @TableField(exist = false) - private Integer tenantId; - - @ApiModelProperty(value = "租户信息") - @TableField(exist = false) - private Tenant tenant; - - @ApiModelProperty(value = "开发者名称") - @TableField(exist = false) - private String realName; - - @ApiModelProperty(value = "开发者名称") - @TableField(exist = false) - private String nickname; - - @ApiModelProperty(value = "开发者头像") - @TableField(exist = false) - private String avatar; - - @ApiModelProperty(value = "公司名称") - private String companyName; - - @ApiModelProperty(value = "公司简称") - @TableField(exist = false) - private String shortName; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/Company.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/Company.java deleted file mode 100644 index 0224e6b..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/Company.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.gxwebsoft.common.system.entity; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.util.Date; - -/** - * 企业信息 - * - * @author 科技小王子 - * @since 2023-05-27 14:57:34 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "Company对象", description = "企业信息") -@TableName("sys_company") -public class Company implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "企业id") - @TableId(value = "company_id", type = IdType.AUTO) - private Integer companyId; - - @ApiModelProperty(value = "企业简称") - private String shortName; - - @ApiModelProperty(value = "企业全称") - private String companyName; - - @ApiModelProperty(value = "类型 10企业 20政府单位") - private Integer companyType; - - @ApiModelProperty(value = "应用标识") - private String companyLogo; - - @ApiModelProperty(value = "企业域名") - private String domain; - - @ApiModelProperty(value = "联系电话") - private String phone; - - @ApiModelProperty(value = "发票抬头") - @TableField("Invoice_header") - private String invoiceHeader; - - @ApiModelProperty(value = "服务开始时间") - private Date startTime; - - @ApiModelProperty(value = "服务到期时间") - private Date expirationTime; - - @ApiModelProperty(value = "应用版本 10体验版 20授权版 30旗舰版") - private Integer version; - - @ApiModelProperty(value = "企业成员(当前)") - private Integer users; - - @ApiModelProperty(value = "成员数量(上限)") - private Integer members; - - @ApiModelProperty(value = "存储空间") - private Long storage; - - @ApiModelProperty(value = "存储空间(上限)") - private Long storageMax; - - @ApiModelProperty(value = "行业类型(父级)") - private String industryParent; - - @ApiModelProperty(value = "行业类型(子级)") - private String industryChild; - - @ApiModelProperty(value = "部门数量") - private Integer departments; - - @ApiModelProperty(value = "所在国家") - private String country; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "街道地址") - private String address; - - @ApiModelProperty(value = "经度") - private String longitude; - - @ApiModelProperty(value = "纬度") - private String latitude; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "是否实名认证") - private Integer authentication; - - @ApiModelProperty(value = "状态") - private Integer status; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "创建时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - - @ApiModelProperty(value = "是否默认企业主体") - private Boolean authoritative; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "租户名称") - @TableField(exist = false) - private String tenantName; - - @ApiModelProperty(value = "租户编号") - @TableField(exist = false) - private String tenantCode; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/Setting.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/Setting.java deleted file mode 100644 index ff1339c..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/entity/Setting.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.gxwebsoft.common.system.entity; - -import com.baomidou.mybatisplus.annotation.*; - -import java.time.LocalDateTime; -import java.io.Serializable; -import java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 系统设置 - * - * @author WebSoft - * @since 2022-11-19 13:54:27 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "Setting对象", description = "系统设置") -@TableName("sys_setting") -public class Setting implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "id") - @TableId(value = "setting_id", type = IdType.AUTO) - private Integer settingId; - - @ApiModelProperty(value = "设置项标示") - private String settingKey; - - @ApiModelProperty(value = "设置内容(json格式)") - private String content; - - @ApiModelProperty(value = "排序号") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "创建时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - - @ApiModelProperty(value = "修改租户名称") - @TableField(exist = false) - private String tenantName; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/CompanyMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/CompanyMapper.java deleted file mode 100644 index b0d205c..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/CompanyMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.common.system.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.common.system.entity.Company; -import com.gxwebsoft.common.system.param.CompanyParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 企业信息Mapper - * - * @author 科技小王子 - * @since 2023-05-27 14:57:34 - */ -public interface CompanyMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") CompanyParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") CompanyParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/TenantMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/TenantMapper.java deleted file mode 100644 index 1a21979..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/TenantMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.gxwebsoft.common.system.mapper; - -import com.baomidou.mybatisplus.annotation.InterceptorIgnore; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.common.system.entity.Tenant; -import com.gxwebsoft.common.system.param.TenantParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 租户Mapper - * - * @author WebSoft - * @since 2022-11-17 17:13:39 - */ -public interface TenantMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - @InterceptorIgnore(tenantLine = "true") - List selectPageRel(@Param("page") IPage page, - @Param("param") TenantParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") TenantParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/xml/CompanyMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/xml/CompanyMapper.xml deleted file mode 100644 index 7f7b532..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/xml/CompanyMapper.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - SELECT a.*,b.tenant_id,b.tenant_name,b.tenant_code - FROM sys_company a - LEFT JOIN sys_tenant b ON a.tenant_id = b.tenant_id - - - AND a.company_id = #{param.companyId} - - - AND a.short_name LIKE CONCAT('%', #{param.shortName}, '%') - - - AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%') - - - AND a.company_type = #{param.companyType} - - - AND a.company_logo LIKE CONCAT('%', #{param.companyLogo}, '%') - - - AND a.domain LIKE CONCAT('%', #{param.domain}, '%') - - - AND a.phone LIKE CONCAT('%', #{param.phone}, '%') - - - AND a.Invoice_header LIKE CONCAT('%', #{param.invoiceHeader}, '%') - - - AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%') - - - AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%') - - - AND a.version = #{param.version} - - - AND a.members = #{param.members} - - - AND a.industry_parent LIKE CONCAT('%', #{param.industryParent}, '%') - - - AND a.industry_child LIKE CONCAT('%', #{param.industryChild}, '%') - - - AND a.departments = #{param.departments} - - - AND a.country LIKE CONCAT('%', #{param.country}, '%') - - - AND a.province LIKE CONCAT('%', #{param.province}, '%') - - - AND a.city LIKE CONCAT('%', #{param.city}, '%') - - - AND a.region LIKE CONCAT('%', #{param.region}, '%') - - - AND a.address LIKE CONCAT('%', #{param.address}, '%') - - - AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%') - - - AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%') - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.authentication = #{param.authentication} - - - AND a.status = #{param.status} - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.company_name LIKE CONCAT('%', #{param.keywords}, '%') - OR a.tenant_id = #{param.keywords} - OR a.domain = #{param.keywords} - ) - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/xml/TenantMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/xml/TenantMapper.xml deleted file mode 100644 index a2e047d..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/mapper/xml/TenantMapper.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - SELECT a.*, - b.company_id, - b.company_name - FROM sys_tenant a - LEFT JOIN sys_company b ON a.tenant_id = b.tenant_id - - - AND a.tenant_id = #{param.tenantId} - - - AND a.tenant_name LIKE CONCAT('%', #{param.tenantName}, '%') - - - AND a.app_id = #{param.appId} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND b.company_name LIKE CONCAT('%', #{param.companyName}, '%') - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/param/CompanyParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/param/CompanyParam.java deleted file mode 100644 index 5fb9d6a..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/param/CompanyParam.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.gxwebsoft.common.system.param; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 企业信息查询参数 - * - * @author 科技小王子 - * @since 2023-05-27 14:57:34 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "CompanyParam对象", description = "企业信息查询参数") -public class CompanyParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "企业id") - @QueryField(type = QueryType.EQ) - private Integer companyId; - - @ApiModelProperty(value = "企业简称") - private String shortName; - - @ApiModelProperty(value = "企业全称") - private String companyName; - - @ApiModelProperty(value = "类型 10企业 20政府单位") - @QueryField(type = QueryType.EQ) - private Integer companyType; - - @ApiModelProperty(value = "应用标识") - private String companyLogo; - - @ApiModelProperty(value = "企业域名") - private String domain; - - @ApiModelProperty(value = "联系电话") - private String phone; - - @ApiModelProperty(value = "发票抬头") - private String invoiceHeader; - - @ApiModelProperty(value = "服务开始时间") - private String startTime; - - @ApiModelProperty(value = "服务到期时间") - private String expirationTime; - - @ApiModelProperty(value = "应用版本 10体验版 20授权版 30旗舰版") - @QueryField(type = QueryType.EQ) - private Integer version; - - @ApiModelProperty(value = "成员数量") - @QueryField(type = QueryType.EQ) - private Integer members; - - @ApiModelProperty(value = "行业类型(父级)") - private String industryParent; - - @ApiModelProperty(value = "行业类型(子级)") - private String industryChild; - - @ApiModelProperty(value = "部门数量") - @QueryField(type = QueryType.EQ) - private Integer departments; - - @ApiModelProperty(value = "所在国家") - private String country; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "街道地址") - private String address; - - @ApiModelProperty(value = "经度") - private String longitude; - - @ApiModelProperty(value = "纬度") - private String latitude; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "是否实名认证") - @QueryField(type = QueryType.EQ) - private Integer authentication; - - @ApiModelProperty(value = "状态") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - - @ApiModelProperty(value = "是否默认企业主体") - @QueryField(type = QueryType.EQ) - private Boolean authoritative; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/param/TenantParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/param/TenantParam.java deleted file mode 100644 index 500688b..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/param/TenantParam.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.gxwebsoft.common.system.param; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 租户查询参数 - * - * @author WebSoft - * @since 2022-11-17 17:13:39 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "TenantParam对象", description = "租户查询参数") -public class TenantParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("租户ID") - @TableId(value = "tenant_id", type = IdType.AUTO) - private Integer tenantId; - - @ApiModelProperty(value = "租户名称") - private String tenantName; - - @ApiModelProperty(value = "初始密码") - private String password; - - @ApiModelProperty(value = "应用ID") - private String appId; - - @ApiModelProperty(value = "应用密钥") - private String appSecret; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "客户ID") - @TableField(exist = false) - private Integer companyId; - - @ApiModelProperty(value = "创建人") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "状态") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - - @ApiModelProperty("客户名称") - @TableField(exist = false) - private String companyName; - - @ApiModelProperty("租户编号") - @TableField(exist = false) - private String tenantCode; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/CompanyService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/CompanyService.java deleted file mode 100644 index 023e8af..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/CompanyService.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.gxwebsoft.common.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.common.system.entity.Company; -import com.gxwebsoft.common.system.param.CompanyParam; - -import java.util.List; - -/** - * 企业信息Service - * - * @author 科技小王子 - * @since 2023-05-27 14:57:34 - */ -public interface CompanyService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(CompanyParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(CompanyParam param); - - /** - * 根据id查询 - * - * @param companyId 企业id - * @return Company - */ - Company getByIdRel(Integer companyId); - - Company getByTenantIdRel(Integer tenantId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/TenantService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/TenantService.java deleted file mode 100644 index 16987a5..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/TenantService.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.gxwebsoft.common.system.service; - - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.common.system.entity.Tenant; -import com.gxwebsoft.common.system.param.TenantParam; - -import java.util.List; - -/** - * 租户Service - * - * @author WebSoft - * @since 2022-11-17 17:13:39 - */ -public interface TenantService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(TenantParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(TenantParam param); - - Integer getByUserId(Integer userId); - - /** - * 根据id查询 - * - * @param tenantId 租户id - * @return Tenant - */ - Tenant getByIdRel(Integer tenantId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/impl/CompanyServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/impl/CompanyServiceImpl.java deleted file mode 100644 index 8c8eb93..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/impl/CompanyServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.gxwebsoft.common.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.common.core.web.PageParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.common.system.entity.Company; -import com.gxwebsoft.common.system.mapper.CompanyMapper; -import com.gxwebsoft.common.system.param.CompanyParam; -import com.gxwebsoft.common.system.service.CompanyService; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 企业信息Service实现 - * - * @author 科技小王子 - * @since 2023-05-27 14:57:34 - */ -@Service -public class CompanyServiceImpl extends ServiceImpl implements CompanyService { - - @Override - public PageResult pageRel(CompanyParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(CompanyParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public Company getByIdRel(Integer companyId) { - CompanyParam param = new CompanyParam(); - param.setCompanyId(companyId); - return param.getOne(baseMapper.selectListRel(param)); - } - - @Override - public Company getByTenantIdRel(Integer tenantId) { - CompanyParam param = new CompanyParam(); - final Company one = param.getOne(baseMapper.selectListRel(param)); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/impl/TenantServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/impl/TenantServiceImpl.java deleted file mode 100644 index 4694018..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/common/system/service/impl/TenantServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.gxwebsoft.common.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.common.core.web.PageParam; -import com.gxwebsoft.common.core.web.PageResult; - -import com.gxwebsoft.common.system.entity.Tenant; -import com.gxwebsoft.common.system.mapper.TenantMapper; -import com.gxwebsoft.common.system.param.TenantParam; -import com.gxwebsoft.common.system.service.TenantService; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 租户Service实现 - * - * @author WebSoft - * @since 2022-11-17 17:13:39 - */ -@Service -public class TenantServiceImpl extends ServiceImpl implements TenantService { - - @Override - public PageResult pageRel(TenantParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(TenantParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public Integer getByUserId(Integer userId) { - Tenant tenant = query().eq("user_id", userId).one(); - return tenant.getTenantId(); - } - - @Override - public Tenant getByIdRel(Integer tenantId) { - TenantParam param = new TenantParam(); - param.setTenantId(tenantId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanController.java deleted file mode 100644 index 4f1df71..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.gxwebsoft.love.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.love.service.UserPlanService; -import com.gxwebsoft.love.entity.UserPlan; -import com.gxwebsoft.love.param.UserPlanParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 会员套餐管理表控制器 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Api(tags = "会员套餐管理表管理") -@RestController -@RequestMapping("/api/love/user-plan") -public class UserPlanController extends BaseController { - @Resource - private UserPlanService userPlanService; - - @PreAuthorize("hasAuthority('love:userPlan:list')") - @OperationLog - @ApiOperation("分页查询会员套餐管理表") - @GetMapping("/page") - public ApiResult> page(UserPlanParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanService.page(page, page.getWrapper())); - // 使用关联查询 - //return success(userPlanService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlan:list')") - @OperationLog - @ApiOperation("查询全部会员套餐管理表") - @GetMapping() - public ApiResult> list(UserPlanParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanService.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(userPlanService.listRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlan:list')") - @OperationLog - @ApiOperation("根据id查询会员套餐管理表") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - return success(userPlanService.getById(id)); - // 使用关联查询 - //return success(userPlanService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('love:userPlan:save')") - @OperationLog - @ApiOperation("添加会员套餐管理表") - @PostMapping() - public ApiResult save(@RequestBody UserPlan userPlan) { - if (userPlanService.save(userPlan)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlan:update')") - @OperationLog - @ApiOperation("修改会员套餐管理表") - @PutMapping() - public ApiResult update(@RequestBody UserPlan userPlan) { - if (userPlanService.updateById(userPlan)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlan:remove')") - @OperationLog - @ApiOperation("删除会员套餐管理表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (userPlanService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('love:userPlan:save')") - @OperationLog - @ApiOperation("批量添加会员套餐管理表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (userPlanService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlan:update')") - @OperationLog - @ApiOperation("批量修改会员套餐管理表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(userPlanService, "plan_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlan:remove')") - @OperationLog - @ApiOperation("批量删除会员套餐管理表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (userPlanService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanEquityController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanEquityController.java deleted file mode 100644 index c342f07..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanEquityController.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.gxwebsoft.love.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.love.service.UserPlanEquityService; -import com.gxwebsoft.love.entity.UserPlanEquity; -import com.gxwebsoft.love.param.UserPlanEquityParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 会员套餐管理表控制器 - * - * @author 科技小王子 - * @since 2023-06-23 12:02:58 - */ -@Api(tags = "会员套餐管理表管理") -@RestController -@RequestMapping("/api/love/user-plan-equity") -public class UserPlanEquityController extends BaseController { - @Resource - private UserPlanEquityService userPlanEquityService; - - @PreAuthorize("hasAuthority('love:userPlanEquity:list')") - @OperationLog - @ApiOperation("分页查询会员套餐管理表") - @GetMapping("/page") - public ApiResult> page(UserPlanEquityParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanEquityService.page(page, page.getWrapper())); - // 使用关联查询 - //return success(userPlanEquityService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:list')") - @OperationLog - @ApiOperation("查询全部会员套餐管理表") - @GetMapping() - public ApiResult> list(UserPlanEquityParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanEquityService.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(userPlanEquityService.listRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:list')") - @OperationLog - @ApiOperation("根据id查询会员套餐管理表") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - return success(userPlanEquityService.getById(id)); - // 使用关联查询 - //return success(userPlanEquityService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:save')") - @OperationLog - @ApiOperation("添加会员套餐管理表") - @PostMapping() - public ApiResult save(@RequestBody UserPlanEquity userPlanEquity) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - userPlanEquity.setUserId(loginUser.getUserId()); - } - if (userPlanEquityService.save(userPlanEquity)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:update')") - @OperationLog - @ApiOperation("修改会员套餐管理表") - @PutMapping() - public ApiResult update(@RequestBody UserPlanEquity userPlanEquity) { - if (userPlanEquityService.updateById(userPlanEquity)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:remove')") - @OperationLog - @ApiOperation("删除会员套餐管理表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (userPlanEquityService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:save')") - @OperationLog - @ApiOperation("批量添加会员套餐管理表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (userPlanEquityService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:update')") - @OperationLog - @ApiOperation("批量修改会员套餐管理表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(userPlanEquityService, "plan_equity_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanEquity:remove')") - @OperationLog - @ApiOperation("批量删除会员套餐管理表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (userPlanEquityService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanLogController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanLogController.java deleted file mode 100644 index 916adf8..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanLogController.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.gxwebsoft.love.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.love.service.UserPlanLogService; -import com.gxwebsoft.love.entity.UserPlanLog; -import com.gxwebsoft.love.param.UserPlanLogParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 会员特权购买记录表控制器 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Api(tags = "会员特权购买记录表管理") -@RestController -@RequestMapping("/api/love/user-plan-log") -public class UserPlanLogController extends BaseController { - @Resource - private UserPlanLogService userPlanLogService; - - @PreAuthorize("hasAuthority('love:userPlanLog:list')") - @OperationLog - @ApiOperation("分页查询会员特权购买记录表") - @GetMapping("/page") - public ApiResult> page(UserPlanLogParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanLogService.page(page, page.getWrapper())); - // 使用关联查询 - //return success(userPlanLogService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:list')") - @OperationLog - @ApiOperation("查询全部会员特权购买记录表") - @GetMapping() - public ApiResult> list(UserPlanLogParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanLogService.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(userPlanLogService.listRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:list')") - @OperationLog - @ApiOperation("根据id查询会员特权购买记录表") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - return success(userPlanLogService.getById(id)); - // 使用关联查询 - //return success(userPlanLogService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:save')") - @OperationLog - @ApiOperation("添加会员特权购买记录表") - @PostMapping() - public ApiResult save(@RequestBody UserPlanLog userPlanLog) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - userPlanLog.setUserId(loginUser.getUserId()); - } - if (userPlanLogService.save(userPlanLog)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:update')") - @OperationLog - @ApiOperation("修改会员特权购买记录表") - @PutMapping() - public ApiResult update(@RequestBody UserPlanLog userPlanLog) { - if (userPlanLogService.updateById(userPlanLog)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:remove')") - @OperationLog - @ApiOperation("删除会员特权购买记录表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (userPlanLogService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:save')") - @OperationLog - @ApiOperation("批量添加会员特权购买记录表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (userPlanLogService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:update')") - @OperationLog - @ApiOperation("批量修改会员特权购买记录表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(userPlanLogService, "log_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanLog:remove')") - @OperationLog - @ApiOperation("批量删除会员特权购买记录表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (userPlanLogService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanPriceController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanPriceController.java deleted file mode 100644 index aa9f153..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserPlanPriceController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.gxwebsoft.love.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.love.service.UserPlanPriceService; -import com.gxwebsoft.love.entity.UserPlanPrice; -import com.gxwebsoft.love.param.UserPlanPriceParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 会员套餐定价表控制器 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Api(tags = "会员套餐定价表管理") -@RestController -@RequestMapping("/api/love/user-plan-price") -public class UserPlanPriceController extends BaseController { - @Resource - private UserPlanPriceService userPlanPriceService; - - @PreAuthorize("hasAuthority('love:userPlanPrice:list')") - @OperationLog - @ApiOperation("分页查询会员套餐定价表") - @GetMapping("/page") - public ApiResult> page(UserPlanPriceParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanPriceService.page(page, page.getWrapper())); - // 使用关联查询 - //return success(userPlanPriceService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:list')") - @OperationLog - @ApiOperation("查询全部会员套餐定价表") - @GetMapping() - public ApiResult> list(UserPlanPriceParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(userPlanPriceService.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(userPlanPriceService.listRel(param)); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:list')") - @OperationLog - @ApiOperation("根据id查询会员套餐定价表") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - return success(userPlanPriceService.getById(id)); - // 使用关联查询 - //return success(userPlanPriceService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:save')") - @OperationLog - @ApiOperation("添加会员套餐定价表") - @PostMapping() - public ApiResult save(@RequestBody UserPlanPrice userPlanPrice) { - if (userPlanPriceService.save(userPlanPrice)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:update')") - @OperationLog - @ApiOperation("修改会员套餐定价表") - @PutMapping() - public ApiResult update(@RequestBody UserPlanPrice userPlanPrice) { - if (userPlanPriceService.updateById(userPlanPrice)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:remove')") - @OperationLog - @ApiOperation("删除会员套餐定价表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (userPlanPriceService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:save')") - @OperationLog - @ApiOperation("批量添加会员套餐定价表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (userPlanPriceService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:update')") - @OperationLog - @ApiOperation("批量修改会员套餐定价表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(userPlanPriceService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userPlanPrice:remove')") - @OperationLog - @ApiOperation("批量删除会员套餐定价表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (userPlanPriceService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserProfileController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserProfileController.java deleted file mode 100644 index 27c6508..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/controller/UserProfileController.java +++ /dev/null @@ -1,187 +0,0 @@ -package com.gxwebsoft.love.controller; - -import com.gxwebsoft.common.core.annotation.OperationLog; -import com.gxwebsoft.common.core.web.ApiResult; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.core.web.BatchParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.common.system.service.UserService; -import com.gxwebsoft.love.entity.UserProfile; -import com.gxwebsoft.love.param.UserProfileParam; -import com.gxwebsoft.love.service.UserProfileService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 会员资料表控制器 - * - * @author 科技小王子 - * @since 2023-06-09 21:42:26 - */ -@Api(tags = "会员资料表管理") -@RestController -@RequestMapping("/api/love/user-profile") -public class UserProfileController extends BaseController { - @Resource - private UserProfileService userProfileService; - @Resource - private UserService userService; - - - @PreAuthorize("hasAuthority('love:userProfile:list')") - @ApiOperation("分页查询会员资料表") - @GetMapping("/page") - public ApiResult> page(UserProfileParam param) { - // 搜素条件 - if(param.getScene() != null){ - // 推荐recommend - if (param.getScene().equals("recommend")) { - param.setRecommend(true); - } - // 同城intraCity - if (param.getScene().equals("intraCity")) { - - } - // 关注focus - if (param.getScene().equals("focus")) { - - } - } - // 使用关联查询 - final PageResult result = userProfileService.pageRel(param); - // 附加用户基本信息 - result.getList().forEach(d -> { - d.setUserInfo(userService.getById(d.getUserId())); - }); - System.out.println("result = " + result); - return success(result); - } - - @PreAuthorize("hasAuthority('love:userProfile:list')") - @OperationLog - @ApiOperation("查询全部会员资料表") - @GetMapping() - public ApiResult> list(UserProfileParam param) { - // 使用关联查询 - return success(userProfileService.listRel(param)); - } - - @PreAuthorize("hasAuthority('sys:auth:user')") - @OperationLog - @ApiOperation("根据会员id查询详细资料") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - final User loginUser = getLoginUser(); - final UserProfileParam userProfileParam = new UserProfileParam(); - userProfileParam.setUserId(loginUser.getUserId()); - final List list = userProfileService.listRel(userProfileParam); - if (list.isEmpty()) { - final UserProfile profile = new UserProfile(); - profile.setUserId(loginUser.getUserId()); - profile.setImages("[]"); - userProfileService.save(profile); - profile.setUserInfo(loginUser); - return fail("添加成功",profile); - } - final UserProfile userProfile = list.get(0); - userProfile.setUserInfo(getLoginUser()); - return success(userProfile); - } - - @PreAuthorize("hasAuthority('sys:user:update')") - @OperationLog - @ApiOperation("添加会员资料表") - @PostMapping() - public ApiResult save(@RequestBody UserProfile userProfile) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - userProfile.setUserId(loginUser.getUserId()); - } - if (userProfileService.save(userProfile)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('sys:user:update')") - @OperationLog - @ApiOperation("修改会员资料表") - @PutMapping() - public ApiResult update(@RequestBody UserProfile userProfile) { - if (userProfileService.updateById(userProfile)) { - userService.updateById(userProfile.getUserInfo()); - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userProfile:remove')") - @OperationLog - @ApiOperation("删除会员资料表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (userProfileService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('love:userProfile:save')") - @OperationLog - @ApiOperation("批量添加会员资料表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (userProfileService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('love:userProfile:update')") - @OperationLog - @ApiOperation("批量修改会员资料表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(userProfileService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('love:userProfile:remove')") - @OperationLog - @ApiOperation("批量删除会员资料表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (userProfileService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('love:userProfile:list')") - @OperationLog - @ApiOperation("根据会员id查询详细资料") - @GetMapping("/detail/{id}") - public ApiResult detail(@PathVariable("id") Integer id) { - final UserProfileParam param = new UserProfileParam(); - param.setUserId(id); - final List userProfiles = userProfileService.listRel(param); - if (userProfiles != null) { - final UserProfile profile = userProfiles.get(0); - profile.setUserInfo(userService.getById(profile.getUserId())); - return success(profile); - } - return fail("用户不存在",null); - } - - - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlan.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlan.java deleted file mode 100644 index 1ef285d..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlan.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.gxwebsoft.love.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -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 java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 会员套餐管理表 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "UserPlan对象", description = "会员套餐管理表") -@TableName("love_user_plan") -public class UserPlan implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "套餐ID") - @TableId(value = "plan_id", type = IdType.AUTO) - private Integer planId; - - @ApiModelProperty(value = "套餐名称") - private String name; - - @ApiModelProperty(value = "套餐卖点") - private String subName; - - @ApiModelProperty(value = "获得的会员身份") - private Integer roleId; - - @ApiModelProperty(value = "图标") - private String icon; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanEquity.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanEquity.java deleted file mode 100644 index da7437d..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanEquity.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.gxwebsoft.love.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import java.time.LocalDateTime; -import java.io.Serializable; -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 会员套餐管理表 - * - * @author 科技小王子 - * @since 2023-06-23 12:02:58 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "UserPlanEquity对象", description = "会员套餐管理表") -@TableName("love_user_plan_equity") -public class UserPlanEquity implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "权益ID") - @TableId(value = "plan_equity_id", type = IdType.AUTO) - private Integer planEquityId; - - @ApiModelProperty(value = "套餐ID") - private Integer planId; - - @ApiModelProperty(value = "类型 0单身 1婚介 2线下") - private Integer type; - - @ApiModelProperty(value = "套餐名称") - private String planName; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "真实姓名") - private String realName; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在地区") - private String region; - - @ApiModelProperty(value = "所在区域") - private String area; - - @ApiModelProperty(value = "门店地址") - private String address; - - @ApiModelProperty(value = "门店ID") - private Integer merchantId; - - @ApiModelProperty(value = "到期时间") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date expirationTime; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanLog.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanLog.java deleted file mode 100644 index 0c614c0..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanLog.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.gxwebsoft.love.entity; - -import java.math.BigDecimal; - -import com.baomidou.mybatisplus.annotation.*; - -import java.time.LocalDateTime; -import java.io.Serializable; -import java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 会员特权购买记录表 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "UserPlanLog对象", description = "会员特权购买记录表") -@TableName("love_user_plan_log") -public class UserPlanLog implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "ID") - @TableId(value = "log_id", type = IdType.AUTO) - private Integer logId; - - @ApiModelProperty(value = "订单号") - private String logNo; - - @ApiModelProperty(value = "类型 0单身 1婚介 2线下") - private Integer type; - - @ApiModelProperty(value = "付款金额") - private BigDecimal money; - - @ApiModelProperty(value = "实际付款金额(包含运费)") - private BigDecimal payPrice; - - @ApiModelProperty(value = "套餐ID") - private Integer planId; - - @ApiModelProperty(value = "卡ID") - private Integer priceId; - - @ApiModelProperty(value = "卡名称") - private String priceName; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "真实姓名") - private String realName; - - @ApiModelProperty(value = "手机号码") - private String phone; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在地区") - private String region; - - @ApiModelProperty(value = "所在区域") - private String area; - - @ApiModelProperty(value = "门店地址") - private String address; - - @ApiModelProperty(value = "门店ID") - private Integer merchantId; - - @ApiModelProperty(value = "所属门店") - private String merchantName; - - @ApiModelProperty(value = "所属门店") - private String merchantCode; - - @ApiModelProperty(value = "付款时间") - private Date payTime; - - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") - private Integer payStatus; - - @ApiModelProperty(value = "到期时间") - private Date expirationTime; - - @ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)") - private Integer isSettled; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - - @ApiModelProperty(value = "套餐名称") - @TableField(exist = false) - private String planName; - - @ApiModelProperty(value = "角色ID") - @TableField(exist = false) - private Integer roleId; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanPrice.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanPrice.java deleted file mode 100644 index 33494c7..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserPlanPrice.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.gxwebsoft.love.entity; - -import java.math.BigDecimal; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import java.time.LocalDateTime; -import java.io.Serializable; -import java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 会员套餐定价表 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "UserPlanPrice对象", description = "会员套餐定价表") -@TableName("love_user_plan_price") -public class UserPlanPrice implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "ID") - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "套餐ID") - private Integer planId; - - @ApiModelProperty(value = "项目名称") - private String name; - - @ApiModelProperty(value = "价格") - private BigDecimal price; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserProfile.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserProfile.java deleted file mode 100644 index d57c466..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/entity/UserProfile.java +++ /dev/null @@ -1,166 +0,0 @@ -package com.gxwebsoft.love.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.gxwebsoft.common.system.entity.User; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.util.Date; - -/** - * 会员资料表 - * - * @author 科技小王子 - * @since 2023-06-09 21:42:26 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "UserProfile对象", description = "会员资料表") -@TableName("love_user_profile") -public class UserProfile implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "兴趣爱好") - private String interest; - - @ApiModelProperty(value = "身高") - private String height; - - @ApiModelProperty(value = "月收入") - private String monthlyPay; - - @ApiModelProperty(value = "学历") - private String education; - - @ApiModelProperty(value = "职业") - private String vocation; - - @ApiModelProperty(value = "婚姻状况") - private String maritalStatus; - - @ApiModelProperty(value = "有无小孩") - private String hasChildren; - - @ApiModelProperty(value = "是否要小孩") - private String haveChild; - - @ApiModelProperty(value = "职业") - private String position; - - @ApiModelProperty(value = "体重") - private String weight; - - @ApiModelProperty(value = "是否有房有车") - private String hasCar; - - @ApiModelProperty(value = "何时想结婚") - private String whenMarried; - - @ApiModelProperty(value = "择偶条件-年龄") - private String ageMate; - - @ApiModelProperty(value = "择偶条件-身高") - private String heightMate; - - @ApiModelProperty(value = "择偶条件-月收入") - private String monthlyPayMate; - - @ApiModelProperty(value = "所在国家") - private String country; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "所在地区") - private String area; - - @ApiModelProperty(value = "择偶条件-所在省份") - private String provinceMate; - - @ApiModelProperty(value = "择偶条件-所在城市") - private String cityMate; - - @ApiModelProperty(value = "择偶条件-所在辖区") - private String regionMate; - - @ApiModelProperty(value = "择偶条件-地区") - private String areaMate; - - @ApiModelProperty(value = "择偶条件-学历") - private String educationMate; - - @ApiModelProperty(value = "择偶条件-婚姻状况") - private String maritalStatusMate; - - @ApiModelProperty(value = "择偶条件-有无小孩") - private String hasChildrenMate; - - @ApiModelProperty(value = "择偶条件-是否要小孩") - private String haveChildMate; - - @ApiModelProperty(value = "择偶条件-职业") - private String vocationMate; - - @ApiModelProperty(value = "择偶条件-体重") - private String weightMate; - - @ApiModelProperty(value = "择偶条件-体型") - private String shapeMate; - - @ApiModelProperty(value = "择偶条件-是否吸烟") - private String isSmokingMate; - - @ApiModelProperty(value = "择偶条件-是否喝酒") - private String isDrinkMate; - - @ApiModelProperty(value = "择偶条件-是否有车") - private String hasCarMate; - - @ApiModelProperty(value = "择偶条件-是否有房") - private String hasHouseMate; - - @ApiModelProperty(value = "择偶条件-何时想结婚") - private String whenMarriedMate; - - @ApiModelProperty(value = "是否推荐") - private Boolean recommend; - - @ApiModelProperty(value = "图片附件") - private String images; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - - @ApiModelProperty(value = "用户信息") - @TableField(exist = false) - private User userInfo; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanEquityMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanEquityMapper.java deleted file mode 100644 index 0c99484..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanEquityMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.love.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.love.entity.UserPlanEquity; -import com.gxwebsoft.love.param.UserPlanEquityParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 会员套餐管理表Mapper - * - * @author 科技小王子 - * @since 2023-06-23 12:02:58 - */ -public interface UserPlanEquityMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") UserPlanEquityParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") UserPlanEquityParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanLogMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanLogMapper.java deleted file mode 100644 index c1f99ec..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanLogMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.love.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.love.entity.UserPlanLog; -import com.gxwebsoft.love.param.UserPlanLogParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 会员特权购买记录表Mapper - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -public interface UserPlanLogMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") UserPlanLogParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") UserPlanLogParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanMapper.java deleted file mode 100644 index 58dcc94..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.love.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.love.entity.UserPlan; -import com.gxwebsoft.love.param.UserPlanParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 会员套餐管理表Mapper - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -public interface UserPlanMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") UserPlanParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") UserPlanParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanPriceMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanPriceMapper.java deleted file mode 100644 index e937420..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserPlanPriceMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.love.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.love.entity.UserPlanPrice; -import com.gxwebsoft.love.param.UserPlanPriceParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 会员套餐定价表Mapper - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -public interface UserPlanPriceMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") UserPlanPriceParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") UserPlanPriceParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserProfileMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserProfileMapper.java deleted file mode 100644 index cb94139..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/UserProfileMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.love.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.love.entity.UserProfile; -import com.gxwebsoft.love.param.UserProfileParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 会员资料表Mapper - * - * @author 科技小王子 - * @since 2023-06-09 21:42:26 - */ -public interface UserProfileMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") UserProfileParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") UserProfileParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanEquityMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanEquityMapper.xml deleted file mode 100644 index 8024fb8..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanEquityMapper.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - SELECT a.* - FROM love_user_plan_equity a - - - AND a.plan_equity_id = #{param.planEquityId} - - - AND a.plan_id = #{param.planId} - - - AND a.plan_name LIKE CONCAT('%', #{param.planName}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%') - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanLogMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanLogMapper.xml deleted file mode 100644 index 655b496..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanLogMapper.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - SELECT a.*,b.name as planName,b.role_id - FROM love_user_plan_log a - LEFT JOIN love_user_plan b ON a.plan_id = b.plan_id - - - AND a.log_id = #{param.logId} - - - AND a.log_no LIKE CONCAT('%', #{param.logNo}, '%') - - - AND a.money = #{param.money} - - - AND a.pay_price = #{param.payPrice} - - - AND a.plan_id = #{param.planId} - - - AND a.price_id = #{param.priceId} - - - AND a.price_name LIKE CONCAT('%', #{param.priceName}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%') - - - AND a.pay_status = #{param.payStatus} - - - AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%') - - - AND a.is_settled = #{param.isSettled} - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanMapper.xml deleted file mode 100644 index 9eafd96..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanMapper.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - SELECT a.* - FROM love_user_plan a - - - AND a.plan_id = #{param.planId} - - - AND a.name LIKE CONCAT('%', #{param.name}, '%') - - - AND a.sub_name LIKE CONCAT('%', #{param.subName}, '%') - - - AND a.role_id = #{param.roleId} - - - AND a.icon LIKE CONCAT('%', #{param.icon}, '%') - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanPriceMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanPriceMapper.xml deleted file mode 100644 index 5d05592..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserPlanPriceMapper.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - SELECT a.* - FROM love_user_plan_price a - - - AND a.id = #{param.id} - - - AND a.plan_id = #{param.planId} - - - AND a.name LIKE CONCAT('%', #{param.name}, '%') - - - AND a.price = #{param.price} - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserProfileMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserProfileMapper.xml deleted file mode 100644 index 6f9d104..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/mapper/xml/UserProfileMapper.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - SELECT a.*,b.nickname - FROM love_user_profile a - LEFT JOIN sys_user b ON a.user_id = b.user_id - - - AND a.id = #{param.id} - - - AND a.interest LIKE CONCAT('%', #{param.interest}, '%') - - - AND a.height LIKE CONCAT('%', #{param.height}, '%') - - - AND a.monthly_pay LIKE CONCAT('%', #{param.monthlyPay}, '%') - - - AND a.education LIKE CONCAT('%', #{param.education}, '%') - - - AND a.vocation LIKE CONCAT('%', #{param.vocation}, '%') - - - AND a.marital_status LIKE CONCAT('%', #{param.maritalStatus}, '%') - - - AND a.has_children LIKE CONCAT('%', #{param.hasChildren}, '%') - - - AND a.have_child LIKE CONCAT('%', #{param.haveChild}, '%') - - - AND a.position LIKE CONCAT('%', #{param.position}, '%') - - - AND a.weight LIKE CONCAT('%', #{param.weight}, '%') - - - AND a.has_car LIKE CONCAT('%', #{param.hasCar}, '%') - - - AND a.when_married LIKE CONCAT('%', #{param.whenMarried}, '%') - - - AND a.age_mate LIKE CONCAT('%', #{param.ageMate}, '%') - - - AND a.height_mate LIKE CONCAT('%', #{param.heightMate}, '%') - - - AND a.monthly_pay_mate LIKE CONCAT('%', #{param.monthlyPayMate}, '%') - - - AND a.region_mate LIKE CONCAT('%', #{param.regionMate}, '%') - - - AND a.country LIKE CONCAT('%', #{param.country}, '%') - - - AND a.province LIKE CONCAT('%', #{param.province}, '%') - - - AND a.city LIKE CONCAT('%', #{param.city}, '%') - - - AND a.region LIKE CONCAT('%', #{param.region}, '%') - - - AND a.area LIKE CONCAT('%', #{param.area}, '%') - - - AND a.province_mate LIKE CONCAT('%', #{param.provinceMate}, '%') - - - AND a.city_mate LIKE CONCAT('%', #{param.cityMate}, '%') - - - AND a.region_mate LIKE CONCAT('%', #{param.regionMate}, '%') - - - AND a.area_mate LIKE CONCAT('%', #{param.areaMate}, '%') - - - AND a.education_mate LIKE CONCAT('%', #{param.educationMate}, '%') - - - AND a.marital_status_mate LIKE CONCAT('%', #{param.maritalStatusMate}, '%') - - - AND a.has_children_mate LIKE CONCAT('%', #{param.hasChildrenMate}, '%') - - - AND a.have_child_mate LIKE CONCAT('%', #{param.haveChildMate}, '%') - - - AND a.vocation_mate LIKE CONCAT('%', #{param.vocationMate}, '%') - - - AND a.weight_mate LIKE CONCAT('%', #{param.weightMate}, '%') - - - AND a.shape_mate LIKE CONCAT('%', #{param.shapeMate}, '%') - - - AND a.is_smoking_mate LIKE CONCAT('%', #{param.isSmokingMate}, '%') - - - AND a.is_drink_mate LIKE CONCAT('%', #{param.isDrinkMate}, '%') - - - AND a.has_car_mate LIKE CONCAT('%', #{param.hasCarMate}, '%') - - - AND a.has_house_mate LIKE CONCAT('%', #{param.hasHouseMate}, '%') - - - AND a.when_married_mate LIKE CONCAT('%', #{param.whenMarriedMate}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND a.recommend = 1 - - - AND ( - b.nickname LIKE CONCAT('%', #{param.keywords}, '%') - OR a.age_mate = #{param.keywords} - OR a.user_id = #{param.keywords} - ) - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/ChatConversationParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/ChatConversationParam.java deleted file mode 100644 index a96d173..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/ChatConversationParam.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.gxwebsoft.love.param; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 聊天消息表查询参数 - * - * @author 科技小王子 - * @since 2023-06-15 21:26:48 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "ChatConversationParam对象", description = "聊天消息表查询参数") -public class ChatConversationParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @QueryField(type = QueryType.EQ) - private Integer id; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "好友ID") - @QueryField(type = QueryType.EQ) - private Integer friendId; - - @ApiModelProperty(value = "消息类型") - @QueryField(type = QueryType.EQ) - private Integer type; - - @ApiModelProperty(value = "消息内容") - private String content; - - @ApiModelProperty(value = "状态, 0未读, 1已读") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/ChatMessageParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/ChatMessageParam.java deleted file mode 100644 index 4802343..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/ChatMessageParam.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.gxwebsoft.love.param; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 聊天消息表查询参数 - * - * @author 科技小王子 - * @since 2023-06-10 18:27:25 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "ChatMessageParam对象", description = "聊天消息表查询参数") -public class ChatMessageParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @QueryField(type = QueryType.EQ) - private Integer id; - - @ApiModelProperty(value = "发送用户ID") - @QueryField(type = QueryType.EQ) - private Integer formUserId; - - @ApiModelProperty(value = "接受用户ID") - @QueryField(type = QueryType.EQ) - private Integer toUserId; - - @ApiModelProperty(value = "消息类型") - @QueryField(type = QueryType.EQ) - private String type; - - @ApiModelProperty(value = "消息内容") - private String content; - - @ApiModelProperty(value = "状态, 0在线, 1离线") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanEquityParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanEquityParam.java deleted file mode 100644 index a64b831..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanEquityParam.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.gxwebsoft.love.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 会员套餐管理表查询参数 - * - * @author 科技小王子 - * @since 2023-06-23 12:02:58 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "UserPlanEquityParam对象", description = "会员套餐管理表查询参数") -public class UserPlanEquityParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "权益ID") - @QueryField(type = QueryType.EQ) - private Integer planEquityId; - - @ApiModelProperty(value = "套餐ID") - @QueryField(type = QueryType.EQ) - private Integer planId; - - @ApiModelProperty(value = "套餐名称") - private String planName; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "租户id") - @QueryField(type = QueryType.EQ) - private Integer tenantId; - - @ApiModelProperty(value = "到期时间") - private String expirationTime; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanLogParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanLogParam.java deleted file mode 100644 index b1c37ba..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanLogParam.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.gxwebsoft.love.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 会员特权购买记录表查询参数 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "UserPlanLogParam对象", description = "会员特权购买记录表查询参数") -public class UserPlanLogParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "ID") - @QueryField(type = QueryType.EQ) - private Integer logId; - - @ApiModelProperty(value = "订单号") - private String logNo; - - @ApiModelProperty(value = "付款金额") - @QueryField(type = QueryType.EQ) - private BigDecimal money; - - @ApiModelProperty(value = "实际付款金额(包含运费)") - @QueryField(type = QueryType.EQ) - private BigDecimal payPrice; - - @ApiModelProperty(value = "套餐ID") - @QueryField(type = QueryType.EQ) - private Integer planId; - - @ApiModelProperty(value = "卡ID") - @QueryField(type = QueryType.EQ) - private Integer priceId; - - @ApiModelProperty(value = "卡名称") - private String priceName; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "付款时间") - private String payTime; - - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") - @QueryField(type = QueryType.EQ) - private Integer payStatus; - - @ApiModelProperty(value = "到期时间") - private String expirationTime; - - @ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)") - @QueryField(type = QueryType.EQ) - private Integer isSettled; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanParam.java deleted file mode 100644 index 536a9e2..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanParam.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.gxwebsoft.love.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 会员套餐管理表查询参数 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "UserPlanParam对象", description = "会员套餐管理表查询参数") -public class UserPlanParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "套餐ID") - @QueryField(type = QueryType.EQ) - private Integer planId; - - @ApiModelProperty(value = "套餐名称") - private String name; - - @ApiModelProperty(value = "套餐卖点") - private String subName; - - @ApiModelProperty(value = "获得的会员身份") - @QueryField(type = QueryType.EQ) - private Integer roleId; - - @ApiModelProperty(value = "图标") - private String icon; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanPriceParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanPriceParam.java deleted file mode 100644 index c15b82b..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserPlanPriceParam.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.gxwebsoft.love.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 会员套餐定价表查询参数 - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "UserPlanPriceParam对象", description = "会员套餐定价表查询参数") -public class UserPlanPriceParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "ID") - @QueryField(type = QueryType.EQ) - private Integer id; - - @ApiModelProperty(value = "套餐ID") - @QueryField(type = QueryType.EQ) - private Integer planId; - - @ApiModelProperty(value = "项目名称") - private String name; - - @ApiModelProperty(value = "价格") - @QueryField(type = QueryType.EQ) - private BigDecimal price; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserProfileParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserProfileParam.java deleted file mode 100644 index c295f33..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/param/UserProfileParam.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.gxwebsoft.love.param; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 会员资料表查询参数 - * - * @author 科技小王子 - * @since 2023-06-09 21:42:26 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "UserProfileParam对象", description = "会员资料表查询参数") -public class UserProfileParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @QueryField(type = QueryType.EQ) - private Integer id; - - @ApiModelProperty(value = "兴趣爱好") - private String interest; - - @ApiModelProperty(value = "身高") - private String height; - - @ApiModelProperty(value = "月收入") - private String monthlyPay; - - @ApiModelProperty(value = "学历") - private String education; - - @ApiModelProperty(value = "职业") - private String vocation; - - @ApiModelProperty(value = "婚姻状况") - private String maritalStatus; - - @ApiModelProperty(value = "有无小孩") - private String hasChildren; - - @ApiModelProperty(value = "是否要小孩") - private String haveChild; - - @ApiModelProperty(value = "职业") - private String position; - - @ApiModelProperty(value = "体重") - private String weight; - - @ApiModelProperty(value = "是否有房有车") - private String hasCar; - - @ApiModelProperty(value = "何时想结婚") - private String whenMarried; - - @ApiModelProperty(value = "择偶条件-年龄") - private String ageMate; - - @ApiModelProperty(value = "择偶条件-身高") - private String heightMate; - - @ApiModelProperty(value = "择偶条件-月收入") - private String monthlyPayMate; - - @ApiModelProperty(value = "所在国家") - private String country; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "所在地区") - private String area; - - @ApiModelProperty(value = "择偶条件-所在省份") - private String provinceMate; - - @ApiModelProperty(value = "择偶条件-所在城市") - private String cityMate; - - @ApiModelProperty(value = "择偶条件-所在辖区") - private String regionMate; - - @ApiModelProperty(value = "择偶条件-地区") - private String areaMate; - - @ApiModelProperty(value = "择偶条件-学历") - private String educationMate; - - @ApiModelProperty(value = "择偶条件-婚姻状况") - private String maritalStatusMate; - - @ApiModelProperty(value = "择偶条件-有无小孩") - private String hasChildrenMate; - - @ApiModelProperty(value = "择偶条件-是否要小孩") - private String haveChildMate; - - @ApiModelProperty(value = "择偶条件-职业") - private String vocationMate; - - @ApiModelProperty(value = "择偶条件-体重") - private String weightMate; - - @ApiModelProperty(value = "择偶条件-体型") - private String shapeMate; - - @ApiModelProperty(value = "择偶条件-是否吸烟") - private String isSmokingMate; - - @ApiModelProperty(value = "择偶条件-是否喝酒") - private String isDrinkMate; - - @ApiModelProperty(value = "择偶条件-是否有车") - private String hasCarMate; - - @ApiModelProperty(value = "择偶条件-是否有房") - private String hasHouseMate; - - @ApiModelProperty(value = "择偶条件-何时想结婚") - private String whenMarriedMate; - - @ApiModelProperty(value = "是否推荐") - @QueryField(type = QueryType.EQ) - private Boolean recommend; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "场景") - @TableField(exist = false) - private String scene; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanEquityService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanEquityService.java deleted file mode 100644 index 88a4cef..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanEquityService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.love.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.love.entity.UserPlanEquity; -import com.gxwebsoft.love.param.UserPlanEquityParam; - -import java.util.List; - -/** - * 会员套餐管理表Service - * - * @author 科技小王子 - * @since 2023-06-23 12:02:58 - */ -public interface UserPlanEquityService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(UserPlanEquityParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(UserPlanEquityParam param); - - /** - * 根据id查询 - * - * @param planEquityId 权益ID - * @return UserPlanEquity - */ - UserPlanEquity getByIdRel(Integer planEquityId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanLogService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanLogService.java deleted file mode 100644 index e8c952a..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanLogService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.love.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.love.entity.UserPlanLog; -import com.gxwebsoft.love.param.UserPlanLogParam; - -import java.util.List; - -/** - * 会员特权购买记录表Service - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -public interface UserPlanLogService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(UserPlanLogParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(UserPlanLogParam param); - - /** - * 根据id查询 - * - * @param logId ID - * @return UserPlanLog - */ - UserPlanLog getByIdRel(Integer logId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanPriceService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanPriceService.java deleted file mode 100644 index 66d9783..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanPriceService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.love.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.love.entity.UserPlanPrice; -import com.gxwebsoft.love.param.UserPlanPriceParam; - -import java.util.List; - -/** - * 会员套餐定价表Service - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -public interface UserPlanPriceService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(UserPlanPriceParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(UserPlanPriceParam param); - - /** - * 根据id查询 - * - * @param id ID - * @return UserPlanPrice - */ - UserPlanPrice getByIdRel(Integer id); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanService.java deleted file mode 100644 index 9238992..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserPlanService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.love.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.love.entity.UserPlan; -import com.gxwebsoft.love.param.UserPlanParam; - -import java.util.List; - -/** - * 会员套餐管理表Service - * - * @author 科技小王子 - * @since 2023-06-23 03:05:44 - */ -public interface UserPlanService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(UserPlanParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(UserPlanParam param); - - /** - * 根据id查询 - * - * @param planId 套餐ID - * @return UserPlan - */ - UserPlan getByIdRel(Integer planId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserProfileService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserProfileService.java deleted file mode 100644 index 1554f72..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/UserProfileService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.love.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.love.entity.UserProfile; -import com.gxwebsoft.love.param.UserProfileParam; - -import java.util.List; - -/** - * 会员资料表Service - * - * @author 科技小王子 - * @since 2023-06-09 21:42:26 - */ -public interface UserProfileService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(UserProfileParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(UserProfileParam param); - - /** - * 根据id查询 - * - * @param id 自增ID - * @return UserProfile - */ - UserProfile getByIdRel(Integer id); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanEquityServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanEquityServiceImpl.java deleted file mode 100644 index d9c38b6..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanEquityServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.love.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.love.mapper.UserPlanEquityMapper; -import com.gxwebsoft.love.service.UserPlanEquityService; -import com.gxwebsoft.love.entity.UserPlanEquity; -import com.gxwebsoft.love.param.UserPlanEquityParam; -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 2023-06-23 12:02:58 - */ -@Service -public class UserPlanEquityServiceImpl extends ServiceImpl implements UserPlanEquityService { - - @Override - public PageResult pageRel(UserPlanEquityParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(UserPlanEquityParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public UserPlanEquity getByIdRel(Integer planEquityId) { - UserPlanEquityParam param = new UserPlanEquityParam(); - param.setPlanEquityId(planEquityId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanLogServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanLogServiceImpl.java deleted file mode 100644 index 6962832..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanLogServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.love.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.love.mapper.UserPlanLogMapper; -import com.gxwebsoft.love.service.UserPlanLogService; -import com.gxwebsoft.love.entity.UserPlanLog; -import com.gxwebsoft.love.param.UserPlanLogParam; -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 2023-06-23 03:05:44 - */ -@Service -public class UserPlanLogServiceImpl extends ServiceImpl implements UserPlanLogService { - - @Override - public PageResult pageRel(UserPlanLogParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(UserPlanLogParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public UserPlanLog getByIdRel(Integer logId) { - UserPlanLogParam param = new UserPlanLogParam(); - param.setLogId(logId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanPriceServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanPriceServiceImpl.java deleted file mode 100644 index 364531d..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanPriceServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.love.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.love.mapper.UserPlanPriceMapper; -import com.gxwebsoft.love.service.UserPlanPriceService; -import com.gxwebsoft.love.entity.UserPlanPrice; -import com.gxwebsoft.love.param.UserPlanPriceParam; -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 2023-06-23 03:05:44 - */ -@Service -public class UserPlanPriceServiceImpl extends ServiceImpl implements UserPlanPriceService { - - @Override - public PageResult pageRel(UserPlanPriceParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(UserPlanPriceParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public UserPlanPrice getByIdRel(Integer id) { - UserPlanPriceParam param = new UserPlanPriceParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanServiceImpl.java deleted file mode 100644 index b5ebd54..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserPlanServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.love.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.love.mapper.UserPlanMapper; -import com.gxwebsoft.love.service.UserPlanService; -import com.gxwebsoft.love.entity.UserPlan; -import com.gxwebsoft.love.param.UserPlanParam; -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 2023-06-23 03:05:44 - */ -@Service -public class UserPlanServiceImpl extends ServiceImpl implements UserPlanService { - - @Override - public PageResult pageRel(UserPlanParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(UserPlanParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public UserPlan getByIdRel(Integer planId) { - UserPlanParam param = new UserPlanParam(); - param.setPlanId(planId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserProfileServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserProfileServiceImpl.java deleted file mode 100644 index 1a7e2e3..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/service/impl/UserProfileServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.gxwebsoft.love.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.common.core.web.PageParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.common.system.service.UserService; -import com.gxwebsoft.love.entity.UserProfile; -import com.gxwebsoft.love.mapper.UserProfileMapper; -import com.gxwebsoft.love.param.UserProfileParam; -import com.gxwebsoft.love.service.UserProfileService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 会员资料表Service实现 - * - * @author 科技小王子 - * @since 2023-06-09 21:42:26 - */ -@Service -public class UserProfileServiceImpl extends ServiceImpl implements UserProfileService { - @Resource - private UserService userService; - - @Override - public PageResult pageRel(UserProfileParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(UserProfileParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public UserProfile getByIdRel(Integer id) { - UserProfileParam param = new UserProfileParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/task/UserPlanTaskController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/love/task/UserPlanTaskController.java deleted file mode 100644 index bebe304..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/love/task/UserPlanTaskController.java +++ /dev/null @@ -1,210 +0,0 @@ -package com.gxwebsoft.love.task; - -import cn.hutool.core.date.DateField; -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.Role; -import com.gxwebsoft.common.system.entity.UserRole; -import com.gxwebsoft.common.system.service.RoleService; -import com.gxwebsoft.common.system.service.UserRoleService; -import com.gxwebsoft.love.entity.UserPlanEquity; -import com.gxwebsoft.love.entity.UserPlanLog; -import com.gxwebsoft.love.param.UserPlanEquityParam; -import com.gxwebsoft.love.param.UserPlanLogParam; -import com.gxwebsoft.love.service.UserPlanEquityService; -import com.gxwebsoft.love.service.UserPlanLogService; -import com.gxwebsoft.shop.entity.Merchant; -import com.gxwebsoft.shop.service.MerchantService; -import com.gxwebsoft.shop.service.OrderService; -import io.swagger.annotations.Api; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -import static com.gxwebsoft.common.core.constants.OrderConstants.*; - -/** - * 定时任务 - * - * @author 科技小王子 - * @since 2022-12-15 19:11:07 - */ -@Api(tags = "定时任务") -@RestController -@RequestMapping("/api/shop/scheduling") -public class UserPlanTaskController extends BaseController { - @Resource - private RoleService roleService; - @Resource - private UserPlanLogService userPlanLogService; - @Resource - private UserRoleService userRoleService; - @Resource - private UserPlanEquityService userPlanEquityService; - @Resource - private MerchantService merchantService; - - - /** - * 自动结算会员服务 - * 处理未结算的充值订单 - * 半个小时未支付自动删除订单 - */ - @Scheduled(cron="*/13 * * * * *") - @Transactional(rollbackFor = {Exception.class}) - public void removeExpireUserPlanLog() { - System.out.println("定时结算会员服务任务开始 = " + DateUtil.now()); - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - final UserPlanLogParam logParam = new UserPlanLogParam(); - logParam.setIsSettled(ORDER_SETTLED_NO); - // 查询未结算的记录 - final List list = userPlanLogService.listRel(logParam); - list.forEach(d -> { - try { - - // 1.半个小时未支付自动删除 - if (d.getPayStatus().equals(PAY_STATUS_NO_PAY)) { - Date newDate = DateUtil.offset(d.getCreateTime(), DateField.MINUTE, 30); - Date date1 = df.parse(newDate.toString()); - Date date2 = df.parse(DateUtil.now()); - if(date2.after(date1)){ - userPlanLogService.removeById(d.getLogId()); - System.out.println("半个小时未支付自动删除(充值订单) = " + d.getLogId()); - } - } - - // 2.结算已支付订单 - if (d.getPayStatus().equals(PAY_STATUS_SUCCESS)) { - - // 2.1添加会员身份 - if (userRoleService.count(new LambdaQueryWrapper() - .eq(UserRole::getUserId,d.getUserId()) - .eq(UserRole::getRoleId,d.getRoleId())) == 0 - ) { - // 查找超级管理员ID - final Role superAdmin = roleService.getOne(new LambdaQueryWrapper() - .eq(Role::getRoleCode, "superAdmin") - .eq(Role::getTenantId,d.getTenantId())); - final Role exclusive = roleService.getOne(new LambdaQueryWrapper() - .eq(Role::getRoleCode, "exclusive") - .eq(Role::getTenantId,d.getTenantId())); - final Integer AdminRoleId = superAdmin.getRoleId(); - final Integer ExclusiveRoleId = exclusive.getRoleId(); - // 删除超管外的角色 - userRoleService.remove(new LambdaQueryWrapper() - .eq(UserRole::getUserId,d.getUserId()) - .eq(UserRole::getTenantId,d.getTenantId()) - .ne(UserRole::getRoleId,AdminRoleId) - .ne(UserRole::getRoleId,ExclusiveRoleId)); - // 添加当前角色 - final UserRole userRole = new UserRole(); - userRole.setUserId(d.getUserId()); - userRole.setRoleId(d.getRoleId()); - userRole.setTenantId(d.getTenantId()); - userRoleService.save(userRole); - } - - // 2.2延长会员到期时间 - final UserPlanEquityParam userPlanEquityParam = new UserPlanEquityParam(); - userPlanEquityParam.setUserId(d.getUserId()); - userPlanEquityParam.setPlanId(d.getPlanId()); - userPlanEquityParam.setTenantId(d.getTenantId()); - final List userPlanEquities = userPlanEquityService.listRel(userPlanEquityParam); - - // 2.3不存在则新增会员权益 - if (CollectionUtils.isEmpty(userPlanEquities)) { - UserPlanEquity userPlanEquity = new UserPlanEquity(); - userPlanEquity.setUserId(d.getUserId()); - userPlanEquity.setPlanId(d.getPlanId()); - userPlanEquity.setTenantId(d.getTenantId()); - userPlanEquity.setPlanName(d.getPlanName()); - userPlanEquity.setRealName(d.getRealName()); - userPlanEquity.setProvince(d.getProvince()); - userPlanEquity.setCity(d.getCity()); - userPlanEquity.setRegion(d.getRegion()); - userPlanEquity.setArea(d.getArea()); - userPlanEquity.setAddress(d.getAddress()); - userPlanEquity.setType(d.getType()); - userPlanEquity.setMerchantId(d.getMerchantId()); - if (d.getPriceName().equals("月卡")) { - userPlanEquity.setExpirationTime(DateUtil.offsetMonth(DateUtil.date(), 1)); - } - if (d.getPriceName().equals("半年卡")) { - userPlanEquity.setExpirationTime(DateUtil.offsetMonth(DateUtil.date(), 6)); - } - if (d.getPriceName().equals("年卡")) { - userPlanEquity.setExpirationTime(DateUtil.offsetMonth(DateUtil.date(), 12)); - } - userPlanEquityService.save(userPlanEquity); - }else { - // 2.4会员权益延长到期时间 - UserPlanEquity userPlanEquity = userPlanEquities.get(0); - if (d.getPriceName().equals("月卡")) { - userPlanEquity.setExpirationTime(DateUtil.offsetMonth(userPlanEquity.getExpirationTime(), 1)); - } - if (d.getPriceName().equals("半年卡")) { - userPlanEquity.setExpirationTime(DateUtil.offsetMonth(userPlanEquity.getExpirationTime(), 6)); - } - if (d.getPriceName().equals("年卡")) { - userPlanEquity.setExpirationTime(DateUtil.offsetMonth(userPlanEquity.getExpirationTime(), 12)); - } - userPlanEquityService.updateById(userPlanEquity); - } - - // 2.5新增门店 - if (d.getPlanId().equals(22) && merchantService.count(new LambdaQueryWrapper().eq(Merchant::getUserId,d.getUserId())) == 0) { - final Merchant merchant = new Merchant(); - merchant.setMerchantName(d.getRegion().concat("店")); - merchant.setMerchantCode(d.getLogNo()); - merchant.setMerchantType(d.getPlanName()); - merchant.setLogo("https://file.wsdns.cn/20230620/9569603314cb4224b9e3a676c350825f.jpeg"); - merchant.setProvince(d.getProvince()); - merchant.setCity(d.getCity()); - merchant.setRegion(d.getRegion()); - merchant.setAddress(d.getAddress()); - merchant.setContent(d.getRegion().concat("店")); - merchant.setMerchantOwner(d.getUserId()); - merchant.setUserId(d.getUserId()); - merchant.setMerchantPhone(d.getPhone()); - merchant.setMerchantHours("8:30 - 22:30"); - merchant.setSortNumber(100); - merchant.setStatus(0); - merchant.setTenantId(d.getTenantId()); - merchantService.save(merchant); - }else { - // 2.6 升级门店 - if (d.getPlanId() > 22) { - System.out.println("升级门店升级门店升级门店升级门店 = "); - final Merchant merchant = merchantService.getOne(new LambdaQueryWrapper() - .eq(Merchant::getTenantId, d.getTenantId()) - .eq(Merchant::getUserId, d.getUserId()) - .eq(Merchant::getMerchantOwner,d.getUserId())); - - merchant.setMerchantName(d.getRegion()); - merchant.setProvince(d.getProvince()); - merchant.setCity(d.getCity()); - merchant.setRegion(d.getRegion()); - merchant.setAddress(d.getAddress()); - merchantService.updateById(merchant); - } - } - - // 3.更新结算状态 - d.setIsSettled(ORDER_SETTLED_YES); - userPlanLogService.updateById(d); - } - - } catch (Exception e) { - e.printStackTrace(); - } - }); - } -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/controller/AppUserController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/controller/AppUserController.java deleted file mode 100644 index 9f31677..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/controller/AppUserController.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.gxwebsoft.oa.controller; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.gxwebsoft.common.core.annotation.OperationLog; -import com.gxwebsoft.common.core.web.ApiResult; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.core.web.BatchParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.oa.entity.AppUser; -import com.gxwebsoft.oa.param.AppUserParam; -import com.gxwebsoft.oa.service.AppUserService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 应用成员控制器 - * - * @author 科技小王子 - * @since 2023-05-31 13:18:55 - */ -@Api(tags = "应用成员管理") -@RestController -@RequestMapping("/api/oa/app-user") -public class AppUserController extends BaseController { - @Resource - private AppUserService appUserService; - - @PreAuthorize("hasAuthority('oa:appUser:list')") - @OperationLog - @ApiOperation("分页查询应用成员") - @GetMapping("/page") - public ApiResult> page(AppUserParam param) { - // 使用关联查询 - return success(appUserService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('oa:appUser:list')") - @OperationLog - @ApiOperation("查询全部应用成员") - @GetMapping() - public ApiResult> list(AppUserParam param) { - // 使用关联查询 - if (param.getAppId() == null) { - return fail("AppId不存在",null); - } - return success(appUserService.listRel(param)); - } - - @PreAuthorize("hasAuthority('oa:appUser:list')") - @OperationLog - @ApiOperation("根据id查询应用成员") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - // 使用关联查询 - return success(appUserService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('oa:appUser:save')") - @OperationLog - @ApiOperation("添加应用成员") - @PostMapping() - public ApiResult save(@RequestBody AppUser appUser) { - if (appUserService.count(new LambdaQueryWrapper() - .eq(AppUser::getUserId, appUser.getUserId()).eq(AppUser::getAppId,appUser.getAppId())) > 0) { - return fail("该成员已存在"); - } - if (appUserService.save(appUser)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('oa:appUser:update')") - @OperationLog - @ApiOperation("修改应用成员") - @PutMapping() - public ApiResult update(@RequestBody AppUser appUser) { - if (appUserService.updateById(appUser)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('oa:appUser:remove')") - @OperationLog - @ApiOperation("删除应用成员") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (appUserService.removeById(id)) { - return success("移除成功"); - } - return fail("移除失败"); - } - - @PreAuthorize("hasAuthority('oa:appUser:save')") - @OperationLog - @ApiOperation("批量添加应用成员") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (appUserService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('oa:appUser:update')") - @OperationLog - @ApiOperation("批量修改应用成员") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(appUserService, "app_user_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('oa:appUser:remove')") - @OperationLog - @ApiOperation("批量删除应用成员") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (appUserService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/App.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/App.java deleted file mode 100644 index debb2fc..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/App.java +++ /dev/null @@ -1,243 +0,0 @@ -package com.gxwebsoft.oa.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.gxwebsoft.common.system.entity.Tenant; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; - -/** - * 应用管理记录表 - * - * @author 科技小王子 - * @since 2023-03-28 10:45:39 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "App对象", description = "应用管理记录表") -@TableName("oa_app") -public class App implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "应用ID") - @TableId(value = "app_id", type = IdType.AUTO) - private Integer appId; - - @ApiModelProperty(value = "应用名称") - private String appName; - - @ApiModelProperty(value = "上级id, 0是顶级") - private Integer parentId; - - @ApiModelProperty(value = "应用标识") - private String appCode; - - @ApiModelProperty(value = "类型, 0菜单, 1按钮") - private String appType; - - @ApiModelProperty(value = "应用类型多选") - private String appTypeMultiple; - - @ApiModelProperty(value = "类型, 0菜单, 1按钮") - private Integer menuType; - - @ApiModelProperty(value = "企业ID") - private Integer companyId; - - @ApiModelProperty(value = "应用图标") - private String appIcon; - - @ApiModelProperty(value = "二维码") - private String appQrcode; - - @ApiModelProperty(value = "链接地址") - private String appUrl; - - @ApiModelProperty(value = "后台管理地址") - private String adminUrl; - - @ApiModelProperty(value = "下载地址") - private String downUrl; - - @ApiModelProperty(value = "服务器地址") - private String serverUrl; - - @ApiModelProperty(value = "回调地址") - private String callbackUrl; - - @ApiModelProperty(value = "腾讯文档地址") - private String docsUrl; - - @ApiModelProperty(value = "仓库地址") - private String gitUrl; - - @ApiModelProperty(value = "文件服务器") - private String fileUrl; - - @ApiModelProperty(value = "原型图地址") - private String prototypeUrl; - - @ApiModelProperty(value = "IP白名单") - private String ipAddress; - - @ApiModelProperty(value = "应用截图") - private String images; - - @ApiModelProperty(value = "应用包名") - private String packageName; - - @ApiModelProperty(value = "下载次数") - private Integer clicks; - - @ApiModelProperty(value = "安装次数") - private Integer installs; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "应用介绍") - private String content; - - @ApiModelProperty(value = "项目需求") - private String requirement; - - @ApiModelProperty(value = "开发者(个人或公司)") - private String developer; - - @ApiModelProperty(value = "项目负责人") - private String director; - - @ApiModelProperty(value = "项目经理") - private String projectDirector; - - @ApiModelProperty(value = "业务经理") - private String salesman; - - @ApiModelProperty(value = "软件定价") - private BigDecimal price; - - @ApiModelProperty(value = "划线价格") - private BigDecimal linePrice; - - @ApiModelProperty(value = "评分") - private String score; - - @ApiModelProperty(value = "星级") - private String star; - - @ApiModelProperty(value = "菜单路由地址") - private String path; - - @ApiModelProperty(value = "菜单组件地址, 目录可为空") - private String component; - - @ApiModelProperty(value = "权限标识") - private String authority; - - @ApiModelProperty(value = "打开位置") - private String target; - - @ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)") - private Integer hide; - - @ApiModelProperty(value = "禁止搜索,1禁止 0 允许") - private Integer search; - - @ApiModelProperty(value = "菜单侧栏选中的path") - private String active; - - @ApiModelProperty(value = "其它路由元信息") - private String meta; - - @ApiModelProperty(value = "版本,0正式版 1体验版 2开发版") - private String edition; - - @ApiModelProperty(value = "版本号") - private String version; - - @ApiModelProperty(value = "是否已安装") - private Integer isUse; - - @ApiModelProperty(value = "应用状态") - private String appStatus; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "机构id") - private Integer organizationId; - - @ApiModelProperty(value = "应用秘钥") - @TableField(exist = false) - private String appSecret; - - @ApiModelProperty(value = "租户编号") - private String tenantCode; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - - @ApiModelProperty(value = "附件1") - private String file1; - - @ApiModelProperty(value = "附件2") - private String file2; - - @ApiModelProperty(value = "附件3") - private String file3; - - @ApiModelProperty(value = "成员管理") - @TableField(exist = false) - private List users; - - @ApiModelProperty(value = "主体名称") - @TableField(exist = false) - private String tenantName; - - @ApiModelProperty(value = "主体ID") - @TableField(exist = false) - private Integer tenantId; - - @ApiModelProperty(value = "租户信息") - @TableField(exist = false) - private Tenant tenant; - - @ApiModelProperty(value = "开发者名称") - @TableField(exist = false) - private String realName; - - @ApiModelProperty(value = "开发者名称") - @TableField(exist = false) - private String nickname; - - @ApiModelProperty(value = "开发者头像") - @TableField(exist = false) - private String avatar; - - @ApiModelProperty(value = "公司名称") - private String companyName; - - @ApiModelProperty(value = "公司简称") - @TableField(exist = false) - private String shortName; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/AppUser.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/AppUser.java deleted file mode 100644 index 1f47710..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/AppUser.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.gxwebsoft.oa.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; -import java.util.Date; - -/** - * 应用成员 - * - * @author 科技小王子 - * @since 2023-05-31 13:18:55 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "AppUser对象", description = "应用成员") -@TableName("oa_app_user") -public class AppUser implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @TableId(value = "app_user_id", type = IdType.AUTO) - private Integer appUserId; - - @ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ") - private Integer role; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "应用ID") - private Integer appId; - - @ApiModelProperty(value = "状态, 0正常, 1待确认") - private Integer status; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "昵称") - @TableField(exist = false) - private String nickname; - - @ApiModelProperty(value = "用户名") - @TableField(exist = false) - private String username; - - @ApiModelProperty(value = "手机号码") - @TableField(exist = false) - private String phone; - - @ApiModelProperty(value = "邮箱") - @TableField(exist = false) - private String email; - - @ApiModelProperty(value = "头像") - @TableField(exist = false) - private String avatar; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/AppMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/AppMapper.java deleted file mode 100644 index 4415af7..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/AppMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.gxwebsoft.oa.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.oa.entity.App; -import com.gxwebsoft.oa.param.AppParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 应用管理记录表Mapper - * - * @author 科技小王子 - * @since 2023-03-28 10:45:39 - */ -public interface AppMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") AppParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") AppParam param); - - List pageRel(@Param("param") AppParam param); -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/AppUserMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/AppUserMapper.java deleted file mode 100644 index 68736b1..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/AppUserMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.oa.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.oa.entity.AppUser; -import com.gxwebsoft.oa.param.AppUserParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 应用成员Mapper - * - * @author 科技小王子 - * @since 2023-05-31 13:18:55 - */ -public interface AppUserMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") AppUserParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") AppUserParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/xml/AppMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/xml/AppMapper.xml deleted file mode 100644 index c81507e..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/xml/AppMapper.xml +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - SELECT a.*, - b.company_id, - b.short_name, - b.company_name, - c.nickname, - c.real_name, - c.user_id, - c.avatar - FROM oa_app a - LEFT JOIN sys_company b ON a.company_id = b.company_id - LEFT JOIN sys_user c ON a.user_id = c.user_id - - - AND a.app_id = #{param.appId} - - - AND a.app_name LIKE CONCAT('%', #{param.appName}, '%') - - - AND a.parent_id = #{param.parentId} - - - AND a.app_code LIKE CONCAT('%', #{param.appCode}, '%') - - - AND a.app_type LIKE CONCAT('%', #{param.appType}, '%') - - - AND a.menu_type = #{param.menuType} - - - AND a.company_id = #{param.companyId} - - - AND a.app_icon LIKE CONCAT('%', #{param.appIcon}, '%') - - - AND a.app_qrcode LIKE CONCAT('%', #{param.appQrcode}, '%') - - - AND a.app_url LIKE CONCAT('%', #{param.appUrl}, '%') - - - AND a.admin_url LIKE CONCAT('%', #{param.adminUrl}, '%') - - - AND a.down_url LIKE CONCAT('%', #{param.downUrl}, '%') - - - AND a.ip_address LIKE CONCAT('%', #{param.ipAddress}, '%') - - - AND a.images LIKE CONCAT('%', #{param.images}, '%') - - - AND a.package_name LIKE CONCAT('%', #{param.packageName}, '%') - - - AND a.clicks = #{param.clicks} - - - AND a.installs = #{param.installs} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') - - - AND a.requirement LIKE CONCAT('%', #{param.requirement}, '%') - - - AND a.developer LIKE CONCAT('%', #{param.developer}, '%') - - - AND a.price = #{param.price} - - - AND a.line_price = #{param.linePrice} - - - AND a.score LIKE CONCAT('%', #{param.score}, '%') - - - AND a.star LIKE CONCAT('%', #{param.star}, '%') - - - AND a.path LIKE CONCAT('%', #{param.path}, '%') - - - AND a.component LIKE CONCAT('%', #{param.component}, '%') - - - AND a.authority LIKE CONCAT('%', #{param.authority}, '%') - - - AND a.target LIKE CONCAT('%', #{param.target}, '%') - - - AND a.hide = #{param.hide} - - - AND a.search = #{param.search} - - - AND a.active LIKE CONCAT('%', #{param.active}, '%') - - - AND a.meta LIKE CONCAT('%', #{param.meta}, '%') - - - AND a.edition LIKE CONCAT('%', #{param.edition}, '%') - - - AND a.version LIKE CONCAT('%', #{param.version}, '%') - - - AND a.is_use = #{param.isUse} - - - AND a.sort_number = #{param.sortNumber} - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.app_id IN (SELECT app_id FROM oa_app_user WHERE user_id=#{param.userId}) - - - AND a.app_id IN - - #{item} - - - - AND a.organization_id = #{param.organizationId} - - - AND a.tenant_id = #{param.tenantId} - - - AND a.tenant_code LIKE CONCAT('%', #{param.tenantCode}, '%') - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND a.app_status = #{param.appStatus} - - - AND a.company_id = #{param.companyId} - - - - AND (a.app_name LIKE CONCAT('%', #{param.keywords}, '%') - OR b.short_name LIKE CONCAT('%', #{param.keywords}, '%') - OR b.company_id = #{param.keywords} - OR b.company_name LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/xml/AppUserMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/xml/AppUserMapper.xml deleted file mode 100644 index 967f400..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/mapper/xml/AppUserMapper.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - SELECT a.*, b.nickname,b.email,b.phone,b.avatar - FROM oa_app_user a - LEFT JOIN sys_user b ON a.user_id = b.user_id - - - AND a.app_user_id = #{param.appUserId} - - - AND a.role = #{param.role} - - - AND a.user_id = #{param.userId} - - - AND a.app_id = #{param.appId} - - - AND a.status = #{param.status} - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (b.nickname LIKE CONCAT('%', #{param.keywords}, '%') - OR b.email LIKE CONCAT('%', #{param.keywords}, '%') - OR b.username LIKE CONCAT('%', #{param.keywords}, '%') - OR b.phone LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppParam.java deleted file mode 100644 index ca7eceb..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppParam.java +++ /dev/null @@ -1,187 +0,0 @@ -package com.gxwebsoft.oa.param; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; -import java.util.Set; - -/** - * 应用管理记录表查询参数 - * - * @author 科技小王子 - * @since 2023-03-28 10:45:39 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "AppParam对象", description = "应用管理记录表查询参数") -public class AppParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "应用ID") - @QueryField(type = QueryType.EQ) - private Integer appId; - - @ApiModelProperty(value = "应用名称") - private String appName; - - @ApiModelProperty(value = "上级id, 0是顶级") - @QueryField(type = QueryType.EQ) - private Integer parentId; - - @ApiModelProperty(value = "应用标识") - private String appCode; - - @ApiModelProperty(value = "应用类型") - private String appType; - - @ApiModelProperty(value = "类型, 0菜单, 1按钮") - @QueryField(type = QueryType.EQ) - private Integer menuType; - - @ApiModelProperty(value = "企业ID") - @QueryField(type = QueryType.EQ) - private Integer companyId; - - @ApiModelProperty(value = "应用图标") - private String appIcon; - - @ApiModelProperty(value = "二维码") - private String appQrcode; - - @ApiModelProperty(value = "链接地址") - private String appUrl; - - @ApiModelProperty(value = "后台管理地址") - private String adminUrl; - - @ApiModelProperty(value = "下载地址") - private String downUrl; - - @ApiModelProperty(value = "仓库地址") - private String gitUrl; - - @ApiModelProperty(value = "IP白名单") - private String ipAddress; - - @ApiModelProperty(value = "应用截图") - private String images; - - @ApiModelProperty(value = "应用包名") - private String packageName; - - @ApiModelProperty(value = "下载次数") - @QueryField(type = QueryType.EQ) - private Integer clicks; - - @ApiModelProperty(value = "安装次数") - @QueryField(type = QueryType.EQ) - private Integer installs; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "应用介绍") - private String content; - - @ApiModelProperty(value = "项目需求") - private String requirement; - - @ApiModelProperty(value = "开发者(个人或公司)") - private String developer; - - @ApiModelProperty(value = "软件定价") - @QueryField(type = QueryType.EQ) - private BigDecimal price; - - @ApiModelProperty(value = "划线价格") - @QueryField(type = QueryType.EQ) - private BigDecimal linePrice; - - @ApiModelProperty(value = "评分") - private String score; - - @ApiModelProperty(value = "星级") - private String star; - - @ApiModelProperty(value = "菜单路由地址") - private String path; - - @ApiModelProperty(value = "菜单组件地址, 目录可为空") - private String component; - - @ApiModelProperty(value = "权限标识") - private String authority; - - @ApiModelProperty(value = "打开位置") - private String target; - - @ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)") - @QueryField(type = QueryType.EQ) - private Integer hide; - - @ApiModelProperty(value = "禁止搜索,1禁止 0 允许") - @QueryField(type = QueryType.EQ) - private Integer search; - - @ApiModelProperty(value = "菜单侧栏选中的path") - private String active; - - @ApiModelProperty(value = "其它路由元信息") - private String meta; - - @ApiModelProperty(value = "版本,0正式版 1体验版 2开发版") - private String edition; - - @ApiModelProperty(value = "版本号") - private String version; - - @ApiModelProperty(value = "是否已安装") - @QueryField(type = QueryType.EQ) - private Integer isUse; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "应用状态") - private String appStatus; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "租户ID") - private Integer tenantId; - - @ApiModelProperty(value = "机构id") - @QueryField(type = QueryType.EQ) - private Integer organizationId; - - @ApiModelProperty(value = "企业名称") - private String companyName; - - @ApiModelProperty(value = "租户编号") - private String tenantCode; - - @ApiModelProperty(value = "按APPID集搜索") - @TableField(exist = false) - private Set appIds; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppUserParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppUserParam.java deleted file mode 100644 index 136f2ad..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppUserParam.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.gxwebsoft.oa.param; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 应用成员查询参数 - * - * @author 科技小王子 - * @since 2023-05-31 13:18:55 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "AppUserParam对象", description = "应用成员查询参数") -public class AppUserParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @QueryField(type = QueryType.EQ) - private Integer appUserId; - - @ApiModelProperty(value = "角色,10体验成员 20开发者成员 30管理员 ") - @QueryField(type = QueryType.EQ) - private Integer role; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "应用ID") - @QueryField(type = QueryType.EQ) - private Integer appId; - - @ApiModelProperty(value = "状态, 0正常, 1待确认") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "昵称") - @TableField(exist = false) - private String nickname; - - @ApiModelProperty(value = "用户名") - @TableField(exist = false) - private String username; - - @ApiModelProperty(value = "手机号码") - @TableField(exist = false) - private String phone; - - @ApiModelProperty(value = "邮箱") - @TableField(exist = false) - private String email; - - @ApiModelProperty(value = "头像") - @TableField(exist = false) - private String avatar; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/AppService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/AppService.java deleted file mode 100644 index bf03d2d..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/AppService.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.gxwebsoft.oa.service; - -import com.baomidou.mybatisplus.annotation.InterceptorIgnore; -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.oa.entity.App; -import com.gxwebsoft.oa.param.AppParam; - -import java.util.List; - -/** - * 应用管理记录表Service - * - * @author 科技小王子 - * @since 2023-03-28 10:45:39 - */ -public interface AppService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - @InterceptorIgnore(tenantLine = "true") - PageResult pageRel(AppParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(AppParam param); - - /** - * 根据id查询 - * - * @param appId 应用ID - * @return App - */ - @InterceptorIgnore(tenantLine = "true") - App getByIdRel(Integer appId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/AppUserService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/AppUserService.java deleted file mode 100644 index 0a152f9..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/AppUserService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.oa.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.oa.entity.AppUser; -import com.gxwebsoft.oa.param.AppUserParam; - -import java.util.List; - -/** - * 应用成员Service - * - * @author 科技小王子 - * @since 2023-05-31 13:18:55 - */ -public interface AppUserService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(AppUserParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(AppUserParam param); - - /** - * 根据id查询 - * - * @param appUserId 自增ID - * @return AppUser - */ - AppUser getByIdRel(Integer appUserId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/impl/AppServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/impl/AppServiceImpl.java deleted file mode 100644 index b2bbf2f..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/impl/AppServiceImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.gxwebsoft.oa.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.common.core.web.PageParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.oa.entity.App; -import com.gxwebsoft.oa.mapper.AppMapper; -import com.gxwebsoft.oa.param.AppParam; -import com.gxwebsoft.oa.service.AppService; -import com.gxwebsoft.oa.service.AppUserService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 应用管理记录表Service实现 - * - * @author 科技小王子 - * @since 2023-03-28 10:45:39 - */ -@Service -public class AppServiceImpl extends ServiceImpl implements AppService { - @Resource - private AppUserService appUserService; - - @Override - public PageResult pageRel(AppParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(AppParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public App getByIdRel(Integer appId) { - AppParam param = new AppParam(); - param.setAppId(appId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/impl/AppUserServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/impl/AppUserServiceImpl.java deleted file mode 100644 index b31f04d..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/oa/service/impl/AppUserServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.oa.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.oa.mapper.AppUserMapper; -import com.gxwebsoft.oa.service.AppUserService; -import com.gxwebsoft.oa.entity.AppUser; -import com.gxwebsoft.oa.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 2023-05-31 13:18:55 - */ -@Service -public class AppUserServiceImpl extends ServiceImpl implements AppUserService { - - @Override - public PageResult pageRel(AppUserParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(AppUserParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public AppUser getByIdRel(Integer appUserId) { - AppUserParam param = new AppUserParam(); - param.setAppUserId(appUserId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantClerkController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantClerkController.java deleted file mode 100644 index c727867..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantClerkController.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.gxwebsoft.shop.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.shop.service.MerchantClerkService; -import com.gxwebsoft.shop.entity.MerchantClerk; -import com.gxwebsoft.shop.param.MerchantClerkParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 商家门店店员表控制器 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Api(tags = "商家门店店员表管理") -@RestController -@RequestMapping("/api/shop/merchant-clerk") -public class MerchantClerkController extends BaseController { - @Resource - private MerchantClerkService merchantClerkService; - - @PreAuthorize("hasAuthority('shop:merchantClerk:list')") - @OperationLog - @ApiOperation("分页查询商家门店店员表") - @GetMapping("/page") - public ApiResult> page(MerchantClerkParam param) { - // 使用关联查询 - return success(merchantClerkService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:list')") - @OperationLog - @ApiOperation("查询全部商家门店店员表") - @GetMapping() - public ApiResult> list(MerchantClerkParam param) { - // 使用关联查询 - return success(merchantClerkService.listRel(param)); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:list')") - @OperationLog - @ApiOperation("根据id查询商家门店店员表") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - // 使用关联查询 - return success(merchantClerkService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:save')") - @OperationLog - @ApiOperation("添加商家门店店员表") - @PostMapping() - public ApiResult save(@RequestBody MerchantClerk merchantClerk) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - merchantClerk.setUserId(loginUser.getUserId()); - } - if (merchantClerkService.save(merchantClerk)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:update')") - @OperationLog - @ApiOperation("修改商家门店店员表") - @PutMapping() - public ApiResult update(@RequestBody MerchantClerk merchantClerk) { - if (merchantClerkService.updateById(merchantClerk)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:remove')") - @OperationLog - @ApiOperation("删除商家门店店员表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (merchantClerkService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:save')") - @OperationLog - @ApiOperation("批量添加商家门店店员表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (merchantClerkService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:update')") - @OperationLog - @ApiOperation("批量修改商家门店店员表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(merchantClerkService, "clerk_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantClerk:remove')") - @OperationLog - @ApiOperation("批量删除商家门店店员表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (merchantClerkService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantController.java deleted file mode 100644 index 633d5b1..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantController.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.gxwebsoft.shop.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.shop.service.MerchantService; -import com.gxwebsoft.shop.entity.Merchant; -import com.gxwebsoft.shop.param.MerchantParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 商户管理控制器 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Api(tags = "商户管理管理") -@RestController -@RequestMapping("/api/shop/merchant") -public class MerchantController extends BaseController { - @Resource - private MerchantService merchantService; - - @PreAuthorize("hasAuthority('shop:merchant:list')") - @OperationLog - @ApiOperation("分页查询商户管理") - @GetMapping("/page") - public ApiResult> page(MerchantParam param) { - // 使用关联查询 - return success(merchantService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('shop:merchant:list')") - @OperationLog - @ApiOperation("查询全部商户管理") - @GetMapping() - public ApiResult> list(MerchantParam param) { - // 使用关联查询 - return success(merchantService.listRel(param)); - } - - @PreAuthorize("hasAuthority('shop:merchant:list')") - @OperationLog - @ApiOperation("根据id查询商户管理") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Long id) { - // 使用关联查询 - return success(merchantService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('shop:merchant:save')") - @OperationLog - @ApiOperation("添加商户管理") - @PostMapping() - public ApiResult save(@RequestBody Merchant merchant) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - merchant.setUserId(loginUser.getUserId()); - } - if (merchantService.save(merchant)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:merchant:update')") - @OperationLog - @ApiOperation("修改商户管理") - @PutMapping() - public ApiResult update(@RequestBody Merchant merchant) { - if (merchantService.updateById(merchant)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:merchant:remove')") - @OperationLog - @ApiOperation("删除商户管理") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (merchantService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('shop:merchant:save')") - @OperationLog - @ApiOperation("批量添加商户管理") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (merchantService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:merchant:update')") - @OperationLog - @ApiOperation("批量修改商户管理") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(merchantService, "merchant_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:merchant:remove')") - @OperationLog - @ApiOperation("批量删除商户管理") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (merchantService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantWithdrawController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantWithdrawController.java deleted file mode 100644 index b2f10d9..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/MerchantWithdrawController.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.gxwebsoft.shop.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.shop.service.MerchantWithdrawService; -import com.gxwebsoft.shop.entity.MerchantWithdraw; -import com.gxwebsoft.shop.param.MerchantWithdrawParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 商户提现记录控制器 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Api(tags = "商户提现记录管理") -@RestController -@RequestMapping("/api/shop/merchant-withdraw") -public class MerchantWithdrawController extends BaseController { - @Resource - private MerchantWithdrawService merchantWithdrawService; - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:list')") - @OperationLog - @ApiOperation("分页查询商户提现记录") - @GetMapping("/page") - public ApiResult> page(MerchantWithdrawParam param) { - // 使用关联查询 - return success(merchantWithdrawService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:list')") - @OperationLog - @ApiOperation("查询全部商户提现记录") - @GetMapping() - public ApiResult> list(MerchantWithdrawParam param) { - // 使用关联查询 - return success(merchantWithdrawService.listRel(param)); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:list')") - @OperationLog - @ApiOperation("根据id查询商户提现记录") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - // 使用关联查询 - return success(merchantWithdrawService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:save')") - @OperationLog - @ApiOperation("添加商户提现记录") - @PostMapping() - public ApiResult save(@RequestBody MerchantWithdraw merchantWithdraw) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - merchantWithdraw.setUserId(loginUser.getUserId()); - } - if (merchantWithdrawService.save(merchantWithdraw)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:update')") - @OperationLog - @ApiOperation("修改商户提现记录") - @PutMapping() - public ApiResult update(@RequestBody MerchantWithdraw merchantWithdraw) { - if (merchantWithdrawService.updateById(merchantWithdraw)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:remove')") - @OperationLog - @ApiOperation("删除商户提现记录") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (merchantWithdrawService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:save')") - @OperationLog - @ApiOperation("批量添加商户提现记录") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (merchantWithdrawService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:update')") - @OperationLog - @ApiOperation("批量修改商户提现记录") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(merchantWithdrawService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:merchantWithdraw:remove')") - @OperationLog - @ApiOperation("批量删除商户提现记录") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (merchantWithdrawService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/OrderController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/OrderController.java deleted file mode 100644 index 77c48cf..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/controller/OrderController.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.gxwebsoft.shop.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.shop.service.OrderService; -import com.gxwebsoft.shop.entity.Order; -import com.gxwebsoft.shop.param.OrderParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 订单记录表控制器 - * - * @author 科技小王子 - * @since 2023-06-12 16:48:49 - */ -@Api(tags = "订单记录表管理") -@RestController -@RequestMapping("/api/shop/order") -public class OrderController extends BaseController { - @Resource - private OrderService orderService; - - @PreAuthorize("hasAuthority('shop:order:list')") - @OperationLog - @ApiOperation("分页查询订单记录表") - @GetMapping("/page") - public ApiResult> page(OrderParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(orderService.page(page, page.getWrapper())); - // 使用关联查询 - //return success(orderService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('shop:order:list')") - @OperationLog - @ApiOperation("查询全部订单记录表") - @GetMapping() - public ApiResult> list(OrderParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(orderService.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(orderService.listRel(param)); - } - - @PreAuthorize("hasAuthority('shop:order:list')") - @OperationLog - @ApiOperation("根据id查询订单记录表") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - return success(orderService.getById(id)); - // 使用关联查询 - //return success(orderService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('shop:order:save')") - @OperationLog - @ApiOperation("添加订单记录表") - @PostMapping() - public ApiResult save(@RequestBody Order order) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - order.setUserId(loginUser.getUserId()); - } - if (orderService.save(order)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:order:update')") - @OperationLog - @ApiOperation("修改订单记录表") - @PutMapping() - public ApiResult update(@RequestBody Order order) { - if (orderService.updateById(order)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:order:remove')") - @OperationLog - @ApiOperation("删除订单记录表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (orderService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('shop:order:save')") - @OperationLog - @ApiOperation("批量添加订单记录表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (orderService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:order:update')") - @OperationLog - @ApiOperation("批量修改订单记录表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(orderService, "order_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:order:remove')") - @OperationLog - @ApiOperation("批量删除订单记录表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (orderService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/Merchant.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/Merchant.java deleted file mode 100644 index 2833af5..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/Merchant.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.gxwebsoft.shop.entity; - -import java.math.BigDecimal; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import java.io.Serializable; -import java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 商户管理 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "Merchant对象", description = "商户管理") -@TableName("shop_merchant") -public class Merchant implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "商户ID") - @TableId(value = "merchant_id", type = IdType.AUTO) - private Long merchantId; - - @ApiModelProperty(value = "商户名称") - private String merchantName; - - @ApiModelProperty(value = "商户编码") - private String merchantCode; - - @ApiModelProperty(value = "商户类型") - private String merchantType; - - @ApiModelProperty(value = "当前可提现金额") - private BigDecimal money; - - @ApiModelProperty(value = "已冻结金额") - private BigDecimal freezeMoney; - - @ApiModelProperty(value = "累积提现金额") - private BigDecimal totalMoney; - - @ApiModelProperty(value = "今日收益") - private BigDecimal todayMoney; - - @ApiModelProperty(value = "本月收益") - private BigDecimal monthMoney; - - @ApiModelProperty(value = "店铺logo") - private String logo; - - @ApiModelProperty(value = "店铺背景图片") - private String background; - - @ApiModelProperty(value = "营业时间") - private String merchantHours; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "详细地址") - private String address; - - @ApiModelProperty(value = "店铺详情") - private String content; - - @ApiModelProperty(value = "店铺坐标经纬度") - private String lngAndLat; - - @ApiModelProperty(value = "geohash") - private String geohash; - - @ApiModelProperty(value = "店铺简介") - private String summary; - - @ApiModelProperty(value = "打款方式 (10微信 20支付宝 30银行卡)") - private Integer payType; - - @ApiModelProperty(value = "支付宝姓名") - private String alipayName; - - @ApiModelProperty(value = "支付宝账号") - private String alipayAccount; - - @ApiModelProperty(value = "开户行名称") - private String bankName; - - @ApiModelProperty(value = "银行开户名") - private String bankAccount; - - @ApiModelProperty(value = "银行卡号") - private String bankCard; - - @ApiModelProperty(value = "是否可编辑 0 商户可编辑 1 管理员可编辑") - private Integer isEdit; - - @ApiModelProperty(value = "是否支持自提核销(0否 1支持)") - private Integer isCheck; - - @ApiModelProperty(value = "店主") - private Integer merchantOwner; - - @ApiModelProperty(value = "门店电话") - private String merchantPhone; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "客户ID") - private Integer customerId; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/MerchantClerk.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/MerchantClerk.java deleted file mode 100644 index 4725f16..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/MerchantClerk.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.gxwebsoft.shop.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; -import java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 商家门店店员表 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "MerchantClerk对象", description = "商家门店店员表") -@TableName("shop_merchant_clerk") -public class MerchantClerk implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "商户人员ID") - @TableId(value = "clerk_id", type = IdType.AUTO) - private Integer clerkId; - - @ApiModelProperty(value = "关联商户编号") - private String merchantCode; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "是否为商户主") - private Integer isOwner; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/MerchantWithdraw.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/MerchantWithdraw.java deleted file mode 100644 index 1ef62e1..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/MerchantWithdraw.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.gxwebsoft.shop.entity; - -import java.math.BigDecimal; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import java.io.Serializable; -import java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 商户提现记录 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "MerchantWithdraw对象", description = "商户提现记录") -@TableName("shop_merchant_withdraw") -public class MerchantWithdraw implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "主键ID") - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "提现单号") - private String withdrawCode; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "提现金额") - private BigDecimal money; - - @ApiModelProperty(value = "打款方式 (10微信 20支付宝 30银行卡)") - private String payType; - - @ApiModelProperty(value = "支付宝姓名") - private String alipayName; - - @ApiModelProperty(value = "支付宝账号") - private String alipayAccount; - - @ApiModelProperty(value = "开户行名称") - private String bankName; - - @ApiModelProperty(value = "银行开户名") - private String bankAccount; - - @ApiModelProperty(value = "银行卡号") - private String bankCard; - - @ApiModelProperty(value = "申请状态 (10待审核 20审核通过 30驳回 40已打款)") - private Integer applyStatus; - - @ApiModelProperty(value = "审核时间") - private Integer auditTime; - - @ApiModelProperty(value = "驳回原因") - private String rejectReason; - - @ApiModelProperty(value = "来源客户端(APP、H5、小程序等)") - private String platform; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "关联商户编号") - private String merchantCode; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/Order.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/Order.java deleted file mode 100644 index 958f61a..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/entity/Order.java +++ /dev/null @@ -1,215 +0,0 @@ -package com.gxwebsoft.shop.entity; - -import java.math.BigDecimal; -import com.baomidou.mybatisplus.annotation.TableName; -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 java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 订单记录表 - * - * @author 科技小王子 - * @since 2023-06-12 16:48:49 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "Order对象", description = "订单记录表") -@TableName("shop_order") -public class Order implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "订单ID") - @TableId(value = "order_id", type = IdType.AUTO) - private Integer orderId; - - @ApiModelProperty(value = "订单标题") - private String subject; - - @ApiModelProperty(value = "订单号") - private String orderNo; - - @ApiModelProperty(value = "商品总金额(不含优惠折扣)") - private BigDecimal totalPrice; - - @ApiModelProperty(value = "订单金额(含优惠折扣)") - private BigDecimal orderPrice; - - @ApiModelProperty(value = "优惠券ID") - private Integer couponId; - - @ApiModelProperty(value = "优惠券抵扣金额") - private BigDecimal couponMoney; - - @ApiModelProperty(value = "积分抵扣金额") - private BigDecimal pointsMoney; - - @ApiModelProperty(value = "积分抵扣数量") - private Integer pointsNum; - - @ApiModelProperty(value = "实际付款金额(包含运费)") - private BigDecimal payPrice; - - @ApiModelProperty(value = "第三方支付实收金额") - private BigDecimal receiptAmount; - - @ApiModelProperty(value = "后台修改的订单金额(差价)") - private BigDecimal updatePrice; - - @ApiModelProperty(value = "买家留言") - private String buyerRemark; - - @ApiModelProperty(value = "支付方式(废弃)") - private Integer payType; - - @ApiModelProperty(value = "支付方式(余额10/微信20/支付宝30/通联支付40/其他支付50)") - private String payMethod; - - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") - private Integer payStatus; - - @ApiModelProperty(value = "付款时间") - private LocalDateTime payTime; - - @ApiModelProperty(value = "第三方交易记录ID") - private String tradeId; - - @ApiModelProperty(value = "配送方式(10快递配送 20门店自提)") - private Integer deliveryType; - - @ApiModelProperty(value = "自提门店ID") - private Integer extractShopId; - - @ApiModelProperty(value = "核销店员ID") - private Integer extractClerkId; - - @ApiModelProperty(value = "运费金额") - private BigDecimal expressPrice; - - @ApiModelProperty(value = "物流公司ID (废弃)") - private Integer expressId; - - @ApiModelProperty(value = "物流单号 (废弃)") - private String expressNo; - - @ApiModelProperty(value = "发货状态(10未发货 20已发货 30部分发货)") - private Integer deliveryStatus; - - @ApiModelProperty(value = "发货时间") - private Date deliveryTime; - - @ApiModelProperty(value = "收货状态(10未收货 20已收货 30已退货)") - private Integer receiptStatus; - - @ApiModelProperty(value = "收货时间") - private Date receiptTime; - - @ApiModelProperty(value = "订单状态(10进行中 20取消 21待取消 30已完成)") - private Integer orderStatus; - - @ApiModelProperty(value = "赠送的积分数量") - private Integer pointsBonus; - - @ApiModelProperty(value = "商家备注") - private String merchantRemark; - - @ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)") - private Integer isSettled; - - @ApiModelProperty(value = "最后结算时间") - private Date settledTime; - - @ApiModelProperty(value = "续租订单的关联单号") - private Integer rentOrderId; - - @ApiModelProperty(value = "微信支付交易号(废弃)") - private String transactionId; - - @ApiModelProperty(value = "是否已评价(0否 1是)") - private Integer isComment; - - @ApiModelProperty(value = "订单来源(10普通订单 20砍价订单 30秒杀订单)") - private Integer orderSource; - - @ApiModelProperty(value = "来源记录ID") - private Integer orderSourceId; - - @ApiModelProperty(value = "来源记录的参数 (json格式)") - private String orderSourceData; - - @ApiModelProperty(value = "电池租金") - private BigDecimal batteryRent; - - @ApiModelProperty(value = "电池押金") - private BigDecimal batteryDeposit; - - @ApiModelProperty(value = "保险") - private BigDecimal batteryInsurance; - - @ApiModelProperty(value = "购买月份数量") - private Integer month; - - @ApiModelProperty(value = "0星期日 1星期一 2星期二 3星期三 4星期四 5星期五 6星期六") - private Integer week; - - @ApiModelProperty(value = "服务开始时间") - private Date startTime; - - @ApiModelProperty(value = "服务到期时间") - private Date expirationTime; - - @ApiModelProperty(value = "来源客户端 (APP、H5、小程序等)") - private String platform; - - @ApiModelProperty(value = "是否续费订单") - private Integer isRenew; - - @ApiModelProperty(value = "是否临时报餐") - private Integer isTemporary; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "所属门店ID") - private Integer shopId; - - @ApiModelProperty(value = "商品ID") - private Integer goodsId; - - @ApiModelProperty(value = "电池商品ID") - private Integer equipmentId; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "商户编码") - private String merchantCode; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantClerkMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantClerkMapper.java deleted file mode 100644 index 903cf67..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantClerkMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.shop.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.shop.entity.MerchantClerk; -import com.gxwebsoft.shop.param.MerchantClerkParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 商家门店店员表Mapper - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -public interface MerchantClerkMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") MerchantClerkParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") MerchantClerkParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantMapper.java deleted file mode 100644 index bde220e..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.shop.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.shop.entity.Merchant; -import com.gxwebsoft.shop.param.MerchantParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 商户管理Mapper - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -public interface MerchantMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") MerchantParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") MerchantParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantWithdrawMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantWithdrawMapper.java deleted file mode 100644 index 414131b..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/MerchantWithdrawMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.shop.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.shop.entity.MerchantWithdraw; -import com.gxwebsoft.shop.param.MerchantWithdrawParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 商户提现记录Mapper - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -public interface MerchantWithdrawMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") MerchantWithdrawParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") MerchantWithdrawParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/OrderMapper.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/OrderMapper.java deleted file mode 100644 index d7f4537..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/OrderMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.shop.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.shop.entity.Order; -import com.gxwebsoft.shop.param.OrderParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 订单记录表Mapper - * - * @author 科技小王子 - * @since 2023-06-12 16:48:49 - */ -public interface OrderMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") OrderParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") OrderParam param); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantClerkMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantClerkMapper.xml deleted file mode 100644 index 5a6e012..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantClerkMapper.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - SELECT a.* - FROM shop_merchant_clerk a - - - AND a.clerk_id = #{param.clerkId} - - - AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.is_owner = #{param.isOwner} - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantMapper.xml deleted file mode 100644 index b3bd319..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantMapper.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - SELECT a.* - FROM shop_merchant a - - - AND a.merchant_id = #{param.merchantId} - - - AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%') - - - AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%') - - - AND a.merchant_type LIKE CONCAT('%', #{param.merchantType}, '%') - - - AND a.money = #{param.money} - - - AND a.freeze_money = #{param.freezeMoney} - - - AND a.total_money = #{param.totalMoney} - - - AND a.logo LIKE CONCAT('%', #{param.logo}, '%') - - - AND a.background LIKE CONCAT('%', #{param.background}, '%') - - - AND a.merchant_hours LIKE CONCAT('%', #{param.merchantHours}, '%') - - - AND a.province LIKE CONCAT('%', #{param.province}, '%') - - - AND a.city LIKE CONCAT('%', #{param.city}, '%') - - - AND a.region LIKE CONCAT('%', #{param.region}, '%') - - - AND a.address LIKE CONCAT('%', #{param.address}, '%') - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') - - - AND a.lng_and_lat LIKE CONCAT('%', #{param.lngAndLat}, '%') - - - AND a.geohash LIKE CONCAT('%', #{param.geohash}, '%') - - - AND a.summary LIKE CONCAT('%', #{param.summary}, '%') - - - AND a.pay_type = #{param.payType} - - - AND a.alipay_name LIKE CONCAT('%', #{param.alipayName}, '%') - - - AND a.alipay_account LIKE CONCAT('%', #{param.alipayAccount}, '%') - - - AND a.bank_name LIKE CONCAT('%', #{param.bankName}, '%') - - - AND a.bank_account LIKE CONCAT('%', #{param.bankAccount}, '%') - - - AND a.bank_card LIKE CONCAT('%', #{param.bankCard}, '%') - - - AND a.is_edit = #{param.isEdit} - - - AND a.is_check = #{param.isCheck} - - - AND a.merchant_owner = #{param.merchantOwner} - - - AND a.merchant_phone LIKE CONCAT('%', #{param.merchantPhone}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.customer_id = #{param.customerId} - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantWithdrawMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantWithdrawMapper.xml deleted file mode 100644 index 564def0..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/MerchantWithdrawMapper.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - SELECT a.* - FROM shop_merchant_withdraw a - - - AND a.id = #{param.id} - - - AND a.withdraw_code LIKE CONCAT('%', #{param.withdrawCode}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.money = #{param.money} - - - AND a.pay_type LIKE CONCAT('%', #{param.payType}, '%') - - - AND a.alipay_name LIKE CONCAT('%', #{param.alipayName}, '%') - - - AND a.alipay_account LIKE CONCAT('%', #{param.alipayAccount}, '%') - - - AND a.bank_name LIKE CONCAT('%', #{param.bankName}, '%') - - - AND a.bank_account LIKE CONCAT('%', #{param.bankAccount}, '%') - - - AND a.bank_card LIKE CONCAT('%', #{param.bankCard}, '%') - - - AND a.apply_status = #{param.applyStatus} - - - AND a.audit_time = #{param.auditTime} - - - AND a.reject_reason LIKE CONCAT('%', #{param.rejectReason}, '%') - - - AND a.platform LIKE CONCAT('%', #{param.platform}, '%') - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%') - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderMapper.xml b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderMapper.xml deleted file mode 100644 index 7105301..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderMapper.xml +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - SELECT a.* - FROM shop_order a - - - AND a.order_id = #{param.orderId} - - - AND a.subject LIKE CONCAT('%', #{param.subject}, '%') - - - AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%') - - - AND a.total_price = #{param.totalPrice} - - - AND a.order_price = #{param.orderPrice} - - - AND a.coupon_id = #{param.couponId} - - - AND a.coupon_money = #{param.couponMoney} - - - AND a.points_money = #{param.pointsMoney} - - - AND a.points_num = #{param.pointsNum} - - - AND a.pay_price = #{param.payPrice} - - - AND a.receipt_amount = #{param.receiptAmount} - - - AND a.update_price = #{param.updatePrice} - - - AND a.buyer_remark LIKE CONCAT('%', #{param.buyerRemark}, '%') - - - AND a.pay_type = #{param.payType} - - - AND a.pay_method LIKE CONCAT('%', #{param.payMethod}, '%') - - - AND a.pay_status = #{param.payStatus} - - - AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%') - - - AND a.trade_id LIKE CONCAT('%', #{param.tradeId}, '%') - - - AND a.delivery_type = #{param.deliveryType} - - - AND a.extract_shop_id = #{param.extractShopId} - - - AND a.extract_clerk_id = #{param.extractClerkId} - - - AND a.express_price = #{param.expressPrice} - - - AND a.express_id = #{param.expressId} - - - AND a.express_no LIKE CONCAT('%', #{param.expressNo}, '%') - - - AND a.delivery_status = #{param.deliveryStatus} - - - AND a.delivery_time LIKE CONCAT('%', #{param.deliveryTime}, '%') - - - AND a.receipt_status = #{param.receiptStatus} - - - AND a.receipt_time LIKE CONCAT('%', #{param.receiptTime}, '%') - - - AND a.order_status = #{param.orderStatus} - - - AND a.points_bonus = #{param.pointsBonus} - - - AND a.merchant_remark LIKE CONCAT('%', #{param.merchantRemark}, '%') - - - AND a.is_settled = #{param.isSettled} - - - AND a.settled_time LIKE CONCAT('%', #{param.settledTime}, '%') - - - AND a.rent_order_id = #{param.rentOrderId} - - - AND a.transaction_id LIKE CONCAT('%', #{param.transactionId}, '%') - - - AND a.is_comment = #{param.isComment} - - - AND a.order_source = #{param.orderSource} - - - AND a.order_source_id = #{param.orderSourceId} - - - AND a.order_source_data LIKE CONCAT('%', #{param.orderSourceData}, '%') - - - AND a.battery_rent = #{param.batteryRent} - - - AND a.battery_deposit = #{param.batteryDeposit} - - - AND a.battery_insurance = #{param.batteryInsurance} - - - AND a.month = #{param.month} - - - AND a.week = #{param.week} - - - AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%') - - - AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%') - - - AND a.platform LIKE CONCAT('%', #{param.platform}, '%') - - - AND a.is_renew = #{param.isRenew} - - - AND a.is_temporary = #{param.isTemporary} - - - AND a.user_id = #{param.userId} - - - AND a.shop_id = #{param.shopId} - - - AND a.goods_id = #{param.goodsId} - - - AND a.equipment_id = #{param.equipmentId} - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%') - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantClerkParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantClerkParam.java deleted file mode 100644 index a48d42c..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantClerkParam.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.gxwebsoft.shop.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 商家门店店员表查询参数 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "MerchantClerkParam对象", description = "商家门店店员表查询参数") -public class MerchantClerkParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "商户人员ID") - @QueryField(type = QueryType.EQ) - private Integer clerkId; - - @ApiModelProperty(value = "关联商户编号") - private String merchantCode; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否为商户主") - @QueryField(type = QueryType.EQ) - private Integer isOwner; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantParam.java deleted file mode 100644 index a2c2522..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantParam.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.gxwebsoft.shop.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 商户管理查询参数 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "MerchantParam对象", description = "商户管理查询参数") -public class MerchantParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "商户ID") - @QueryField(type = QueryType.EQ) - private Long merchantId; - - @ApiModelProperty(value = "商户名称") - private String merchantName; - - @ApiModelProperty(value = "商户编码") - private String merchantCode; - - @ApiModelProperty(value = "商户类型") - private String merchantType; - - @ApiModelProperty(value = "当前可提现金额") - @QueryField(type = QueryType.EQ) - private BigDecimal money; - - @ApiModelProperty(value = "已冻结金额") - @QueryField(type = QueryType.EQ) - private BigDecimal freezeMoney; - - @ApiModelProperty(value = "累积提现金额") - @QueryField(type = QueryType.EQ) - private BigDecimal totalMoney; - - @ApiModelProperty(value = "店铺logo") - private String logo; - - @ApiModelProperty(value = "店铺背景图片") - private String background; - - @ApiModelProperty(value = "营业时间") - private String merchantHours; - - @ApiModelProperty(value = "所在省份") - private String province; - - @ApiModelProperty(value = "所在城市") - private String city; - - @ApiModelProperty(value = "所在辖区") - private String region; - - @ApiModelProperty(value = "详细地址") - private String address; - - @ApiModelProperty(value = "店铺详情") - private String content; - - @ApiModelProperty(value = "店铺坐标经纬度") - private String lngAndLat; - - @ApiModelProperty(value = "geohash") - private String geohash; - - @ApiModelProperty(value = "店铺简介") - private String summary; - - @ApiModelProperty(value = "打款方式 (10微信 20支付宝 30银行卡)") - @QueryField(type = QueryType.EQ) - private Integer payType; - - @ApiModelProperty(value = "支付宝姓名") - private String alipayName; - - @ApiModelProperty(value = "支付宝账号") - private String alipayAccount; - - @ApiModelProperty(value = "开户行名称") - private String bankName; - - @ApiModelProperty(value = "银行开户名") - private String bankAccount; - - @ApiModelProperty(value = "银行卡号") - private String bankCard; - - @ApiModelProperty(value = "是否可编辑 0 商户可编辑 1 管理员可编辑") - @QueryField(type = QueryType.EQ) - private Integer isEdit; - - @ApiModelProperty(value = "是否支持自提核销(0否 1支持)") - @QueryField(type = QueryType.EQ) - private Integer isCheck; - - @ApiModelProperty(value = "店主") - @QueryField(type = QueryType.EQ) - private Integer merchantOwner; - - @ApiModelProperty(value = "门店电话") - private String merchantPhone; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - - @ApiModelProperty(value = "客户ID") - @QueryField(type = QueryType.EQ) - private Integer customerId; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantWithdrawParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantWithdrawParam.java deleted file mode 100644 index 3c7177e..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/MerchantWithdrawParam.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.gxwebsoft.shop.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 商户提现记录查询参数 - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "MerchantWithdrawParam对象", description = "商户提现记录查询参数") -public class MerchantWithdrawParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "主键ID") - @QueryField(type = QueryType.EQ) - private Integer id; - - @ApiModelProperty(value = "提现单号") - private String withdrawCode; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "提现金额") - @QueryField(type = QueryType.EQ) - private BigDecimal money; - - @ApiModelProperty(value = "打款方式 (10微信 20支付宝 30银行卡)") - private String payType; - - @ApiModelProperty(value = "支付宝姓名") - private String alipayName; - - @ApiModelProperty(value = "支付宝账号") - private String alipayAccount; - - @ApiModelProperty(value = "开户行名称") - private String bankName; - - @ApiModelProperty(value = "银行开户名") - private String bankAccount; - - @ApiModelProperty(value = "银行卡号") - private String bankCard; - - @ApiModelProperty(value = "申请状态 (10待审核 20审核通过 30驳回 40已打款)") - @QueryField(type = QueryType.EQ) - private Integer applyStatus; - - @ApiModelProperty(value = "审核时间") - @QueryField(type = QueryType.EQ) - private Integer auditTime; - - @ApiModelProperty(value = "驳回原因") - private String rejectReason; - - @ApiModelProperty(value = "来源客户端(APP、H5、小程序等)") - private String platform; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - - @ApiModelProperty(value = "关联商户编号") - private String merchantCode; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/OrderParam.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/OrderParam.java deleted file mode 100644 index 42a91a9..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/param/OrderParam.java +++ /dev/null @@ -1,241 +0,0 @@ -package com.gxwebsoft.shop.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 订单记录表查询参数 - * - * @author 科技小王子 - * @since 2023-06-12 16:48:49 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "OrderParam对象", description = "订单记录表查询参数") -public class OrderParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "订单ID") - @QueryField(type = QueryType.EQ) - private Integer orderId; - - @ApiModelProperty(value = "订单标题") - private String subject; - - @ApiModelProperty(value = "订单号") - private String orderNo; - - @ApiModelProperty(value = "商品总金额(不含优惠折扣)") - @QueryField(type = QueryType.EQ) - private BigDecimal totalPrice; - - @ApiModelProperty(value = "订单金额(含优惠折扣)") - @QueryField(type = QueryType.EQ) - private BigDecimal orderPrice; - - @ApiModelProperty(value = "优惠券ID") - @QueryField(type = QueryType.EQ) - private Integer couponId; - - @ApiModelProperty(value = "优惠券抵扣金额") - @QueryField(type = QueryType.EQ) - private BigDecimal couponMoney; - - @ApiModelProperty(value = "积分抵扣金额") - @QueryField(type = QueryType.EQ) - private BigDecimal pointsMoney; - - @ApiModelProperty(value = "积分抵扣数量") - @QueryField(type = QueryType.EQ) - private Integer pointsNum; - - @ApiModelProperty(value = "实际付款金额(包含运费)") - @QueryField(type = QueryType.EQ) - private BigDecimal payPrice; - - @ApiModelProperty(value = "第三方支付实收金额") - @QueryField(type = QueryType.EQ) - private BigDecimal receiptAmount; - - @ApiModelProperty(value = "后台修改的订单金额(差价)") - @QueryField(type = QueryType.EQ) - private BigDecimal updatePrice; - - @ApiModelProperty(value = "买家留言") - private String buyerRemark; - - @ApiModelProperty(value = "支付方式(废弃)") - @QueryField(type = QueryType.EQ) - private Integer payType; - - @ApiModelProperty(value = "支付方式(余额10/微信20/支付宝30/通联支付40/其他支付50)") - private String payMethod; - - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") - @QueryField(type = QueryType.EQ) - private Integer payStatus; - - @ApiModelProperty(value = "付款时间") - private String payTime; - - @ApiModelProperty(value = "第三方交易记录ID") - private String tradeId; - - @ApiModelProperty(value = "配送方式(10快递配送 20门店自提)") - @QueryField(type = QueryType.EQ) - private Integer deliveryType; - - @ApiModelProperty(value = "自提门店ID") - @QueryField(type = QueryType.EQ) - private Integer extractShopId; - - @ApiModelProperty(value = "核销店员ID") - @QueryField(type = QueryType.EQ) - private Integer extractClerkId; - - @ApiModelProperty(value = "运费金额") - @QueryField(type = QueryType.EQ) - private BigDecimal expressPrice; - - @ApiModelProperty(value = "物流公司ID (废弃)") - @QueryField(type = QueryType.EQ) - private Integer expressId; - - @ApiModelProperty(value = "物流单号 (废弃)") - private String expressNo; - - @ApiModelProperty(value = "发货状态(10未发货 20已发货 30部分发货)") - @QueryField(type = QueryType.EQ) - private Integer deliveryStatus; - - @ApiModelProperty(value = "发货时间") - private String deliveryTime; - - @ApiModelProperty(value = "收货状态(10未收货 20已收货 30已退货)") - @QueryField(type = QueryType.EQ) - private Integer receiptStatus; - - @ApiModelProperty(value = "收货时间") - private String receiptTime; - - @ApiModelProperty(value = "订单状态(10进行中 20取消 21待取消 30已完成)") - @QueryField(type = QueryType.EQ) - private Integer orderStatus; - - @ApiModelProperty(value = "赠送的积分数量") - @QueryField(type = QueryType.EQ) - private Integer pointsBonus; - - @ApiModelProperty(value = "商家备注") - private String merchantRemark; - - @ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)") - @QueryField(type = QueryType.EQ) - private Integer isSettled; - - @ApiModelProperty(value = "最后结算时间") - private String settledTime; - - @ApiModelProperty(value = "续租订单的关联单号") - @QueryField(type = QueryType.EQ) - private Integer rentOrderId; - - @ApiModelProperty(value = "微信支付交易号(废弃)") - private String transactionId; - - @ApiModelProperty(value = "是否已评价(0否 1是)") - @QueryField(type = QueryType.EQ) - private Integer isComment; - - @ApiModelProperty(value = "订单来源(10普通订单 20砍价订单 30秒杀订单)") - @QueryField(type = QueryType.EQ) - private Integer orderSource; - - @ApiModelProperty(value = "来源记录ID") - @QueryField(type = QueryType.EQ) - private Integer orderSourceId; - - @ApiModelProperty(value = "来源记录的参数 (json格式)") - private String orderSourceData; - - @ApiModelProperty(value = "电池租金") - @QueryField(type = QueryType.EQ) - private BigDecimal batteryRent; - - @ApiModelProperty(value = "电池押金") - @QueryField(type = QueryType.EQ) - private BigDecimal batteryDeposit; - - @ApiModelProperty(value = "保险") - @QueryField(type = QueryType.EQ) - private BigDecimal batteryInsurance; - - @ApiModelProperty(value = "购买月份数量") - @QueryField(type = QueryType.EQ) - private Integer month; - - @ApiModelProperty(value = "0星期日 1星期一 2星期二 3星期三 4星期四 5星期五 6星期六") - @QueryField(type = QueryType.EQ) - private Integer week; - - @ApiModelProperty(value = "服务开始时间") - private String startTime; - - @ApiModelProperty(value = "服务到期时间") - private String expirationTime; - - @ApiModelProperty(value = "来源客户端 (APP、H5、小程序等)") - private String platform; - - @ApiModelProperty(value = "是否续费订单") - @QueryField(type = QueryType.EQ) - private Integer isRenew; - - @ApiModelProperty(value = "是否临时报餐") - @QueryField(type = QueryType.EQ) - private Integer isTemporary; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "所属门店ID") - @QueryField(type = QueryType.EQ) - private Integer shopId; - - @ApiModelProperty(value = "商品ID") - @QueryField(type = QueryType.EQ) - private Integer goodsId; - - @ApiModelProperty(value = "电池商品ID") - @QueryField(type = QueryType.EQ) - private Integer equipmentId; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - - @ApiModelProperty(value = "商户编码") - private String merchantCode; - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantClerkService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantClerkService.java deleted file mode 100644 index 44b523d..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantClerkService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.shop.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.shop.entity.MerchantClerk; -import com.gxwebsoft.shop.param.MerchantClerkParam; - -import java.util.List; - -/** - * 商家门店店员表Service - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -public interface MerchantClerkService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(MerchantClerkParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(MerchantClerkParam param); - - /** - * 根据id查询 - * - * @param clerkId 商户人员ID - * @return MerchantClerk - */ - MerchantClerk getByIdRel(Integer clerkId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantService.java deleted file mode 100644 index 236edaa..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.shop.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.shop.entity.Merchant; -import com.gxwebsoft.shop.param.MerchantParam; - -import java.util.List; - -/** - * 商户管理Service - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -public interface MerchantService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(MerchantParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(MerchantParam param); - - /** - * 根据id查询 - * - * @param merchantId 商户ID - * @return Merchant - */ - Merchant getByIdRel(Long merchantId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantWithdrawService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantWithdrawService.java deleted file mode 100644 index 1528a58..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/MerchantWithdrawService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.shop.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.shop.entity.MerchantWithdraw; -import com.gxwebsoft.shop.param.MerchantWithdrawParam; - -import java.util.List; - -/** - * 商户提现记录Service - * - * @author 科技小王子 - * @since 2023-06-26 20:34:38 - */ -public interface MerchantWithdrawService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(MerchantWithdrawParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(MerchantWithdrawParam param); - - /** - * 根据id查询 - * - * @param id 主键ID - * @return MerchantWithdraw - */ - MerchantWithdraw getByIdRel(Integer id); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/OrderService.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/OrderService.java deleted file mode 100644 index ac3f4c8..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/OrderService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.shop.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.shop.entity.Order; -import com.gxwebsoft.shop.param.OrderParam; - -import java.util.List; - -/** - * 订单记录表Service - * - * @author 科技小王子 - * @since 2023-06-12 16:48:49 - */ -public interface OrderService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(OrderParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(OrderParam param); - - /** - * 根据id查询 - * - * @param orderId 订单ID - * @return Order - */ - Order getByIdRel(Integer orderId); - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantClerkServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantClerkServiceImpl.java deleted file mode 100644 index 9cbd6bd..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantClerkServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.shop.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.shop.mapper.MerchantClerkMapper; -import com.gxwebsoft.shop.service.MerchantClerkService; -import com.gxwebsoft.shop.entity.MerchantClerk; -import com.gxwebsoft.shop.param.MerchantClerkParam; -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 2023-06-26 20:34:38 - */ -@Service -public class MerchantClerkServiceImpl extends ServiceImpl implements MerchantClerkService { - - @Override - public PageResult pageRel(MerchantClerkParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(MerchantClerkParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public MerchantClerk getByIdRel(Integer clerkId) { - MerchantClerkParam param = new MerchantClerkParam(); - param.setClerkId(clerkId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantServiceImpl.java deleted file mode 100644 index 3fee5c4..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.shop.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.shop.mapper.MerchantMapper; -import com.gxwebsoft.shop.service.MerchantService; -import com.gxwebsoft.shop.entity.Merchant; -import com.gxwebsoft.shop.param.MerchantParam; -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 2023-06-26 20:34:38 - */ -@Service -public class MerchantServiceImpl extends ServiceImpl implements MerchantService { - - @Override - public PageResult pageRel(MerchantParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(MerchantParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public Merchant getByIdRel(Long merchantId) { - MerchantParam param = new MerchantParam(); - param.setMerchantId(merchantId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantWithdrawServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantWithdrawServiceImpl.java deleted file mode 100644 index 13363ce..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/MerchantWithdrawServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.shop.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.shop.mapper.MerchantWithdrawMapper; -import com.gxwebsoft.shop.service.MerchantWithdrawService; -import com.gxwebsoft.shop.entity.MerchantWithdraw; -import com.gxwebsoft.shop.param.MerchantWithdrawParam; -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 2023-06-26 20:34:38 - */ -@Service -public class MerchantWithdrawServiceImpl extends ServiceImpl implements MerchantWithdrawService { - - @Override - public PageResult pageRel(MerchantWithdrawParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(MerchantWithdrawParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public MerchantWithdraw getByIdRel(Integer id) { - MerchantWithdrawParam param = new MerchantWithdrawParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/OrderServiceImpl.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/OrderServiceImpl.java deleted file mode 100644 index 4e9c6cd..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/service/impl/OrderServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.shop.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.shop.mapper.OrderMapper; -import com.gxwebsoft.shop.service.OrderService; -import com.gxwebsoft.shop.entity.Order; -import com.gxwebsoft.shop.param.OrderParam; -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 2023-06-12 16:48:49 - */ -@Service -public class OrderServiceImpl extends ServiceImpl implements OrderService { - - @Override - public PageResult pageRel(OrderParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(OrderParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public Order getByIdRel(Integer orderId) { - OrderParam param = new OrderParam(); - param.setOrderId(orderId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/task/OrderTaskController.java b/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/task/OrderTaskController.java deleted file mode 100644 index 0f2582b..0000000 --- a/cn.wsdns.file/src/main/java/com/gxwebsoft/shop/task/OrderTaskController.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.gxwebsoft.shop.task; - -import cn.hutool.core.date.DateField; -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.shop.entity.Order; -import com.gxwebsoft.shop.service.OrderService; -import io.swagger.annotations.Api; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -import static com.gxwebsoft.common.core.constants.OrderConstants.PAY_STATUS_NO_PAY; - -/** - * 定时任务 - * - * @author 科技小王子 - * @since 2022-12-15 19:11:07 - */ -@Api(tags = "定时任务") -@RestController -@RequestMapping("/api/shop/scheduling") -public class OrderTaskController extends BaseController { - @Resource - private OrderService orderService; - - /** - * 删除过期订单 - * 半个小时未支付自动删除订单 - * - * 秒 分 时 日 月 周 - * *:没秒都执行 - * 1-3: 从第一秒开始,到第三秒执行 - * 0/3: 从第0秒开始,每隔3秒执行一次 - * 1,2,3: 在指定的第几秒执行 - * ?: 不指定 - * 日和周不能同时指定,指定其中之一,则另一个设置为? - */ - @Scheduled(cron="*/60 * * * * *") - public void reportCurrentTime() { - System.out.println("定时任务开始 = " + DateUtil.now()); - // 比较时间前后判断是否允许取消报餐 - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - final List list = orderService.list(new LambdaQueryWrapper().eq(Order::getPayStatus, PAY_STATUS_NO_PAY)); - list.forEach(d -> { - try { - Date newDate = DateUtil.offset(d.getCreateTime(), DateField.MINUTE, 30); - Date date1 = df.parse(newDate.toString()); - Date date2 = df.parse(DateUtil.now()); - if(date2.after(date1)){ - orderService.removeById(d.getOrderId()); - System.out.println("半个小时未支付自动删除订单 = " + d.getOrderId()); - } - } catch (Exception e) { - e.printStackTrace(); - } - }); - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/TestMain.java b/cn.wsdns.file/src/test/java/com/gxwebsoft/TestMain.java deleted file mode 100644 index b6c7b3d..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/TestMain.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.gxwebsoft; - -import com.gxwebsoft.common.core.security.JwtUtil; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -/** - * Created by WebSoft on 2020-03-23 23:37 - */ -@SpringBootTest -public class TestMain { - - /** - * 生成唯一的key用于jwt工具类 - */ - @Test - public void testGenJwtKey() { -// System.out.println(JwtUtil.encodeKey(JwtUtil.randomKey())); - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/WebSoftApplicationTests.java b/cn.wsdns.file/src/test/java/com/gxwebsoft/WebSoftApplicationTests.java deleted file mode 100644 index 5a024f5..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/WebSoftApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.gxwebsoft; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -public class WebSoftApplicationTests { - - @Test - public void contextLoads() { - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/LoveGenerator.java b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/LoveGenerator.java deleted file mode 100644 index fe62556..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/LoveGenerator.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.gxwebsoft.generator; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.core.toolkit.StringPool; -import com.baomidou.mybatisplus.generator.AutoGenerator; -import com.baomidou.mybatisplus.generator.InjectionConfig; -import com.baomidou.mybatisplus.generator.config.*; -import com.baomidou.mybatisplus.generator.config.po.TableInfo; -import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; -import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 代码生成工具 - * - * @author WebSoft - * @since 2021-09-05 00:31:14 - */ -public class LoveGenerator { - // 输出位置 - private static final String OUTPUT_LOCATION = System.getProperty("user.dir"); - //private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径 - // 输出目录 - private static final String OUTPUT_DIR = "/src/main/java"; - // 作者名称 - private static final String AUTHOR = "科技小王子"; - // 是否在xml中添加二级缓存配置 - private static final boolean ENABLE_CACHE = false; - // 数据库连接配置 - private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; - private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; - private static final String DB_USERNAME = "com_gxwebsoft_oa"; - private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw"; - // 包名 - private static final String PACKAGE_NAME = "com.gxwebsoft"; - // 模块名 - private static final String MODULE_NAME = "love"; - // 需要生成的表 - private static final String[] TABLE_NAMES = new String[]{ -// "love_user_profile", -// "love_user_plan", -// "love_user_plan_price", -// "love_user_plan_log", - "love_user_plan_equity" - }; - // 需要去除的表前缀 - private static final String[] TABLE_PREFIX = new String[]{ - "love_", - "tb_" - }; - // 不需要作为查询参数的字段 - private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{ - "tenant_id", - "create_time", - "update_time" - }; - // 查询参数使用String的类型 - private static final String[] PARAM_TO_STRING_TYPE = new String[]{ - "Date", - "LocalDate", - "LocalTime", - "LocalDateTime" - }; - // 查询参数使用EQ的类型 - private static final String[] PARAM_EQ_TYPE = new String[]{ - "Integer", - "Boolean", - "BigDecimal" - }; - // 是否添加权限注解 - private static final boolean AUTH_ANNOTATION = true; - // 是否添加日志注解 - private static final boolean LOG_ANNOTATION = true; - // controller的mapping前缀 - private static final String CONTROLLER_MAPPING_PREFIX = "/api"; - // 模板所在位置 - private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates"; - - public static void main(String[] args) { - // 代码生成器 - AutoGenerator mpg = new AutoGenerator(); - - // 全局配置 - GlobalConfig gc = new GlobalConfig(); - gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR); - gc.setAuthor(AUTHOR); - gc.setOpen(false); - gc.setFileOverride(true); - gc.setEnableCache(ENABLE_CACHE); - gc.setSwagger2(true); - gc.setIdType(IdType.AUTO); - gc.setServiceName("%sService"); - mpg.setGlobalConfig(gc); - - // 数据源配置 - DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl(DB_URL); - // dsc.setSchemaName("public"); - dsc.setDriverName(DB_DRIVER); - dsc.setUsername(DB_USERNAME); - dsc.setPassword(DB_PASSWORD); - mpg.setDataSource(dsc); - - // 包配置 - PackageConfig pc = new PackageConfig(); - pc.setModuleName(MODULE_NAME); - pc.setParent(PACKAGE_NAME); - mpg.setPackageInfo(pc); - - // 策略配置 - StrategyConfig strategy = new StrategyConfig(); - strategy.setNaming(NamingStrategy.underline_to_camel); - strategy.setColumnNaming(NamingStrategy.underline_to_camel); - strategy.setInclude(TABLE_NAMES); - strategy.setTablePrefix(TABLE_PREFIX); - strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController"); - strategy.setEntityLombokModel(true); - strategy.setRestControllerStyle(true); - strategy.setControllerMappingHyphenStyle(true); - strategy.setLogicDeleteFieldName("deleted"); - mpg.setStrategy(strategy); - - // 模板配置 - TemplateConfig templateConfig = new TemplateConfig(); - templateConfig.setController(TEMPLATES_DIR + "/controller.java"); - templateConfig.setEntity(TEMPLATES_DIR + "/entity.java"); - templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java"); - templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml"); - templateConfig.setService(TEMPLATES_DIR + "/service.java"); - templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java"); - mpg.setTemplate(templateConfig); - mpg.setTemplateEngine(new BeetlTemplateEnginePlus()); - - // 自定义模板配置 - InjectionConfig cfg = new InjectionConfig() { - @Override - public void initMap() { - Map map = new HashMap<>(); - map.put("packageName", PACKAGE_NAME); - map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS); - map.put("paramToStringType", PARAM_TO_STRING_TYPE); - map.put("paramEqType", PARAM_EQ_TYPE); - map.put("authAnnotation", AUTH_ANNOTATION); - map.put("logAnnotation", LOG_ANNOTATION); - map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX); - this.setMap(map); - } - }; - String templatePath = TEMPLATES_DIR + "/param.java.btl"; - List focList = new ArrayList<>(); - focList.add(new FileOutConfig(templatePath) { - @Override - public String outputFile(TableInfo tableInfo) { - return OUTPUT_LOCATION + OUTPUT_DIR + "/" - + PACKAGE_NAME.replace(".", "/") - + "/" + pc.getModuleName() + "/param/" - + tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA; - } - }); - cfg.setFileOutConfigList(focList); - mpg.setCfg(cfg); - - mpg.execute(); - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/ShopGenerator.java b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/ShopGenerator.java deleted file mode 100644 index 2b2813c..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/ShopGenerator.java +++ /dev/null @@ -1,203 +0,0 @@ -package com.gxwebsoft.generator; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.core.toolkit.StringPool; -import com.baomidou.mybatisplus.generator.AutoGenerator; -import com.baomidou.mybatisplus.generator.InjectionConfig; -import com.baomidou.mybatisplus.generator.config.*; -import com.baomidou.mybatisplus.generator.config.po.TableInfo; -import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; -import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 代码生成工具 - * - * @author WebSoft - * @since 2021-09-05 00:31:14 - */ -public class ShopGenerator { - // 输出位置 - private static final String OUTPUT_LOCATION = System.getProperty("user.dir"); - //private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径 - // 输出目录 - private static final String OUTPUT_DIR = "/src/main/java"; - // 作者名称 - private static final String AUTHOR = "科技小王子"; - // 是否在xml中添加二级缓存配置 - private static final boolean ENABLE_CACHE = false; - // 数据库连接配置 - private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; - private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; - private static final String DB_USERNAME = "com_gxwebsoft_oa"; - private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw"; - // 包名 - private static final String PACKAGE_NAME = "com.gxwebsoft"; - // 模块名 - private static final String MODULE_NAME = "shop"; - // 需要生成的表 - private static final String[] TABLE_NAMES = new String[]{ -// "shop_order", -// "shop_goods", -// "shop_store", -// "shop_cart", -// "shop_express", -// "shop_category", -// "shop_goods_image", -// "shop_comment", -// "shop_goods_service" -// "shop_member" -// "shop_user_balance_log", -// "shop_user_address", -// "shop_user_coupon", -// "shop_user_follow", -// "shop_user_oauth", -// "shop_user_points_log", -// "shop_cart" -// "shop_info" -// "shop_coupon" -// "shop_clerk" - "shop_merchant", - "shop_merchant_clerk", - "shop_merchant_withdraw" -// "shop_order_address" -// "shop_payment", -// "shop_payment_template", -// "shop_payment_trade" -// "shop_order_goods" -// "shop_user_oauth" -// "shop_order_renew" -// "shop_recharge_order", -// "shop_recharge_order_plan", -// "shop_recharge_plan", -// "shop_user_balance_log" -// "shop_user_referee", -// "shop_order_refund", -// "shop_order_refund_address" - - }; - // 需要去除的表前缀 - private static final String[] TABLE_PREFIX = new String[]{ - "shop_", - "tb_" - }; - // 不需要作为查询参数的字段 - private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{ - "tenant_id", - "create_time", - "update_time" - }; - // 查询参数使用String的类型 - private static final String[] PARAM_TO_STRING_TYPE = new String[]{ - "Date", - "LocalDate", - "LocalTime", - "LocalDateTime" - }; - // 查询参数使用EQ的类型 - private static final String[] PARAM_EQ_TYPE = new String[]{ - "Integer", - "Boolean", - "BigDecimal" - }; - // 是否添加权限注解 - private static final boolean AUTH_ANNOTATION = true; - // 是否添加日志注解 - private static final boolean LOG_ANNOTATION = true; - // controller的mapping前缀 - private static final String CONTROLLER_MAPPING_PREFIX = "/api"; - // 模板所在位置 - private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates"; - - public static void main(String[] args) { - // 代码生成器 - AutoGenerator mpg = new AutoGenerator(); - - // 全局配置 - GlobalConfig gc = new GlobalConfig(); - gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR); - gc.setAuthor(AUTHOR); - gc.setOpen(false); - gc.setFileOverride(true); - gc.setEnableCache(ENABLE_CACHE); - gc.setSwagger2(true); - gc.setIdType(IdType.AUTO); - gc.setServiceName("%sService"); - mpg.setGlobalConfig(gc); - - // 数据源配置 - DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl(DB_URL); - // dsc.setSchemaName("public"); - dsc.setDriverName(DB_DRIVER); - dsc.setUsername(DB_USERNAME); - dsc.setPassword(DB_PASSWORD); - mpg.setDataSource(dsc); - - // 包配置 - PackageConfig pc = new PackageConfig(); - pc.setModuleName(MODULE_NAME); - pc.setParent(PACKAGE_NAME); - mpg.setPackageInfo(pc); - - // 策略配置 - StrategyConfig strategy = new StrategyConfig(); - strategy.setNaming(NamingStrategy.underline_to_camel); - strategy.setColumnNaming(NamingStrategy.underline_to_camel); - strategy.setInclude(TABLE_NAMES); - strategy.setTablePrefix(TABLE_PREFIX); - strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController"); - strategy.setEntityLombokModel(true); - strategy.setRestControllerStyle(true); - strategy.setControllerMappingHyphenStyle(true); - strategy.setLogicDeleteFieldName("deleted"); - mpg.setStrategy(strategy); - - // 模板配置 - TemplateConfig templateConfig = new TemplateConfig(); - templateConfig.setController(TEMPLATES_DIR + "/controller.java"); - templateConfig.setEntity(TEMPLATES_DIR + "/entity.java"); - templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java"); - templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml"); - templateConfig.setService(TEMPLATES_DIR + "/service.java"); - templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java"); - mpg.setTemplate(templateConfig); - mpg.setTemplateEngine(new BeetlTemplateEnginePlus()); - - // 自定义模板配置 - InjectionConfig cfg = new InjectionConfig() { - @Override - public void initMap() { - Map map = new HashMap<>(); - map.put("packageName", PACKAGE_NAME); - map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS); - map.put("paramToStringType", PARAM_TO_STRING_TYPE); - map.put("paramEqType", PARAM_EQ_TYPE); - map.put("authAnnotation", AUTH_ANNOTATION); - map.put("logAnnotation", LOG_ANNOTATION); - map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX); - this.setMap(map); - } - }; - String templatePath = TEMPLATES_DIR + "/param.java.btl"; - List focList = new ArrayList<>(); - focList.add(new FileOutConfig(templatePath) { - @Override - public String outputFile(TableInfo tableInfo) { - return OUTPUT_LOCATION + OUTPUT_DIR + "/" - + PACKAGE_NAME.replace(".", "/") - + "/" + pc.getModuleName() + "/param/" - + tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA; - } - }); - cfg.setFileOutConfigList(focList); - mpg.setCfg(cfg); - - mpg.execute(); - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/TowerGenerator.java b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/TowerGenerator.java deleted file mode 100644 index c202cea..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/TowerGenerator.java +++ /dev/null @@ -1,167 +0,0 @@ -package com.gxwebsoft.generator; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.core.toolkit.StringPool; -import com.baomidou.mybatisplus.generator.AutoGenerator; -import com.baomidou.mybatisplus.generator.InjectionConfig; -import com.baomidou.mybatisplus.generator.config.*; -import com.baomidou.mybatisplus.generator.config.po.TableInfo; -import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; -import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 代码生成工具 - * - * @author WebSoft - * @since 2021-09-05 00:31:14 - */ -public class TowerGenerator { - // 输出位置 - private static final String OUTPUT_LOCATION = System.getProperty("user.dir"); - //private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径 - // 输出目录 - private static final String OUTPUT_DIR = "/src/main/java"; - // 作者名称 - private static final String AUTHOR = "科技小王子"; - // 是否在xml中添加二级缓存配置 - private static final boolean ENABLE_CACHE = false; - // 数据库连接配置 - private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/open_ws?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; - private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; - private static final String DB_USERNAME = "open_ws"; - private static final String DB_PASSWORD = "DzAmFiZfPJ6ZGApm"; - // 包名 - private static final String PACKAGE_NAME = "com.gxwebsoft"; - // 模块名 - private static final String MODULE_NAME = "tower"; - // 需要生成的表 - private static final String[] TABLE_NAMES = new String[]{ - "tower_equipment", - "tower_warehouse" - }; - // 需要去除的表前缀 - private static final String[] TABLE_PREFIX = new String[]{ - "sys_", - "tb_" - }; - // 不需要作为查询参数的字段 - private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{ - "tenant_id", - "create_time", - "update_time" - }; - // 查询参数使用String的类型 - private static final String[] PARAM_TO_STRING_TYPE = new String[]{ - "Date", - "LocalDate", - "LocalTime", - "LocalDateTime" - }; - // 查询参数使用EQ的类型 - private static final String[] PARAM_EQ_TYPE = new String[]{ - "Integer", - "Boolean", - "BigDecimal" - }; - // 是否添加权限注解 - private static final boolean AUTH_ANNOTATION = true; - // 是否添加日志注解 - private static final boolean LOG_ANNOTATION = true; - // controller的mapping前缀 - private static final String CONTROLLER_MAPPING_PREFIX = "/api"; - // 模板所在位置 - private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates"; - - public static void main(String[] args) { - // 代码生成器 - AutoGenerator mpg = new AutoGenerator(); - - // 全局配置 - GlobalConfig gc = new GlobalConfig(); - gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR); - gc.setAuthor(AUTHOR); - gc.setOpen(false); - gc.setFileOverride(true); - gc.setEnableCache(ENABLE_CACHE); - gc.setSwagger2(true); - gc.setIdType(IdType.AUTO); - gc.setServiceName("%sService"); - mpg.setGlobalConfig(gc); - - // 数据源配置 - DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl(DB_URL); - // dsc.setSchemaName("public"); - dsc.setDriverName(DB_DRIVER); - dsc.setUsername(DB_USERNAME); - dsc.setPassword(DB_PASSWORD); - mpg.setDataSource(dsc); - - // 包配置 - PackageConfig pc = new PackageConfig(); - pc.setModuleName(MODULE_NAME); - pc.setParent(PACKAGE_NAME); - mpg.setPackageInfo(pc); - - // 策略配置 - StrategyConfig strategy = new StrategyConfig(); - strategy.setNaming(NamingStrategy.underline_to_camel); - strategy.setColumnNaming(NamingStrategy.underline_to_camel); - strategy.setInclude(TABLE_NAMES); - strategy.setTablePrefix(TABLE_PREFIX); - strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController"); - strategy.setEntityLombokModel(true); - strategy.setRestControllerStyle(true); - strategy.setControllerMappingHyphenStyle(true); - strategy.setLogicDeleteFieldName("deleted"); - mpg.setStrategy(strategy); - - // 模板配置 - TemplateConfig templateConfig = new TemplateConfig(); - templateConfig.setController(TEMPLATES_DIR + "/controller.java"); - templateConfig.setEntity(TEMPLATES_DIR + "/entity.java"); - templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java"); - templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml"); - templateConfig.setService(TEMPLATES_DIR + "/service.java"); - templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java"); - mpg.setTemplate(templateConfig); - mpg.setTemplateEngine(new BeetlTemplateEnginePlus()); - - // 自定义模板配置 - InjectionConfig cfg = new InjectionConfig() { - @Override - public void initMap() { - Map map = new HashMap<>(); - map.put("packageName", PACKAGE_NAME); - map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS); - map.put("paramToStringType", PARAM_TO_STRING_TYPE); - map.put("paramEqType", PARAM_EQ_TYPE); - map.put("authAnnotation", AUTH_ANNOTATION); - map.put("logAnnotation", LOG_ANNOTATION); - map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX); - this.setMap(map); - } - }; - String templatePath = TEMPLATES_DIR + "/param.java.btl"; - List focList = new ArrayList<>(); - focList.add(new FileOutConfig(templatePath) { - @Override - public String outputFile(TableInfo tableInfo) { - return OUTPUT_LOCATION + OUTPUT_DIR + "/" - + PACKAGE_NAME.replace(".", "/") - + "/" + pc.getModuleName() + "/param/" - + tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA; - } - }); - cfg.setFileOutConfigList(focList); - mpg.setCfg(cfg); - - mpg.execute(); - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/engine/BeetlTemplateEnginePlus.java b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/engine/BeetlTemplateEnginePlus.java deleted file mode 100644 index 1a73826..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/engine/BeetlTemplateEnginePlus.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.gxwebsoft.generator.engine; - -import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder; -import com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine; -import org.beetl.core.Configuration; -import org.beetl.core.GroupTemplate; -import org.beetl.core.Template; -import org.beetl.core.resource.FileResourceLoader; - -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Map; - -/** - * Beetl模板引擎实现文件输出 - * - * @author WebSoft - * @since 2021-09-05 00:30:28 - */ -public class BeetlTemplateEnginePlus extends AbstractTemplateEngine { - private GroupTemplate groupTemplate; - - @Override - public AbstractTemplateEngine init(ConfigBuilder configBuilder) { - super.init(configBuilder); - try { - Configuration cfg = Configuration.defaultConfiguration(); - groupTemplate = new GroupTemplate(new FileResourceLoader(), cfg); - } catch (IOException e) { - logger.error(e.getMessage(), e); - } - return this; - } - - @Override - public void writer(Map objectMap, String templatePath, String outputFile) throws Exception { - Template template = groupTemplate.getTemplate(templatePath); - try (FileOutputStream fileOutputStream = new FileOutputStream(outputFile)) { - template.binding(objectMap); - template.renderTo(fileOutputStream); - } - logger.debug("模板:" + templatePath + "; 文件:" + outputFile); - } - - @Override - public String templateFilePath(String filePath) { - return filePath + ".btl"; - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/controller.java.btl b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/controller.java.btl deleted file mode 100644 index eb3f274..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/controller.java.btl +++ /dev/null @@ -1,283 +0,0 @@ -<% -var serviceIns = strutil.toLowerCase(strutil.subStringTo(table.serviceName, 0, 1)) + strutil.subString(table.serviceName, 1); -var authPre = package.ModuleName + ':' + table.entityPath; -var idFieldName, idPropertyName; -for(field in table.fields) { - if(field.keyFlag) { - idFieldName = field.name; - idPropertyName = field.propertyName; - } -} -%> -package ${package.Controller}; - -<% if(isNotEmpty(superControllerClassPackage)) { %> -import ${superControllerClassPackage}; -<% } %> -import ${cfg.packageName!}.${package.ModuleName}.service.${entity}Service; -import ${cfg.packageName!}.${package.ModuleName}.entity.${entity}; -import ${cfg.packageName!}.${package.ModuleName}.param.${entity}Param; -import ${cfg.packageName!}.common.core.web.ApiResult; -import ${cfg.packageName!}.common.core.web.PageResult; -import ${cfg.packageName!}.common.core.web.PageParam; -import ${cfg.packageName!}.common.core.web.BatchParam; -import ${cfg.packageName!}.common.core.annotation.OperationLog; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; -<% if(!restControllerStyle) { %> -import org.springframework.stereotype.Controller; -<% } %> - -import javax.annotation.Resource; -import java.util.List; - -/** - * ${table.comment!}控制器 - * - * @author ${author} - * @since ${date(), 'yyyy-MM-dd HH:mm:ss'} - */ -<% if(swagger2) { %> -@Api(tags = "${table.comment!}管理") -<% } %> -<% if(restControllerStyle) { %> -@RestController -<% } else { %> -@Controller -<% } %> -@RequestMapping("${cfg.controllerMappingPrefix!}<% if(isNotEmpty(package.ModuleName)){ %>/${package.ModuleName}<% } %>/<% if(isNotEmpty(controllerMappingHyphenStyle)){ %>${controllerMappingHyphen}<% }else{ %>${table.entityPath}<% } %>") -<% if(kotlin) { %> -class ${table.controllerName}<% if(isNotEmpty(superControllerClass)) { %> : ${superControllerClass}()<% } %> -<% } else if(isNotEmpty(superControllerClass)) { %> -public class ${table.controllerName} extends ${superControllerClass} { -<% } else { %> -public class ${table.controllerName} { -<% } %> - @Resource - private ${table.serviceName} ${serviceIns}; - - <% if(!swagger2) { %> - /** - * 分页查询${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:list')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("分页查询${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @GetMapping("/page") - public ApiResult> page(${entity}Param param) { - PageParam<${entity}, ${entity}Param> page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(${serviceIns}.page(page, page.getWrapper())); - // 使用关联查询 - //return success(${serviceIns}.pageRel(param)); - } - - <% if(!swagger2) { %> - /** - * 查询全部${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:list')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("查询全部${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @GetMapping() - public ApiResult> list(${entity}Param param) { - PageParam<${entity}, ${entity}Param> page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(${serviceIns}.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(${serviceIns}.listRel(param)); - } - - <% if(!swagger2) { %> - /** - * 根据id查询${table.comment!} - */ - <% } %> - @PreAuthorize("hasAuthority('${authPre}:list')") - @OperationLog - @ApiOperation("根据id查询${table.comment!}") - @GetMapping("/{id}") - public ApiResult<${entity}> get(@PathVariable("id") Integer id) { - return success(${serviceIns}.getById(id)); - // 使用关联查询 - //return success(${serviceIns}.getByIdRel(id)); - } - - <% if(!swagger2) { %> - /** - * 添加${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:save')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("添加${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @PostMapping() - public ApiResult save(@RequestBody ${entity} ${table.entityPath}) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - ${table.entityPath}.setUserId(loginUser.getUserId()); - } - if (${serviceIns}.save(${table.entityPath})) { - return success("添加成功"); - } - return fail("添加失败"); - } - - <% if(!swagger2) { %> - /** - * 修改${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:update')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("修改${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @PutMapping() - public ApiResult update(@RequestBody ${entity} ${table.entityPath}) { - if (${serviceIns}.updateById(${table.entityPath})) { - return success("修改成功"); - } - return fail("修改失败"); - } - - <% if(!swagger2) { %> - /** - * 删除${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:remove')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("删除${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (${serviceIns}.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - <% if(!swagger2) { %> - /** - * 批量添加${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:save')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("批量添加${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List<${entity}> list) { - if (${serviceIns}.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - <% if(!swagger2) { %> - /** - * 批量修改${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:update')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("批量修改${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam<${entity}> batchParam) { - if (batchParam.update(${serviceIns}, "${idFieldName!}")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - <% if(!swagger2) { %> - /** - * 批量删除${table.comment!} - */ - <% } %> - <% if(cfg.authAnnotation) { %> - @PreAuthorize("hasAuthority('${authPre}:remove')") - <% } %> - <% if(cfg.logAnnotation) { %> - @OperationLog - <% } %> - <% if(swagger2) { %> - @ApiOperation("批量删除${table.comment!}") - <% } %> - <% if(!restControllerStyle) { %> - @ResponseBody - <% } %> - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (${serviceIns}.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/entity.java.btl b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/entity.java.btl deleted file mode 100644 index 44015ad..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/entity.java.btl +++ /dev/null @@ -1,158 +0,0 @@ -package ${package.Entity}; - -<% for(pkg in table.importPackages) { %> -import ${pkg}; -<% } %> -<% if(swagger2) { %> -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -<% } %> -<% if(entityLombokModel) { %> -import lombok.Data; -import lombok.EqualsAndHashCode; - <% if(chainModel) { %> -import lombok.experimental.Accessors; - <% } %> -<% } %> - -/** - * ${table.comment!} - * - * @author ${author} - * @since ${date(), 'yyyy-MM-dd HH:mm:ss'} - */ -<% if(entityLombokModel) { %> -@Data - <% if(isNotEmpty(superEntityClass)) { %> -@EqualsAndHashCode(callSuper = true) - <% } else { %> -@EqualsAndHashCode(callSuper = false) - <% } %> - <% if(chainModel) { %> -@Accessors(chain = true) - <% } %> -<% } %> -<% if(swagger2) { %> -@ApiModel(value = "${entity}对象", description = "${table.comment!''}") -<% } %> -<% if(table.convert) { %> -@TableName("${table.name}") -<% } %> -<% if(isNotEmpty(superEntityClass)) { %> -public class ${entity} extends ${superEntityClass}<% if(activeRecord) { %><${entity}><% } %>{ -<% } else if(activeRecord) { %> -public class ${entity} extends Model<${entity}> { -<% } else { %> -public class ${entity} implements Serializable { -<% } %> -<% if(entitySerialVersionUID) { %> - private static final long serialVersionUID = 1L; -<% } %> -<% /** -----------BEGIN 字段循环遍历----------- **/ %> -<% for(field in table.fields) { %> - <% - var keyPropertyName; - if(field.keyFlag) { - keyPropertyName = field.propertyName; - } - %> - - <% if(isNotEmpty(field.comment)) { %> - <% if(swagger2) { %> - @ApiModelProperty(value = "${field.comment}") - <% }else{ %> - /** - * ${field.comment} - */ - <% } %> - <% } %> - <% /* 主键 */ %> - <% if(field.keyFlag) { %> - <% if(field.keyIdentityFlag) { %> - @TableId(value = "${field.annotationColumnName}", type = IdType.AUTO) - <% } else if(isNotEmpty(idType)) { %> - @TableId(value = "${field.annotationColumnName}", type = IdType.${idType}) - <% } else if(field.convert) { %> - @TableId("${field.annotationColumnName}") - <% } %> - <% /* 普通字段 */ %> - <% } else if(isNotEmpty(field.fill)) { %> - <% if(field.convert){ %> - @TableField(value = "${field.annotationColumnName}", fill = FieldFill.${field.fill}) - <% }else{ %> - @TableField(fill = FieldFill.${field.fill}) - <% } %> - <% } else if(field.convert) { %> - @TableField("${field.annotationColumnName}") - <% } %> - <% /* 乐观锁注解 */ %> - <% if(versionFieldName!'' == field.name) { %> - @Version - <% } %> - <% /* 逻辑删除注解 */ %> - <% if(logicDeleteFieldName!'' == field.name) { %> - @TableLogic - <% } %> - private ${field.propertyType} ${field.propertyName}; -<% } %> -<% /** -----------END 字段循环遍历----------- **/ %> - -<% if(!entityLombokModel) { %> - <% for(field in table.fields) { %> - <% - var getprefix = ''; - if(field.propertyType == 'boolean') { - getprefix = 'is'; - } else { - getprefix = 'get'; - } - %> - public ${field.propertyType} ${getprefix}${field.capitalName}() { - return ${field.propertyName}; - } - - <% if(chainModel) { %> - public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { - <% } else { %> - public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { - <% } %> - this.${field.propertyName} = ${field.propertyName}; - <% if(chainModel){ %> - return this; - <% } %> - } - - <% } %> -<% } %> -<% if(entityColumnConstant) { %> - <% for(field in table.fields) { %> - public static final String ${strutil.toUpperCase(field.name)} = "${field.name}"; - - <% } %> -<% } %> -<% if(activeRecord) { %> - @Override - protected Serializable pkVal() { - <% if(isNotEmpty(keyPropertyName)){ %> - return this.${keyPropertyName}; - <% }else{ %> - return null; - <% } %> - } - -<% } %> -<% if(!entityLombokModel){ %> - @Override - public String toString() { - return "${entity}{" + - <% for(field in table.fields){ %> - <% if(fieldLP.index==0){ %> - "${field.propertyName}=" + ${field.propertyName} + - <% }else{ %> - ", ${field.propertyName}=" + ${field.propertyName} + - <% } %> - <% } %> - "}"; - } -<% } %> -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/mapper.java.btl b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/mapper.java.btl deleted file mode 100644 index 54e41a9..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/mapper.java.btl +++ /dev/null @@ -1,41 +0,0 @@ -package ${package.Mapper}; - -import ${superMapperClassPackage}; -import com.baomidou.mybatisplus.core.metadata.IPage; -import ${package.Entity}.${entity}; -import ${cfg.packageName!}.${package.ModuleName}.param.${entity}Param; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * ${table.comment!}Mapper - * - * @author ${author} - * @since ${date(), 'yyyy-MM-dd HH:mm:ss'} - */ -<% if(kotlin){ %> -interface ${table.mapperName} : ${superMapperClass}<${entity}> -<% }else{ %> -public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List<${entity}> - */ - List<${entity}> selectPageRel(@Param("page") IPage<${entity}> page, - @Param("param") ${entity}Param param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List<${entity}> selectListRel(@Param("param") ${entity}Param param); - -} -<% } %> diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/mapper.xml.btl b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/mapper.xml.btl deleted file mode 100644 index 6786c0d..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/mapper.xml.btl +++ /dev/null @@ -1,96 +0,0 @@ - - - -<% if(enableCache) { %> - - - -<% } %> -<% if(baseResultMap) { %> - - - - <% /** 生成主键排在第一位 **/ %> - <% for(field in table.fields) { %> - <% if(field.keyFlag){ %> - - <% } %> - <% } %> - <% /** 生成公共字段 **/ %> - <% for(field in table.commonFields) { %> - - <% } %> - <% /** 生成普通字段 **/ %> - <% for(field in table.fields) { %> - <% if(!field.keyFlag) { %> - - <% } %> - <% } %> - -<% } %> -<% if(baseColumnList) { %> - - - - <% for(field in table.commonFields) { %> - ${field.columnName}, - <% } %> - ${table.fieldNames} - -<% } %> - - - - SELECT a.* - FROM ${table.name} a - -<% for(field in table.fields) { %> - <% if(field.keyFlag) { %> - <% /** 主键字段 **/ %> - - AND a.${field.name} = #{param.${field.propertyName}} - - <% } else if(field.name == logicDeleteFieldName) { %> - <% /** 逻辑删除字段 **/ %> - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - <% } else if(field.name == 'create_time') { %> - <% /** 创建时间字段 **/ %> - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - <% } else if(array.contain(cfg.paramExcludeFields, field.name)) { %> - <% /** 排除的字段 **/ %> - <% } else if(array.contain(cfg.paramEqType, field.propertyType)) { %> - <% /** 使用EQ的字段 **/ %> - - AND a.${field.name} = #{param.${field.propertyName}} - - <% } else { %> - <% /** 其它类型使用LIKE **/ %> - - AND a.${field.name} LIKE CONCAT('%', #{param.${field.propertyName}}, '%') - - <% } %> -<% } %> - - - - - - - - - - diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/param.java.btl b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/param.java.btl deleted file mode 100644 index 9c30504..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/param.java.btl +++ /dev/null @@ -1,146 +0,0 @@ -package ${cfg.packageName!}.${package.ModuleName}.param; - -import ${cfg.packageName!}.common.core.annotation.QueryField; -import ${cfg.packageName!}.common.core.annotation.QueryType; -import ${cfg.packageName!}.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -<% if(swagger2) { %> -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -<% } %> -<% if(entityLombokModel) { %> -import lombok.Data; -import lombok.EqualsAndHashCode; - <% if(chainModel) { %> -import lombok.experimental.Accessors; - <% } %> -<% } %> - -/** - * ${table.comment!}查询参数 - * - * @author ${author} - * @since ${date(), 'yyyy-MM-dd HH:mm:ss'} - */ -<% if(entityLombokModel) { %> -@Data - <% if(isNotEmpty(superEntityClass)) { %> -@EqualsAndHashCode(callSuper = true) - <% } else { %> -@EqualsAndHashCode(callSuper = false) - <% } %> - <% if(chainModel) { %> -@Accessors(chain = true) - <% } %> -<% } %> -@JsonInclude(JsonInclude.Include.NON_NULL) -<% if(swagger2) { %> -@ApiModel(value = "${entity}Param对象", description = "${table.comment!''}查询参数") -<% } %> -public class ${entity}Param extends BaseParam { -<% if(entitySerialVersionUID) { %> - private static final long serialVersionUID = 1L; -<% } %> -<% /** -----------BEGIN 字段循环遍历----------- **/ %> -<% for(field in table.fields) { %> - <% - var keyPropertyName; - if(field.keyFlag) { - keyPropertyName = field.propertyName; - } - // 排除的字段 - if(array.contain(cfg.paramExcludeFields, field.name)) { - continue; - } - %> - - <% if(isNotEmpty(field.comment)) { %> - <% if(swagger2) { %> - @ApiModelProperty(value = "${field.comment}") - <% }else{ %> - /** - * ${field.comment} - */ - <% } %> - <% } %> - <% /* 主键 */ %> - <% if(field.keyFlag) { %> - @QueryField(type = QueryType.EQ) - <% /* 使用EQ的字段 */ %> - <% } else if(array.contain(cfg.paramEqType, field.propertyType)) { %> - @QueryField(type = QueryType.EQ) - <% } %> - <% /* 使用String类型的字段 */ %> - <% if(array.contain(cfg.paramToStringType, field.propertyType)) { %> - private String ${field.propertyName}; - <% } else { %> - <% /* 普通字段 */ %> - private ${field.propertyType} ${field.propertyName}; - <% } %> -<% } %> -<% /** -----------END 字段循环遍历----------- **/ %> - -<% if(!entityLombokModel) { %> - <% for(field in table.fields) { %> - <% - var getprefix = ''; - if(field.propertyType == 'boolean') { - getprefix = 'is'; - } else { - getprefix = 'get'; - } - // 排除的字段 - if(array.contain(cfg.paramExcludeFields, field.name)) { - continue; - } - %> - <% if(array.contain(cfg.paramToStringType, field.propertyType)) { %> - public String ${getprefix}${field.capitalName}() { - <% } else { %> - public ${field.propertyType} ${getprefix}${field.capitalName}() { - <% } %> - return ${field.propertyName}; - } - - <% if(chainModel) { %> - <% if(array.contain(cfg.paramToStringType, field.propertyType)) { %> - public ${entity} set${field.capitalName}(String ${field.propertyName}) { - <% } else { %> - public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { - <% } %> - <% } else { %> - <% if(array.contain(cfg.paramToStringType, field.propertyType)) { %> - public void set${field.capitalName}(String ${field.propertyName}) { - <% } else { %> - public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { - <% } %> - <% } %> - this.${field.propertyName} = ${field.propertyName}; - <% if(chainModel){ %> - return this; - <% } %> - } - - <% } %> -<% } %> -<% if(!entityLombokModel) { %> - @Override - public String toString() { - return "${entity}{" + - <% for(field in table.fields) { %> - <% - // 排除的字段 - if(array.contain(cfg.paramExcludeFields, field.name)) { - continue; - } - %> - <% if(fieldLP.index == 0) { %> - "${field.propertyName}=" + ${field.propertyName} + - <% } else { %> - ", ${field.propertyName}=" + ${field.propertyName} + - <% } %> - <% } %> - "}"; - } -<% } %> -} diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/service.java.btl b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/service.java.btl deleted file mode 100644 index 67efe6a..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/service.java.btl +++ /dev/null @@ -1,55 +0,0 @@ -<% -var idPropertyName, idComment; -for(field in table.fields) { - if(field.keyFlag) { - idPropertyName = field.propertyName; - idComment = field.comment; - } -} -%> -package ${package.Service}; - -import ${superServiceClassPackage}; -import ${cfg.packageName!}.common.core.web.PageResult; -import ${package.Entity}.${entity}; -import ${cfg.packageName!}.${package.ModuleName}.param.${entity}Param; - -import java.util.List; - -/** - * ${table.comment!}Service - * - * @author ${author} - * @since ${date(), 'yyyy-MM-dd HH:mm:ss'} - */ -<% if(kotlin){ %> -interface ${table.serviceName} : ${superServiceClass}<${entity}> -<% }else{ %> -public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult<${entity}> - */ - PageResult<${entity}> pageRel(${entity}Param param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List<${entity}> - */ - List<${entity}> listRel(${entity}Param param); - - /** - * 根据id查询 - * - * @param ${idPropertyName!} ${idComment!} - * @return ${entity} - */ - ${entity} getByIdRel(Integer ${idPropertyName!}); - -} -<% } %> diff --git a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/serviceImpl.java.btl b/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/serviceImpl.java.btl deleted file mode 100644 index e63a0b9..0000000 --- a/cn.wsdns.file/src/test/java/com/gxwebsoft/generator/templates/serviceImpl.java.btl +++ /dev/null @@ -1,62 +0,0 @@ -<% -var idPropertyName, idCapitalName; -for(field in table.fields) { - if(field.keyFlag) { - idPropertyName = field.propertyName; - idCapitalName = field.capitalName; - } -} -%> -package ${package.ServiceImpl}; - -import ${superServiceImplClassPackage}; -import ${package.Mapper}.${table.mapperName}; -import ${package.Service}.${table.serviceName}; -import ${package.Entity}.${entity}; -import ${cfg.packageName!}.${package.ModuleName}.param.${entity}Param; -import ${cfg.packageName!}.common.core.web.PageParam; -import ${cfg.packageName!}.common.core.web.PageResult; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * ${table.comment!}Service实现 - * - * @author ${author} - * @since ${date(), 'yyyy-MM-dd HH:mm:ss'} - */ -@Service -<% if(kotlin){ %> -open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { - -} -<% }else{ %> -public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { - - @Override - public PageResult<${entity}> pageRel(${entity}Param param) { - PageParam<${entity}, ${entity}Param> page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List<${entity}> list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List<${entity}> listRel(${entity}Param param) { - List<${entity}> list = baseMapper.selectListRel(param); - // 排序 - PageParam<${entity}, ${entity}Param> page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public ${entity} getByIdRel(Integer ${idPropertyName!}) { - ${entity}Param param = new ${entity}Param(); - param.set${idCapitalName!}(${idPropertyName!}); - return param.getOne(baseMapper.selectListRel(param)); - } - -} -<% } %> diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/controller/BcExportController.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/controller/BcExportController.java deleted file mode 100644 index 016adc8..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/controller/BcExportController.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.gxwebsoft.apps.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.apps.service.BcExportService; -import com.gxwebsoft.apps.entity.BcExport; -import com.gxwebsoft.apps.param.BcExportParam; -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.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 报餐统计导出控制器 - * - * @author 科技小王子 - * @since 2023-06-01 21:30:16 - */ -@Api(tags = "报餐统计导出管理") -@RestController -@RequestMapping("/api/apps/bc-export") -public class BcExportController extends BaseController { - @Resource - private BcExportService bcExportService; - - @PreAuthorize("hasAuthority('apps:bcExport:list')") - @OperationLog - @ApiOperation("分页查询报餐统计导出") - @GetMapping("/page") - public ApiResult> page(BcExportParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(bcExportService.page(page, page.getWrapper())); - // 使用关联查询 - //return success(bcExportService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('apps:bcExport:list')") - @OperationLog - @ApiOperation("查询全部报餐统计导出") - @GetMapping() - public ApiResult> list(BcExportParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(bcExportService.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(bcExportService.listRel(param)); - } - - @PreAuthorize("hasAuthority('apps:bcExport:list')") - @OperationLog - @ApiOperation("根据id查询报餐统计导出") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - return success(bcExportService.getById(id)); - // 使用关联查询 - //return success(bcExportService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('apps:bcExport:save')") - @OperationLog - @ApiOperation("添加报餐统计导出") - @PostMapping() - public ApiResult save(@RequestBody BcExport bcExport) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - bcExport.setUserId(loginUser.getUserId()); - } - if (bcExportService.save(bcExport)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('apps:bcExport:update')") - @OperationLog - @ApiOperation("修改报餐统计导出") - @PutMapping() - public ApiResult update(@RequestBody BcExport bcExport) { - if (bcExportService.updateById(bcExport)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('apps:bcExport:remove')") - @OperationLog - @ApiOperation("删除报餐统计导出") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (bcExportService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('apps:bcExport:save')") - @OperationLog - @ApiOperation("批量添加报餐统计导出") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (bcExportService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('apps:bcExport:update')") - @OperationLog - @ApiOperation("批量修改报餐统计导出") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(bcExportService, "export_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('apps:bcExport:remove')") - @OperationLog - @ApiOperation("批量删除报餐统计导出") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (bcExportService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/entity/BcExport.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/entity/BcExport.java deleted file mode 100644 index 3058f3e..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/entity/BcExport.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.gxwebsoft.apps.entity; - -import java.math.BigDecimal; -import com.baomidou.mybatisplus.annotation.TableName; -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 java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 报餐统计导出 - * - * @author 科技小王子 - * @since 2023-06-01 21:30:16 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "BcExport对象", description = "报餐统计导出") -@TableName("apps_bc_export") -public class BcExport implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @TableId(value = "export_id", type = IdType.AUTO) - private Integer exportId; - - @ApiModelProperty(value = "机构名称") - private String organizationName; - - @ApiModelProperty(value = "实际消费的金额(不含退款)") - private BigDecimal expendMoney; - - @ApiModelProperty(value = "早餐报餐次数") - private Integer breakfastPost; - - @ApiModelProperty(value = "早餐签到次数") - private Integer breakfastSign; - - @ApiModelProperty(value = "午餐报餐次数") - private Integer lunchPost; - - @ApiModelProperty(value = "午餐签到次数") - private Integer lunchSign; - - @ApiModelProperty(value = "晚餐报餐次数") - private Integer dinnerPost; - - @ApiModelProperty(value = "晚餐签到次数") - private Integer dinnerSign; - - @ApiModelProperty(value = "商品价格(单价)") - private BigDecimal goodsPrice; - - @ApiModelProperty(value = "发货时间") - private Date deliveryTime; - - @ApiModelProperty(value = "状态, 0待发布, 1已发布") - private Integer status; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "订单号") - private Integer orderId; - - @ApiModelProperty(value = "机构id") - private Integer organizationId; - - @ApiModelProperty(value = "发布人") - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "创建时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/mapper/BcExportMapper.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/mapper/BcExportMapper.java deleted file mode 100644 index c282178..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/mapper/BcExportMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.apps.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.apps.entity.BcExport; -import com.gxwebsoft.apps.param.BcExportParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 报餐统计导出Mapper - * - * @author 科技小王子 - * @since 2023-06-01 21:30:16 - */ -public interface BcExportMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") BcExportParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") BcExportParam param); - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/mapper/xml/BcExportMapper.xml b/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/mapper/xml/BcExportMapper.xml deleted file mode 100644 index 75c3fb8..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/mapper/xml/BcExportMapper.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - SELECT a.* - FROM apps_bc_export a - - - AND a.export_id = #{param.exportId} - - - AND a.organization_name LIKE CONCAT('%', #{param.organizationName}, '%') - - - AND a.expend_money = #{param.expendMoney} - - - AND a.breakfast_post = #{param.breakfastPost} - - - AND a.breakfast_sign = #{param.breakfastSign} - - - AND a.lunch_post = #{param.lunchPost} - - - AND a.lunch_sign = #{param.lunchSign} - - - AND a.dinner_post = #{param.dinnerPost} - - - AND a.dinner_sign = #{param.dinnerSign} - - - AND a.goods_price = #{param.goodsPrice} - - - AND a.delivery_time LIKE CONCAT('%', #{param.deliveryTime}, '%') - - - AND a.status = #{param.status} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.order_id = #{param.orderId} - - - AND a.organization_id = #{param.organizationId} - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/param/BcExportParam.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/param/BcExportParam.java deleted file mode 100644 index 8bd4bcb..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/param/BcExportParam.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.gxwebsoft.apps.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 报餐统计导出查询参数 - * - * @author 科技小王子 - * @since 2023-06-01 21:30:16 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "BcExportParam对象", description = "报餐统计导出查询参数") -public class BcExportParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "自增ID") - @QueryField(type = QueryType.EQ) - private Integer exportId; - - @ApiModelProperty(value = "机构名称") - private String organizationName; - - @ApiModelProperty(value = "实际消费的金额(不含退款)") - @QueryField(type = QueryType.EQ) - private BigDecimal expendMoney; - - @ApiModelProperty(value = "早餐报餐次数") - @QueryField(type = QueryType.EQ) - private Integer breakfastPost; - - @ApiModelProperty(value = "早餐签到次数") - @QueryField(type = QueryType.EQ) - private Integer breakfastSign; - - @ApiModelProperty(value = "午餐报餐次数") - @QueryField(type = QueryType.EQ) - private Integer lunchPost; - - @ApiModelProperty(value = "午餐签到次数") - @QueryField(type = QueryType.EQ) - private Integer lunchSign; - - @ApiModelProperty(value = "晚餐报餐次数") - @QueryField(type = QueryType.EQ) - private Integer dinnerPost; - - @ApiModelProperty(value = "晚餐签到次数") - @QueryField(type = QueryType.EQ) - private Integer dinnerSign; - - @ApiModelProperty(value = "商品价格(单价)") - @QueryField(type = QueryType.EQ) - private BigDecimal goodsPrice; - - @ApiModelProperty(value = "发货时间") - private String deliveryTime; - - @ApiModelProperty(value = "状态, 0待发布, 1已发布") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "订单号") - @QueryField(type = QueryType.EQ) - private Integer orderId; - - @ApiModelProperty(value = "机构id") - @QueryField(type = QueryType.EQ) - private Integer organizationId; - - @ApiModelProperty(value = "发布人") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/service/BcExportService.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/service/BcExportService.java deleted file mode 100644 index e3652c3..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/service/BcExportService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.apps.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.apps.entity.BcExport; -import com.gxwebsoft.apps.param.BcExportParam; - -import java.util.List; - -/** - * 报餐统计导出Service - * - * @author 科技小王子 - * @since 2023-06-01 21:30:16 - */ -public interface BcExportService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(BcExportParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(BcExportParam param); - - /** - * 根据id查询 - * - * @param exportId 自增ID - * @return BcExport - */ - BcExport getByIdRel(Integer exportId); - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/service/impl/BcExportServiceImpl.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/service/impl/BcExportServiceImpl.java deleted file mode 100644 index f40fe57..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/apps/service/impl/BcExportServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.apps.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.apps.mapper.BcExportMapper; -import com.gxwebsoft.apps.service.BcExportService; -import com.gxwebsoft.apps.entity.BcExport; -import com.gxwebsoft.apps.param.BcExportParam; -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 2023-06-01 21:30:16 - */ -@Service -public class BcExportServiceImpl extends ServiceImpl implements BcExportService { - - @Override - public PageResult pageRel(BcExportParam param) { - PageParam page = new PageParam<>(param); - //page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(BcExportParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public BcExport getByIdRel(Integer exportId) { - BcExportParam param = new BcExportParam(); - param.setExportId(exportId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/controller/OrderGoodsController.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/controller/OrderGoodsController.java deleted file mode 100644 index d093d3b..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/controller/OrderGoodsController.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.gxwebsoft.shop.controller; - -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; -import com.gxwebsoft.shop.service.OrderGoodsService; -import com.gxwebsoft.shop.entity.OrderGoods; -import com.gxwebsoft.shop.param.OrderGoodsParam; -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 io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 订单商品记录表控制器 - * - * @author 科技小王子 - * @since 2023-06-01 19:59:26 - */ -@Api(tags = "订单商品记录表管理") -@RestController -@RequestMapping("/api/shop/order-goods") -public class OrderGoodsController extends BaseController { - @Resource - private OrderGoodsService orderGoodsService; - - @PreAuthorize("hasAuthority('shop:orderGoods:list')") - @OperationLog - @ApiOperation("分页查询订单商品记录表") - @GetMapping("/page") - public ApiResult> page(OrderGoodsParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(orderGoodsService.page(page, page.getWrapper())); - // 使用关联查询 - //return success(orderGoodsService.pageRel(param)); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:list')") - @OperationLog - @ApiOperation("查询全部订单商品记录表") - @GetMapping() - public ApiResult> list(OrderGoodsParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - return success(orderGoodsService.list(page.getOrderWrapper())); - // 使用关联查询 - //return success(orderGoodsService.listRel(param)); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:list')") - @OperationLog - @ApiOperation("根据id查询订单商品记录表") - @GetMapping("/{id}") - public ApiResult get(@PathVariable("id") Integer id) { - return success(orderGoodsService.getById(id)); - // 使用关联查询 - //return success(orderGoodsService.getByIdRel(id)); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:save')") - @OperationLog - @ApiOperation("添加订单商品记录表") - @PostMapping() - public ApiResult save(@RequestBody OrderGoods orderGoods) { - // 记录当前登录用户id - User loginUser = getLoginUser(); - if (loginUser != null) { - orderGoods.setUserId(loginUser.getUserId()); - } - if (orderGoodsService.save(orderGoods)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:update')") - @OperationLog - @ApiOperation("修改订单商品记录表") - @PutMapping() - public ApiResult update(@RequestBody OrderGoods orderGoods) { - if (orderGoodsService.updateById(orderGoods)) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:remove')") - @OperationLog - @ApiOperation("删除订单商品记录表") - @DeleteMapping("/{id}") - public ApiResult remove(@PathVariable("id") Integer id) { - if (orderGoodsService.removeById(id)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:save')") - @OperationLog - @ApiOperation("批量添加订单商品记录表") - @PostMapping("/batch") - public ApiResult saveBatch(@RequestBody List list) { - if (orderGoodsService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:update')") - @OperationLog - @ApiOperation("批量修改订单商品记录表") - @PutMapping("/batch") - public ApiResult removeBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(orderGoodsService, "order_goods_id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @PreAuthorize("hasAuthority('shop:orderGoods:remove')") - @OperationLog - @ApiOperation("批量删除订单商品记录表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (orderGoodsService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/entity/OrderGoods.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/entity/OrderGoods.java deleted file mode 100644 index ca873bf..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/entity/OrderGoods.java +++ /dev/null @@ -1,176 +0,0 @@ -package com.gxwebsoft.shop.entity; - -import java.math.BigDecimal; -import com.baomidou.mybatisplus.annotation.TableName; -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 java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 订单商品记录表 - * - * @author 科技小王子 - * @since 2023-06-01 19:59:26 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "OrderGoods对象", description = "订单商品记录表") -@TableName("shop_order_goods") -public class OrderGoods implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "订单商品ID") - @TableId(value = "order_goods_id", type = IdType.AUTO) - private Integer orderGoodsId; - - @ApiModelProperty(value = "商品ID") - private Integer goodsId; - - @ApiModelProperty(value = "商品名称") - private String goodsName; - - @ApiModelProperty(value = "商品封面图") - private String imageUrl; - - @ApiModelProperty(value = "商品封面图ID") - private Integer imageId; - - @ApiModelProperty(value = "商品分类ID") - private Integer categoryId; - - @ApiModelProperty(value = "库存计算方式(10下单减库存 20付款减库存)") - private Integer deductStockType; - - @ApiModelProperty(value = "规格类型(10单规格 20多规格)") - private Integer specType; - - @ApiModelProperty(value = "商品sku唯一标识") - private String goodsSkuId; - - @ApiModelProperty(value = "SKU的规格属性(json格式)") - private String goodsProps; - - @ApiModelProperty(value = "商品详情") - private String content; - - @ApiModelProperty(value = "商品编码") - private String goodsNo; - - @ApiModelProperty(value = "商品价格(单价)") - private BigDecimal goodsPrice; - - @ApiModelProperty(value = "商品划线价") - private BigDecimal linePrice; - - @ApiModelProperty(value = "商品重量(Kg)") - private Double goodsWeight; - - @ApiModelProperty(value = "是否存在会员等级折扣") - private Integer isUserGrade; - - @ApiModelProperty(value = "会员折扣比例(0-10)") - private Integer gradeRatio; - - @ApiModelProperty(value = "会员折扣的商品单价") - private BigDecimal gradeGoodsPrice; - - @ApiModelProperty(value = "会员折扣的总额差") - private BigDecimal gradeTotalMoney; - - @ApiModelProperty(value = "优惠券折扣金额") - private BigDecimal couponMoney; - - @ApiModelProperty(value = "积分金额") - private BigDecimal pointsMoney; - - @ApiModelProperty(value = "积分抵扣数量") - private Integer pointsNum; - - @ApiModelProperty(value = "赠送的积分数量") - private Integer pointsBonus; - - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") - private Integer payStatus; - - @ApiModelProperty(value = "购买数量") - private Integer totalNum; - - @ApiModelProperty(value = "商品总价(数量×单价)") - private BigDecimal totalPrice; - - @ApiModelProperty(value = "实际付款价(折扣和优惠后)") - private BigDecimal totalPayPrice; - - @ApiModelProperty(value = "发货状态(10未发货 20已发货 30部分发货)") - private Integer deliveryStatus; - - @ApiModelProperty(value = "已发货数量") - private Integer deliveryNum; - - @ApiModelProperty(value = "发货时间") - private Date deliveryTime; - - @ApiModelProperty(value = "是否开启单独分销(0关闭 1开启)") - private Integer isIndDealer; - - @ApiModelProperty(value = "分销佣金类型(10百分比 20固定金额)") - private Integer dealerMoneyType; - - @ApiModelProperty(value = "分销佣金(一级)") - private BigDecimal firstMoney; - - @ApiModelProperty(value = "分销佣金(二级)") - private BigDecimal secondMoney; - - @ApiModelProperty(value = "分销佣金(三级)") - private BigDecimal thirdMoney; - - @ApiModelProperty(value = "是否已评价(0否 1是)") - private Integer isComment; - - @ApiModelProperty(value = "档口 10 食堂档口 20 物品档口 ") - private String gear; - - @ApiModelProperty(value = "订单ID") - private Integer orderId; - - @ApiModelProperty(value = "用户ID") - private Integer userId; - - @ApiModelProperty(value = "来源记录ID") - private Integer goodsSourceId; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @TableLogic - private Integer deleted; - - @ApiModelProperty(value = "商户编码") - private String merchantCode; - - @ApiModelProperty(value = "租户id") - private Integer tenantId; - - @ApiModelProperty(value = "注册时间") - private Date createTime; - - @ApiModelProperty(value = "修改时间") - private Date updateTime; - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/mapper/OrderGoodsMapper.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/mapper/OrderGoodsMapper.java deleted file mode 100644 index 5c76b59..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/mapper/OrderGoodsMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.shop.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.shop.entity.OrderGoods; -import com.gxwebsoft.shop.param.OrderGoodsParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 订单商品记录表Mapper - * - * @author 科技小王子 - * @since 2023-06-01 19:59:26 - */ -public interface OrderGoodsMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") OrderGoodsParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") OrderGoodsParam param); - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderGoodsMapper.xml b/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderGoodsMapper.xml deleted file mode 100644 index b16b6a7..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/mapper/xml/OrderGoodsMapper.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - SELECT a.* - FROM shop_order_goods a - - - AND a.order_goods_id = #{param.orderGoodsId} - - - AND a.goods_id = #{param.goodsId} - - - AND a.goods_name LIKE CONCAT('%', #{param.goodsName}, '%') - - - AND a.image_url LIKE CONCAT('%', #{param.imageUrl}, '%') - - - AND a.image_id = #{param.imageId} - - - AND a.category_id = #{param.categoryId} - - - AND a.deduct_stock_type = #{param.deductStockType} - - - AND a.spec_type = #{param.specType} - - - AND a.goods_sku_id LIKE CONCAT('%', #{param.goodsSkuId}, '%') - - - AND a.goods_props LIKE CONCAT('%', #{param.goodsProps}, '%') - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') - - - AND a.goods_no LIKE CONCAT('%', #{param.goodsNo}, '%') - - - AND a.goods_price = #{param.goodsPrice} - - - AND a.line_price = #{param.linePrice} - - - AND a.goods_weight LIKE CONCAT('%', #{param.goodsWeight}, '%') - - - AND a.is_user_grade = #{param.isUserGrade} - - - AND a.grade_ratio = #{param.gradeRatio} - - - AND a.grade_goods_price = #{param.gradeGoodsPrice} - - - AND a.grade_total_money = #{param.gradeTotalMoney} - - - AND a.coupon_money = #{param.couponMoney} - - - AND a.points_money = #{param.pointsMoney} - - - AND a.points_num = #{param.pointsNum} - - - AND a.points_bonus = #{param.pointsBonus} - - - AND a.pay_status = #{param.payStatus} - - - AND a.total_num = #{param.totalNum} - - - AND a.total_price = #{param.totalPrice} - - - AND a.total_pay_price = #{param.totalPayPrice} - - - AND a.delivery_status = #{param.deliveryStatus} - - - AND a.delivery_num = #{param.deliveryNum} - - - AND a.is_ind_dealer = #{param.isIndDealer} - - - AND a.dealer_money_type = #{param.dealerMoneyType} - - - AND a.first_money = #{param.firstMoney} - - - AND a.second_money = #{param.secondMoney} - - - AND a.third_money = #{param.thirdMoney} - - - AND a.is_comment = #{param.isComment} - - - AND a.gear LIKE CONCAT('%', #{param.gear}, '%') - - - AND a.order_id = #{param.orderId} - - - AND a.user_id = #{param.userId} - - - AND a.goods_source_id = #{param.goodsSourceId} - - - AND a.sort_number = #{param.sortNumber} - - - AND a.comments LIKE CONCAT('%', #{param.comments}, '%') - - - AND a.status = #{param.status} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%') - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - - - - - - - - - diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/param/OrderGoodsParam.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/param/OrderGoodsParam.java deleted file mode 100644 index 6030781..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/param/OrderGoodsParam.java +++ /dev/null @@ -1,197 +0,0 @@ -package com.gxwebsoft.shop.param; - -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.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 订单商品记录表查询参数 - * - * @author 科技小王子 - * @since 2023-06-01 19:59:26 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "OrderGoodsParam对象", description = "订单商品记录表查询参数") -public class OrderGoodsParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "订单商品ID") - @QueryField(type = QueryType.EQ) - private Integer orderGoodsId; - - @ApiModelProperty(value = "商品ID") - @QueryField(type = QueryType.EQ) - private Integer goodsId; - - @ApiModelProperty(value = "商品名称") - private String goodsName; - - @ApiModelProperty(value = "商品封面图") - private String imageUrl; - - @ApiModelProperty(value = "商品封面图ID") - @QueryField(type = QueryType.EQ) - private Integer imageId; - - @ApiModelProperty(value = "商品分类ID") - @QueryField(type = QueryType.EQ) - private Integer categoryId; - - @ApiModelProperty(value = "库存计算方式(10下单减库存 20付款减库存)") - @QueryField(type = QueryType.EQ) - private Integer deductStockType; - - @ApiModelProperty(value = "规格类型(10单规格 20多规格)") - @QueryField(type = QueryType.EQ) - private Integer specType; - - @ApiModelProperty(value = "商品sku唯一标识") - private String goodsSkuId; - - @ApiModelProperty(value = "SKU的规格属性(json格式)") - private String goodsProps; - - @ApiModelProperty(value = "商品详情") - private String content; - - @ApiModelProperty(value = "商品编码") - private String goodsNo; - - @ApiModelProperty(value = "商品价格(单价)") - @QueryField(type = QueryType.EQ) - private BigDecimal goodsPrice; - - @ApiModelProperty(value = "商品划线价") - @QueryField(type = QueryType.EQ) - private BigDecimal linePrice; - - @ApiModelProperty(value = "商品重量(Kg)") - private Double goodsWeight; - - @ApiModelProperty(value = "是否存在会员等级折扣") - @QueryField(type = QueryType.EQ) - private Integer isUserGrade; - - @ApiModelProperty(value = "会员折扣比例(0-10)") - @QueryField(type = QueryType.EQ) - private Integer gradeRatio; - - @ApiModelProperty(value = "会员折扣的商品单价") - @QueryField(type = QueryType.EQ) - private BigDecimal gradeGoodsPrice; - - @ApiModelProperty(value = "会员折扣的总额差") - @QueryField(type = QueryType.EQ) - private BigDecimal gradeTotalMoney; - - @ApiModelProperty(value = "优惠券折扣金额") - @QueryField(type = QueryType.EQ) - private BigDecimal couponMoney; - - @ApiModelProperty(value = "积分金额") - @QueryField(type = QueryType.EQ) - private BigDecimal pointsMoney; - - @ApiModelProperty(value = "积分抵扣数量") - @QueryField(type = QueryType.EQ) - private Integer pointsNum; - - @ApiModelProperty(value = "赠送的积分数量") - @QueryField(type = QueryType.EQ) - private Integer pointsBonus; - - @ApiModelProperty(value = "付款状态(10未付款 20已付款)") - @QueryField(type = QueryType.EQ) - private Integer payStatus; - - @ApiModelProperty(value = "购买数量") - @QueryField(type = QueryType.EQ) - private Integer totalNum; - - @ApiModelProperty(value = "商品总价(数量×单价)") - @QueryField(type = QueryType.EQ) - private BigDecimal totalPrice; - - @ApiModelProperty(value = "实际付款价(折扣和优惠后)") - @QueryField(type = QueryType.EQ) - private BigDecimal totalPayPrice; - - @ApiModelProperty(value = "发货状态(10未发货 20已发货 30部分发货)") - @QueryField(type = QueryType.EQ) - private Integer deliveryStatus; - - @ApiModelProperty(value = "已发货数量") - @QueryField(type = QueryType.EQ) - private Integer deliveryNum; - - @ApiModelProperty(value = "预定日期") - @QueryField(type = QueryType.EQ) - private String deliveryTime; - - @ApiModelProperty(value = "是否开启单独分销(0关闭 1开启)") - @QueryField(type = QueryType.EQ) - private Integer isIndDealer; - - @ApiModelProperty(value = "分销佣金类型(10百分比 20固定金额)") - @QueryField(type = QueryType.EQ) - private Integer dealerMoneyType; - - @ApiModelProperty(value = "分销佣金(一级)") - @QueryField(type = QueryType.EQ) - private BigDecimal firstMoney; - - @ApiModelProperty(value = "分销佣金(二级)") - @QueryField(type = QueryType.EQ) - private BigDecimal secondMoney; - - @ApiModelProperty(value = "分销佣金(三级)") - @QueryField(type = QueryType.EQ) - private BigDecimal thirdMoney; - - @ApiModelProperty(value = "是否已评价(0否 1是)") - @QueryField(type = QueryType.EQ) - private Integer isComment; - - @ApiModelProperty(value = "档口 10 食堂档口 20 物品档口 ") - private String gear; - - @ApiModelProperty(value = "订单ID") - @QueryField(type = QueryType.EQ) - private Integer orderId; - - @ApiModelProperty(value = "用户ID") - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "来源记录ID") - @QueryField(type = QueryType.EQ) - private Integer goodsSourceId; - - @ApiModelProperty(value = "排序(数字越小越靠前)") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @ApiModelProperty(value = "备注") - private String comments; - - @ApiModelProperty(value = "状态, 0正常, 1冻结") - @QueryField(type = QueryType.EQ) - private Integer status; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - - @ApiModelProperty(value = "商户编码") - private String merchantCode; - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/service/OrderGoodsService.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/service/OrderGoodsService.java deleted file mode 100644 index 62be2c7..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/service/OrderGoodsService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.shop.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.shop.entity.OrderGoods; -import com.gxwebsoft.shop.param.OrderGoodsParam; - -import java.util.List; - -/** - * 订单商品记录表Service - * - * @author 科技小王子 - * @since 2023-06-01 19:59:26 - */ -public interface OrderGoodsService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(OrderGoodsParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(OrderGoodsParam param); - - /** - * 根据id查询 - * - * @param orderGoodsId 订单商品ID - * @return OrderGoods - */ - OrderGoods getByIdRel(Integer orderGoodsId); - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/service/impl/OrderGoodsServiceImpl.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/service/impl/OrderGoodsServiceImpl.java deleted file mode 100644 index 892ebe4..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/shop/service/impl/OrderGoodsServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.shop.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.shop.mapper.OrderGoodsMapper; -import com.gxwebsoft.shop.service.OrderGoodsService; -import com.gxwebsoft.shop.entity.OrderGoods; -import com.gxwebsoft.shop.param.OrderGoodsParam; -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 2023-06-01 19:59:26 - */ -@Service -public class OrderGoodsServiceImpl extends ServiceImpl implements OrderGoodsService { - - @Override - public PageResult pageRel(OrderGoodsParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("update_time asc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(OrderGoodsParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - //page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public OrderGoods getByIdRel(Integer orderGoodsId) { - OrderGoodsParam param = new OrderGoodsParam(); - param.setOrderGoodsId(orderGoodsId); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/task/OrderSettledTask.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/task/OrderSettledTask.java deleted file mode 100644 index 2f9544a..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/task/OrderSettledTask.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.gxwebsoft.task; - -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.gxwebsoft.apps.entity.BcExport; -import com.gxwebsoft.apps.service.BcExportService; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.shop.entity.Order; -import com.gxwebsoft.shop.entity.OrderGoods; -import com.gxwebsoft.shop.param.OrderGoodsParam; -import com.gxwebsoft.shop.param.OrderParam; -import com.gxwebsoft.shop.service.OrderGoodsService; -import com.gxwebsoft.shop.service.OrderService; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; - -import static com.gxwebsoft.common.core.constants.OrderConstants.DELIVERY_STATUS_YES; - -/** - * 订单结算任务 - * - * @author 科技小王子 - * @since 2023-05-30 03:28:53 - */ -@RestController -public class OrderSettledTask extends BaseController { - @Resource - private OrderService orderService; - @Resource - private OrderGoodsService orderGoodsService; - @Resource - private BcExportService bcExportService; - - /** - * 执行结算任务 - */ - @Scheduled(cron = "0/5 * * * * ?") - public void run(){ - // 订单结算任务 -// orderSettledTask(); - } - - @Transactional(rollbackFor = {Exception.class}) - public void orderSettledTask(){ - - System.out.println("**** 订单结算任务 开始被执行 ****"); - final OrderParam param = new OrderParam(); - param.setIsSettled(0); - param.setLimit(5L); - final PageResult result = orderService.pageRel(param); - System.out.println("getCount = " + result.getCount()); - System.out.println("result.getCount() = " + result.getList()); - result.getList().forEach(d->{ - System.out.println("*********** 循环开始 ************"); - - int breakfastPost = orderGoodsService.count(new LambdaQueryWrapper().eq(OrderGoods::getUserId,d.getUserId()).eq(OrderGoods::getDeliveryTime,d.getDeliveryTime()).eq(OrderGoods::getCategoryId,25)); - int breakfastSign = orderGoodsService.count(new LambdaQueryWrapper().eq(OrderGoods::getUserId,d.getUserId()).eq(OrderGoods::getDeliveryTime,d.getDeliveryTime()).eq(OrderGoods::getDeliveryStatus,DELIVERY_STATUS_YES).eq(OrderGoods::getCategoryId,25)); - int lunchPost = orderGoodsService.count(new LambdaQueryWrapper().eq(OrderGoods::getUserId,d.getUserId()).eq(OrderGoods::getDeliveryTime,d.getDeliveryTime()).eq(OrderGoods::getCategoryId,26)); - int lunchSign = orderGoodsService.count(new LambdaQueryWrapper().eq(OrderGoods::getUserId,d.getUserId()).eq(OrderGoods::getDeliveryTime,d.getDeliveryTime()).eq(OrderGoods::getDeliveryStatus,DELIVERY_STATUS_YES).eq(OrderGoods::getCategoryId,26)); - int dinnerPost = orderGoodsService.count(new LambdaQueryWrapper().eq(OrderGoods::getUserId,d.getUserId()).eq(OrderGoods::getDeliveryTime,d.getDeliveryTime()).eq(OrderGoods::getCategoryId,27)); - int dinnerSign = orderGoodsService.count(new LambdaQueryWrapper().eq(OrderGoods::getUserId,d.getUserId()).eq(OrderGoods::getDeliveryTime,d.getDeliveryTime()).eq(OrderGoods::getDeliveryStatus,DELIVERY_STATUS_YES).eq(OrderGoods::getCategoryId,27)); - - System.out.println("订单ID = " + d.getOrderId()); - System.out.println("用户ID = " + d.getUserId()); - System.out.println("昵称 = " + d.getNickname()); - System.out.println("早餐报餐次数 = " + breakfastPost); - System.out.println("早餐签到次数 = " + breakfastSign); - System.out.println("午餐报餐次数 = " + lunchPost); - System.out.println("午餐签到次数 = " + lunchSign); - System.out.println("晚餐报餐次数 = " + dinnerPost); - System.out.println("晚餐签到次数 = " + dinnerSign); - - final BcExport bcExport = new BcExport(); - bcExport.setOrderId(d.getOrderId()); - bcExport.setUserId(d.getUserId()); - bcExport.setOrganizationId(d.getOrganizationId()); - bcExport.setOrganizationName(d.getOrganizationName()); - bcExport.setTenantId(d.getTenantId()); - bcExport.setDeliveryTime(d.getDeliveryTime()); - bcExport.setExpendMoney(d.getTotalPrice()); - bcExport.setBreakfastPost(breakfastPost); - bcExport.setBreakfastSign(breakfastSign); - bcExport.setLunchPost(lunchPost); - bcExport.setLunchSign(lunchSign); - bcExport.setDinnerPost(dinnerPost); - bcExport.setDinnerSign(dinnerSign); - System.out.println("bcExport = " + bcExport); - bcExportService.save(bcExport); - // 更新订单结算状态 - final Order order = new Order(); - order.setOrderId(d.getOrderId()); - order.setIsSettled(1); - order.setSettledTime(DateUtil.date()); - System.out.println("订单信息 = " + order); - orderService.updateById(order); - System.out.println("************ 循环结束 ***********"); - }); - } - - -} diff --git a/cn.wsdns.task/src/main/java/com/gxwebsoft/task/SyncOrderGoodsTask.java b/cn.wsdns.task/src/main/java/com/gxwebsoft/task/SyncOrderGoodsTask.java deleted file mode 100644 index cf5864e..0000000 --- a/cn.wsdns.task/src/main/java/com/gxwebsoft/task/SyncOrderGoodsTask.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.gxwebsoft.task; - -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.shop.entity.Order; -import com.gxwebsoft.shop.entity.OrderGoods; -import com.gxwebsoft.shop.param.OrderGoodsParam; -import com.gxwebsoft.shop.param.OrderParam; -import com.gxwebsoft.shop.service.OrderGoodsService; -import com.gxwebsoft.shop.service.OrderService; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; -import java.util.ArrayList; - -/** - * 订单结算任务 - * - * @author 科技小王子 - * @since 2023-05-30 03:28:53 - */ -@RestController -public class SyncOrderGoodsTask extends BaseController { - @Resource - private OrderService orderService; - @Resource - private OrderGoodsService orderGoodsService; - - /** - * 执行任务 - */ - @Transactional(rollbackFor = {Exception.class}) - @Scheduled(cron = "0/30 * * * * ?") - public void run(){ - // 同步订单报餐时间到订单商品表 -// syncOrderGoodsTask(); - } - - public void syncOrderGoodsTask() { - System.out.println("**** 同步订单发货时间到商品表 开始被执行 ****"); - final OrderGoodsParam param = new OrderGoodsParam(); - param.setLimit(10L); - final PageResult result = orderGoodsService.pageRel(param); - final ArrayList arrayList = new ArrayList<>(); - result.getList().forEach(d -> { - System.out.println("*********** 循环开始 ************"); - - System.out.println("订单ID = " + d.getOrderId()); - final Order one = orderService.getById(d.getOrderId()); - final OrderGoods goods = new OrderGoods(); - if(one != null){ - goods.setOrderGoodsId(d.getOrderGoodsId()); - goods.setDeliveryTime(one.getDeliveryTime()); - goods.setUpdateTime(DateUtil.date()); -// orderGoodsService.updateById(goods); - arrayList.add(goods); - } - System.out.println("************ 循环结束 ***********"); - }); - System.out.println("arrayList = " + arrayList.size()); - final boolean batch = orderGoodsService.updateBatchById(arrayList); - System.out.println("执行结果 = " + batch); - } - -} diff --git a/cn.wsdns.task/src/test/java/com/gxwebsoft/generator/AppsGenerator.java b/cn.wsdns.task/src/test/java/com/gxwebsoft/generator/AppsGenerator.java deleted file mode 100644 index d120443..0000000 --- a/cn.wsdns.task/src/test/java/com/gxwebsoft/generator/AppsGenerator.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.gxwebsoft.generator; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.core.toolkit.StringPool; -import com.baomidou.mybatisplus.generator.AutoGenerator; -import com.baomidou.mybatisplus.generator.InjectionConfig; -import com.baomidou.mybatisplus.generator.config.*; -import com.baomidou.mybatisplus.generator.config.po.TableInfo; -import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; -import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 代码生成工具 - * - * @author WebSoft - * @since 2021-09-05 00:31:14 - */ -public class AppsGenerator { - // 输出位置 - private static final String OUTPUT_LOCATION = System.getProperty("user.dir"); - //private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径 - // 输出目录 - private static final String OUTPUT_DIR = "/src/main/java"; - // 作者名称 - private static final String AUTHOR = "科技小王子"; - // 是否在xml中添加二级缓存配置 - private static final boolean ENABLE_CACHE = false; - // 数据库连接配置 - private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; - private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; - private static final String DB_USERNAME = "com_gxwebsoft_oa"; - private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw"; - // 包名 - private static final String PACKAGE_NAME = "com.gxwebsoft"; - // 模块名 - private static final String MODULE_NAME = "apps"; - // 需要生成的表 - private static final String[] TABLE_NAMES = new String[]{ -// "apps_equipment", -// "apps_equipment_fault", -// "apps_equipment_alarm", -// "apps_equipment_record" -// "apps_equipment_order" -// "apps_cashier", -// "apps_hualala_card", -// "apps_hualala_card_benefits", -// "apps_hualala_food", -// "apps_hualala_shop", -// "apps_hualala_cart_food", -// "apps_hualala_food_category", -// "apps_test_data", -// "apps_link", -// "apps_bc_agent", -// "apps_bc_temporary", -// "apps_link", -// "apps_bc_plan", -// "apps_bc_food", -// "apps_bc_equipment", -// "apps_bc_cookbook" - "apps_bc_export" -// "apps_equipment_order_goods" - - }; - // 需要去除的表前缀 - private static final String[] TABLE_PREFIX = new String[]{ - "apps_", - "tb_" - }; - // 不需要作为查询参数的字段 - private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{ - "tenant_id", - "create_time", - "update_time" - }; - // 查询参数使用String的类型 - private static final String[] PARAM_TO_STRING_TYPE = new String[]{ - "Date", - "LocalDate", - "LocalTime", - "LocalDateTime" - }; - // 查询参数使用EQ的类型 - private static final String[] PARAM_EQ_TYPE = new String[]{ - "Integer", - "Boolean", - "BigDecimal" - }; - // 是否添加权限注解 - private static final boolean AUTH_ANNOTATION = true; - // 是否添加日志注解 - private static final boolean LOG_ANNOTATION = true; - // controller的mapping前缀 - private static final String CONTROLLER_MAPPING_PREFIX = "/api"; - // 模板所在位置 - private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates"; - - public static void main(String[] args) { - // 代码生成器 - AutoGenerator mpg = new AutoGenerator(); - - // 全局配置 - GlobalConfig gc = new GlobalConfig(); - gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR); - gc.setAuthor(AUTHOR); - gc.setOpen(false); - gc.setFileOverride(true); - gc.setEnableCache(ENABLE_CACHE); - gc.setSwagger2(true); - gc.setIdType(IdType.AUTO); - gc.setServiceName("%sService"); - mpg.setGlobalConfig(gc); - - // 数据源配置 - DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl(DB_URL); - // dsc.setSchemaName("public"); - dsc.setDriverName(DB_DRIVER); - dsc.setUsername(DB_USERNAME); - dsc.setPassword(DB_PASSWORD); - mpg.setDataSource(dsc); - - // 包配置 - PackageConfig pc = new PackageConfig(); - pc.setModuleName(MODULE_NAME); - pc.setParent(PACKAGE_NAME); - mpg.setPackageInfo(pc); - - // 策略配置 - StrategyConfig strategy = new StrategyConfig(); - strategy.setNaming(NamingStrategy.underline_to_camel); - strategy.setColumnNaming(NamingStrategy.underline_to_camel); - strategy.setInclude(TABLE_NAMES); - strategy.setTablePrefix(TABLE_PREFIX); - strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController"); - strategy.setEntityLombokModel(true); - strategy.setRestControllerStyle(true); - strategy.setControllerMappingHyphenStyle(true); - strategy.setLogicDeleteFieldName("deleted"); - mpg.setStrategy(strategy); - - // 模板配置 - TemplateConfig templateConfig = new TemplateConfig(); - templateConfig.setController(TEMPLATES_DIR + "/controller.java"); - templateConfig.setEntity(TEMPLATES_DIR + "/entity.java"); - templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java"); - templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml"); - templateConfig.setService(TEMPLATES_DIR + "/service.java"); - templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java"); - mpg.setTemplate(templateConfig); - mpg.setTemplateEngine(new BeetlTemplateEnginePlus()); - - // 自定义模板配置 - InjectionConfig cfg = new InjectionConfig() { - @Override - public void initMap() { - Map map = new HashMap<>(); - map.put("packageName", PACKAGE_NAME); - map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS); - map.put("paramToStringType", PARAM_TO_STRING_TYPE); - map.put("paramEqType", PARAM_EQ_TYPE); - map.put("authAnnotation", AUTH_ANNOTATION); - map.put("logAnnotation", LOG_ANNOTATION); - map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX); - this.setMap(map); - } - }; - String templatePath = TEMPLATES_DIR + "/param.java.btl"; - List focList = new ArrayList<>(); - focList.add(new FileOutConfig(templatePath) { - @Override - public String outputFile(TableInfo tableInfo) { - return OUTPUT_LOCATION + OUTPUT_DIR + "/" - + PACKAGE_NAME.replace(".", "/") - + "/" + pc.getModuleName() + "/param/" - + tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA; - } - }); - cfg.setFileOutConfigList(focList); - mpg.setCfg(cfg); - - mpg.execute(); - } - -}