新增充值订单结算任务
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
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<PageResult<Company>> page(CompanyParam param) {
|
||||||
|
// PageParam<Company, CompanyParam> 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<Company>> list(CompanyParam param) {
|
||||||
|
// PageParam<Company, CompanyParam> 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<Company> 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<Company> list) {
|
||||||
|
if (companyService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('sys:company:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改企业信息")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<Company> 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<Integer> ids) {
|
||||||
|
if (companyService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('sys:company:profile')")
|
||||||
|
@ApiOperation("根据id查询企业信息")
|
||||||
|
@GetMapping("/profile")
|
||||||
|
public ApiResult<Company> profile() {
|
||||||
|
// 使用关联查询
|
||||||
|
final Company company = companyService.getByTenantIdRel(getTenantId());
|
||||||
|
try {
|
||||||
|
company.setUsers(userService.count(new LambdaQueryWrapper<User>().gt(User::getOrganizationId, 0)));
|
||||||
|
companyService.updateById(company);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return success(company);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,243 @@
|
|||||||
|
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<AppUser> 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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.gxwebsoft.oa.entity;
|
package com.gxwebsoft.common.system.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
@@ -12,57 +12,49 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户
|
* 系统设置
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author WebSoft
|
||||||
* @since 2022-11-17 17:13:39
|
* @since 2022-11-19 13:54:27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value = "Tenant对象", description = "租户")
|
@ApiModel(value = "Setting对象", description = "系统设置")
|
||||||
@TableName("sys_tenant")
|
@TableName("sys_setting")
|
||||||
public class Tenant implements Serializable {
|
public class Setting implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "租户id")
|
@ApiModelProperty(value = "id")
|
||||||
@TableId(value = "tenant_id", type = IdType.AUTO)
|
@TableId(value = "setting_id", type = IdType.AUTO)
|
||||||
private Integer tenantId;
|
private Integer settingId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "租户名称")
|
@ApiModelProperty(value = "设置项标示")
|
||||||
private String tenantName;
|
private String settingKey;
|
||||||
|
|
||||||
@ApiModelProperty(value = "绑定的手机号码")
|
@ApiModelProperty(value = "设置内容(json格式)")
|
||||||
@TableField(exist = false)
|
private String content;
|
||||||
private String phone;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "绑定的邮箱")
|
@ApiModelProperty(value = "排序号")
|
||||||
@TableField(exist = false)
|
private Integer sortNumber;
|
||||||
private String email;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
||||||
@ApiModelProperty(value = "所属客户")
|
|
||||||
private Integer customerId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户ID")
|
|
||||||
private Integer userId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "修改时间")
|
@ApiModelProperty(value = "修改时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "初始密码")
|
@ApiModelProperty(value = "修改租户名称")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String password;
|
private String tenantName;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<Company> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Company>
|
||||||
|
*/
|
||||||
|
List<Company> selectPageRel(@Param("page") IPage<Company> page,
|
||||||
|
@Param("param") CompanyParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<Company> selectListRel(@Param("param") CompanyParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package com.gxwebsoft.oa.mapper;
|
package com.gxwebsoft.common.system.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.gxwebsoft.oa.entity.Tenant;
|
import com.gxwebsoft.common.system.entity.Tenant;
|
||||||
import com.gxwebsoft.oa.param.TenantParam;
|
import com.gxwebsoft.common.system.param.TenantParam;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -11,7 +12,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 租户Mapper
|
* 租户Mapper
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author WebSoft
|
||||||
* @since 2022-11-17 17:13:39
|
* @since 2022-11-17 17:13:39
|
||||||
*/
|
*/
|
||||||
public interface TenantMapper extends BaseMapper<Tenant> {
|
public interface TenantMapper extends BaseMapper<Tenant> {
|
||||||
@@ -23,6 +24,7 @@ public interface TenantMapper extends BaseMapper<Tenant> {
|
|||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return List<Tenant>
|
* @return List<Tenant>
|
||||||
*/
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
List<Tenant> selectPageRel(@Param("page") IPage<Tenant> page,
|
List<Tenant> selectPageRel(@Param("page") IPage<Tenant> page,
|
||||||
@Param("param") TenantParam param);
|
@Param("param") TenantParam param);
|
||||||
|
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.common.system.mapper.CompanyMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
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
|
||||||
|
<where>
|
||||||
|
<if test="param.companyId != null">
|
||||||
|
AND a.company_id = #{param.companyId}
|
||||||
|
</if>
|
||||||
|
<if test="param.shortName != null">
|
||||||
|
AND a.short_name LIKE CONCAT('%', #{param.shortName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.companyName != null">
|
||||||
|
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.companyType != null">
|
||||||
|
AND a.company_type = #{param.companyType}
|
||||||
|
</if>
|
||||||
|
<if test="param.companyLogo != null">
|
||||||
|
AND a.company_logo LIKE CONCAT('%', #{param.companyLogo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.domain != null">
|
||||||
|
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.phone != null">
|
||||||
|
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.invoiceHeader != null">
|
||||||
|
AND a.Invoice_header LIKE CONCAT('%', #{param.invoiceHeader}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.startTime != null">
|
||||||
|
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.expirationTime != null">
|
||||||
|
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.version != null">
|
||||||
|
AND a.version = #{param.version}
|
||||||
|
</if>
|
||||||
|
<if test="param.members != null">
|
||||||
|
AND a.members = #{param.members}
|
||||||
|
</if>
|
||||||
|
<if test="param.industryParent != null">
|
||||||
|
AND a.industry_parent LIKE CONCAT('%', #{param.industryParent}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.industryChild != null">
|
||||||
|
AND a.industry_child LIKE CONCAT('%', #{param.industryChild}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.departments != null">
|
||||||
|
AND a.departments = #{param.departments}
|
||||||
|
</if>
|
||||||
|
<if test="param.country != null">
|
||||||
|
AND a.country LIKE CONCAT('%', #{param.country}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.province != null">
|
||||||
|
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.city != null">
|
||||||
|
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.region != null">
|
||||||
|
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.address != null">
|
||||||
|
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.longitude != null">
|
||||||
|
AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.latitude != null">
|
||||||
|
AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.authentication != null">
|
||||||
|
AND a.authentication = #{param.authentication}
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.company_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
OR a.tenant_id = #{param.keywords}
|
||||||
|
OR a.domain = #{param.keywords}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Company">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.gxwebsoft.oa.mapper.TenantMapper">
|
<mapper namespace="com.gxwebsoft.common.system.mapper.TenantMapper">
|
||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*
|
SELECT a.*,
|
||||||
|
b.company_id,
|
||||||
|
b.company_name
|
||||||
FROM sys_tenant a
|
FROM sys_tenant a
|
||||||
|
LEFT JOIN sys_company b ON a.tenant_id = b.tenant_id
|
||||||
<where>
|
<where>
|
||||||
<if test="param.tenantId != null">
|
<if test="param.tenantId != null">
|
||||||
AND a.tenant_id = #{param.tenantId}
|
AND a.tenant_id = #{param.tenantId}
|
||||||
@@ -13,6 +16,9 @@
|
|||||||
<if test="param.tenantName != null">
|
<if test="param.tenantName != null">
|
||||||
AND a.tenant_name LIKE CONCAT('%', #{param.tenantName}, '%')
|
AND a.tenant_name LIKE CONCAT('%', #{param.tenantName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.appId != null">
|
||||||
|
AND a.app_id = #{param.appId}
|
||||||
|
</if>
|
||||||
<if test="param.comments != null">
|
<if test="param.comments != null">
|
||||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
</if>
|
</if>
|
||||||
@@ -31,16 +37,19 @@
|
|||||||
<if test="param.createTimeEnd != null">
|
<if test="param.createTimeEnd != null">
|
||||||
AND a.create_time <= #{param.createTimeEnd}
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.companyName != null">
|
||||||
|
AND b.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 分页查询 -->
|
<!-- 分页查询 -->
|
||||||
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.Tenant">
|
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.Tenant">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询全部 -->
|
<!-- 查询全部 -->
|
||||||
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.Tenant">
|
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.Tenant">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.gxwebsoft.oa.param;
|
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.QueryField;
|
||||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
import com.gxwebsoft.common.core.web.BaseParam;
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -12,7 +15,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
/**
|
/**
|
||||||
* 租户查询参数
|
* 租户查询参数
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author WebSoft
|
||||||
* @since 2022-11-17 17:13:39
|
* @since 2022-11-17 17:13:39
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@@ -22,17 +25,32 @@ import lombok.EqualsAndHashCode;
|
|||||||
public class TenantParam extends BaseParam {
|
public class TenantParam extends BaseParam {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("租户ID")
|
||||||
|
@TableId(value = "tenant_id", type = IdType.AUTO)
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "租户名称")
|
@ApiModelProperty(value = "租户名称")
|
||||||
private String tenantName;
|
private String tenantName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "初始密码")
|
@ApiModelProperty(value = "初始密码")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "应用ID")
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "应用密钥")
|
||||||
|
private String appSecret;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
||||||
@ApiModelProperty(value = "客户ID")
|
@ApiModelProperty(value = "客户ID")
|
||||||
private Integer customerId;
|
@TableField(exist = false)
|
||||||
|
private Integer companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态")
|
@ApiModelProperty(value = "状态")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
@@ -42,4 +60,12 @@ public class TenantParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户名称")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@ApiModelProperty("租户编号")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String tenantCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
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<Company> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<Company>
|
||||||
|
*/
|
||||||
|
PageResult<Company> pageRel(CompanyParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Company>
|
||||||
|
*/
|
||||||
|
List<Company> listRel(CompanyParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param companyId 企业id
|
||||||
|
* @return Company
|
||||||
|
*/
|
||||||
|
Company getByIdRel(Integer companyId);
|
||||||
|
|
||||||
|
Company getByTenantIdRel(Integer tenantId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
package com.gxwebsoft.oa.service;
|
package com.gxwebsoft.common.system.service;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
import com.gxwebsoft.oa.entity.Tenant;
|
import com.gxwebsoft.common.system.entity.Tenant;
|
||||||
import com.gxwebsoft.oa.param.TenantParam;
|
import com.gxwebsoft.common.system.param.TenantParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户Service
|
* 租户Service
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author WebSoft
|
||||||
* @since 2022-11-17 17:13:39
|
* @since 2022-11-17 17:13:39
|
||||||
*/
|
*/
|
||||||
public interface TenantService extends IService<Tenant> {
|
public interface TenantService extends IService<Tenant> {
|
||||||
@@ -31,12 +32,14 @@ public interface TenantService extends IService<Tenant> {
|
|||||||
*/
|
*/
|
||||||
List<Tenant> listRel(TenantParam param);
|
List<Tenant> listRel(TenantParam param);
|
||||||
|
|
||||||
|
Integer getByUserId(Integer userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询
|
* 根据id查询
|
||||||
*
|
*
|
||||||
* @param tenantId 租户id
|
* @param tenantId 租户id
|
||||||
* @return Tenant
|
* @return Tenant
|
||||||
*/
|
*/
|
||||||
// Tenant getByIdRel(Integer tenantId);
|
Tenant getByIdRel(Integer tenantId);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
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<CompanyMapper, Company> implements CompanyService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<Company> pageRel(CompanyParam param) {
|
||||||
|
PageParam<Company, CompanyParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<Company> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Company> listRel(CompanyParam param) {
|
||||||
|
List<Company> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<Company, CompanyParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
package com.gxwebsoft.oa.service.impl;
|
package com.gxwebsoft.common.system.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.gxwebsoft.oa.mapper.TenantMapper;
|
|
||||||
import com.gxwebsoft.oa.service.TenantService;
|
|
||||||
import com.gxwebsoft.oa.entity.Tenant;
|
|
||||||
import com.gxwebsoft.oa.param.TenantParam;
|
|
||||||
import com.gxwebsoft.common.core.web.PageParam;
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
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 org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -14,7 +15,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 租户Service实现
|
* 租户Service实现
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author WebSoft
|
||||||
* @since 2022-11-17 17:13:39
|
* @since 2022-11-17 17:13:39
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@@ -23,7 +24,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
|||||||
@Override
|
@Override
|
||||||
public PageResult<Tenant> pageRel(TenantParam param) {
|
public PageResult<Tenant> pageRel(TenantParam param) {
|
||||||
PageParam<Tenant, TenantParam> page = new PageParam<>(param);
|
PageParam<Tenant, TenantParam> page = new PageParam<>(param);
|
||||||
//page.setDefaultOrder("create_time desc");
|
page.setDefaultOrder("create_time desc");
|
||||||
List<Tenant> list = baseMapper.selectPageRel(page, param);
|
List<Tenant> list = baseMapper.selectPageRel(page, param);
|
||||||
return new PageResult<>(list, page.getTotal());
|
return new PageResult<>(list, page.getTotal());
|
||||||
}
|
}
|
||||||
@@ -37,11 +38,17 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
|||||||
return page.sortRecords(list);
|
return page.sortRecords(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public Tenant getByIdRel(Integer tenantId) {
|
public Integer getByUserId(Integer userId) {
|
||||||
// TenantParam param = new TenantParam();
|
Tenant tenant = query().eq("user_id", userId).one();
|
||||||
// param.setTenantId(tenantId);
|
return tenant.getTenantId();
|
||||||
// return param.getOne(baseMapper.selectListRel(param));
|
}
|
||||||
// }
|
|
||||||
|
@Override
|
||||||
|
public Tenant getByIdRel(Integer tenantId) {
|
||||||
|
TenantParam param = new TenantParam();
|
||||||
|
param.setTenantId(tenantId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
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<PageResult<UserPlan>> page(UserPlanParam param) {
|
||||||
|
PageParam<UserPlan, UserPlanParam> 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<UserPlan>> list(UserPlanParam param) {
|
||||||
|
PageParam<UserPlan, UserPlanParam> 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<UserPlan> 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<UserPlan> list) {
|
||||||
|
if (userPlanService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userPlan:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改会员套餐管理表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserPlan> 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<Integer> ids) {
|
||||||
|
if (userPlanService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
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<PageResult<UserPlanEquity>> page(UserPlanEquityParam param) {
|
||||||
|
PageParam<UserPlanEquity, UserPlanEquityParam> 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<UserPlanEquity>> list(UserPlanEquityParam param) {
|
||||||
|
PageParam<UserPlanEquity, UserPlanEquityParam> 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<UserPlanEquity> 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<UserPlanEquity> list) {
|
||||||
|
if (userPlanEquityService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userPlanEquity:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改会员套餐管理表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserPlanEquity> 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<Integer> ids) {
|
||||||
|
if (userPlanEquityService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
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<PageResult<UserPlanLog>> page(UserPlanLogParam param) {
|
||||||
|
PageParam<UserPlanLog, UserPlanLogParam> 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<UserPlanLog>> list(UserPlanLogParam param) {
|
||||||
|
PageParam<UserPlanLog, UserPlanLogParam> 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<UserPlanLog> 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<UserPlanLog> list) {
|
||||||
|
if (userPlanLogService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userPlanLog:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改会员特权购买记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserPlanLog> 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<Integer> ids) {
|
||||||
|
if (userPlanLogService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
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<PageResult<UserPlanPrice>> page(UserPlanPriceParam param) {
|
||||||
|
PageParam<UserPlanPrice, UserPlanPriceParam> 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<UserPlanPrice>> list(UserPlanPriceParam param) {
|
||||||
|
PageParam<UserPlanPrice, UserPlanPriceParam> 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<UserPlanPrice> 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<UserPlanPrice> list) {
|
||||||
|
if (userPlanPriceService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userPlanPrice:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改会员套餐定价表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserPlanPrice> batchParam) {
|
||||||
|
if (batchParam.update(userPlanPriceService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userPlanPrice:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量删除会员套餐定价表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (userPlanPriceService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
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<PageResult<UserProfile>> 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<UserProfile> 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<UserProfile>> list(UserProfileParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(userProfileService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('sys:auth:user')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("根据会员id查询详细资料")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<UserProfile> get(@PathVariable("id") Integer id) {
|
||||||
|
final User loginUser = getLoginUser();
|
||||||
|
final UserProfileParam userProfileParam = new UserProfileParam();
|
||||||
|
userProfileParam.setUserId(loginUser.getUserId());
|
||||||
|
final List<UserProfile> 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<UserProfile> list) {
|
||||||
|
if (userProfileService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userProfile:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改会员资料表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserProfile> batchParam) {
|
||||||
|
if (batchParam.update(userProfileService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userProfile:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量删除会员资料表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (userProfileService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('love:userProfile:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("根据会员id查询详细资料")
|
||||||
|
@GetMapping("/detail/{id}")
|
||||||
|
public ApiResult<UserProfile> detail(@PathVariable("id") Integer id) {
|
||||||
|
final UserProfileParam param = new UserProfileParam();
|
||||||
|
param.setUserId(id);
|
||||||
|
final List<UserProfile> 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.gxwebsoft.cms.entity;
|
package com.gxwebsoft.love.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
@@ -14,33 +14,33 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章分类表
|
* 会员套餐管理表
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 12:11:38
|
* @since 2023-06-23 03:05:44
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value = "Category对象", description = "文章分类表")
|
@ApiModel(value = "UserPlan对象", description = "会员套餐管理表")
|
||||||
@TableName("cms_category")
|
@TableName("love_user_plan")
|
||||||
public class Category implements Serializable {
|
public class UserPlan implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "文章分类ID")
|
@ApiModelProperty(value = "套餐ID")
|
||||||
@TableId(value = "category_id", type = IdType.AUTO)
|
@TableId(value = "plan_id", type = IdType.AUTO)
|
||||||
private Integer categoryId;
|
private Integer planId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分类名称")
|
@ApiModelProperty(value = "套餐名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "上级分类ID")
|
@ApiModelProperty(value = "套餐卖点")
|
||||||
private Integer parentId;
|
private String subName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户ID")
|
@ApiModelProperty(value = "获得的会员身份")
|
||||||
private Integer userId;
|
private Integer roleId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "所属门店ID")
|
@ApiModelProperty(value = "图标")
|
||||||
private Integer shopId;
|
private String icon;
|
||||||
|
|
||||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
private Integer sortNumber;
|
private Integer sortNumber;
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.gxwebsoft.shop.entity;
|
package com.gxwebsoft.love.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -14,51 +14,44 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商城管理表
|
* 会员套餐定价表
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-17 15:14:05
|
* @since 2023-06-23 03:05:44
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value = "Store对象", description = "商城管理表")
|
@ApiModel(value = "UserPlanPrice对象", description = "会员套餐定价表")
|
||||||
@TableName("shop_store")
|
@TableName("love_user_plan_price")
|
||||||
public class Store implements Serializable {
|
public class UserPlanPrice implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商户ID")
|
@ApiModelProperty(value = "ID")
|
||||||
@TableId(value = "store_id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Integer storeId;
|
private Integer id;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商户名称")
|
@ApiModelProperty(value = "套餐ID")
|
||||||
private String storeName;
|
private Integer planId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商户全称")
|
@ApiModelProperty(value = "项目名称")
|
||||||
private String fullName;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "LOGO")
|
@ApiModelProperty(value = "价格")
|
||||||
private String logo;
|
private BigDecimal price;
|
||||||
|
|
||||||
@ApiModelProperty(value = "描述")
|
|
||||||
private String comments;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
private Integer sortNumber;
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
|
||||||
@TableLogic
|
|
||||||
private Integer deleted;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "租户id")
|
@ApiModelProperty(value = "租户id")
|
||||||
private Integer tenantId;
|
private Integer tenantId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "注册时间")
|
@ApiModelProperty(value = "注册时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "修改时间")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<UserPlanEquity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlanEquity>
|
||||||
|
*/
|
||||||
|
List<UserPlanEquity> selectPageRel(@Param("page") IPage<UserPlanEquity> page,
|
||||||
|
@Param("param") UserPlanEquityParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<UserPlanEquity> selectListRel(@Param("param") UserPlanEquityParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<UserPlanLog> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlanLog>
|
||||||
|
*/
|
||||||
|
List<UserPlanLog> selectPageRel(@Param("page") IPage<UserPlanLog> page,
|
||||||
|
@Param("param") UserPlanLogParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<UserPlanLog> selectListRel(@Param("param") UserPlanLogParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<UserPlan> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlan>
|
||||||
|
*/
|
||||||
|
List<UserPlan> selectPageRel(@Param("page") IPage<UserPlan> page,
|
||||||
|
@Param("param") UserPlanParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<UserPlan> selectListRel(@Param("param") UserPlanParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<UserPlanPrice> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlanPrice>
|
||||||
|
*/
|
||||||
|
List<UserPlanPrice> selectPageRel(@Param("page") IPage<UserPlanPrice> page,
|
||||||
|
@Param("param") UserPlanPriceParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<UserPlanPrice> selectListRel(@Param("param") UserPlanPriceParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<UserProfile> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserProfile>
|
||||||
|
*/
|
||||||
|
List<UserProfile> selectPageRel(@Param("page") IPage<UserProfile> page,
|
||||||
|
@Param("param") UserProfileParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<UserProfile> selectListRel(@Param("param") UserProfileParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.love.mapper.UserPlanEquityMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM love_user_plan_equity a
|
||||||
|
<where>
|
||||||
|
<if test="param.planEquityId != null">
|
||||||
|
AND a.plan_equity_id = #{param.planEquityId}
|
||||||
|
</if>
|
||||||
|
<if test="param.planId != null">
|
||||||
|
AND a.plan_id = #{param.planId}
|
||||||
|
</if>
|
||||||
|
<if test="param.planName != null">
|
||||||
|
AND a.plan_name LIKE CONCAT('%', #{param.planName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.expirationTime != null">
|
||||||
|
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlanEquity">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlanEquity">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -1,44 +1,48 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.gxwebsoft.cms.mapper.ArticleMapper">
|
<mapper namespace="com.gxwebsoft.love.mapper.UserPlanLogMapper">
|
||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*
|
SELECT a.*,b.name as planName,b.role_id
|
||||||
FROM cms_article a
|
FROM love_user_plan_log a
|
||||||
|
LEFT JOIN love_user_plan b ON a.plan_id = b.plan_id
|
||||||
<where>
|
<where>
|
||||||
<if test="param.articleId != null">
|
<if test="param.logId != null">
|
||||||
AND a.article_id = #{param.articleId}
|
AND a.log_id = #{param.logId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.title != null">
|
<if test="param.logNo != null">
|
||||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
AND a.log_no LIKE CONCAT('%', #{param.logNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.showType != null">
|
<if test="param.money != null">
|
||||||
AND a.show_type = #{param.showType}
|
AND a.money = #{param.money}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.categoryId != null">
|
<if test="param.payPrice != null">
|
||||||
AND a.category_id = #{param.categoryId}
|
AND a.pay_price = #{param.payPrice}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.avatar != null">
|
<if test="param.planId != null">
|
||||||
AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%')
|
AND a.plan_id = #{param.planId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.source != null">
|
<if test="param.priceId != null">
|
||||||
AND a.source LIKE CONCAT('%', #{param.source}, '%')
|
AND a.price_id = #{param.priceId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.content != null">
|
<if test="param.priceName != null">
|
||||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
AND a.price_name LIKE CONCAT('%', #{param.priceName}, '%')
|
||||||
</if>
|
|
||||||
<if test="param.virtualViews != null">
|
|
||||||
AND a.virtual_views = #{param.virtualViews}
|
|
||||||
</if>
|
|
||||||
<if test="param.actualViews != null">
|
|
||||||
AND a.actual_views = #{param.actualViews}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="param.userId != null">
|
<if test="param.userId != null">
|
||||||
AND a.user_id = #{param.userId}
|
AND a.user_id = #{param.userId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.shopId != null">
|
<if test="param.payTime != null">
|
||||||
AND a.shop_id = #{param.shopId}
|
AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.payStatus != null">
|
||||||
|
AND a.pay_status = #{param.payStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.expirationTime != null">
|
||||||
|
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.isSettled != null">
|
||||||
|
AND a.is_settled = #{param.isSettled}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.sortNumber != null">
|
<if test="param.sortNumber != null">
|
||||||
AND a.sort_number = #{param.sortNumber}
|
AND a.sort_number = #{param.sortNumber}
|
||||||
@@ -65,12 +69,12 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 分页查询 -->
|
<!-- 分页查询 -->
|
||||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.Article">
|
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlanLog">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询全部 -->
|
<!-- 查询全部 -->
|
||||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.Article">
|
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlanLog">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.gxwebsoft.cms.mapper.CategoryMapper">
|
<mapper namespace="com.gxwebsoft.love.mapper.UserPlanMapper">
|
||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*
|
SELECT a.*
|
||||||
FROM cms_category a
|
FROM love_user_plan a
|
||||||
<where>
|
<where>
|
||||||
<if test="param.categoryId != null">
|
<if test="param.planId != null">
|
||||||
AND a.category_id = #{param.categoryId}
|
AND a.plan_id = #{param.planId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.name != null">
|
<if test="param.name != null">
|
||||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.parentId != null">
|
<if test="param.subName != null">
|
||||||
AND a.parent_id = #{param.parentId}
|
AND a.sub_name LIKE CONCAT('%', #{param.subName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.userId != null">
|
<if test="param.roleId != null">
|
||||||
AND a.user_id = #{param.userId}
|
AND a.role_id = #{param.roleId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.shopId != null">
|
<if test="param.icon != null">
|
||||||
AND a.shop_id = #{param.shopId}
|
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.sortNumber != null">
|
<if test="param.sortNumber != null">
|
||||||
AND a.sort_number = #{param.sortNumber}
|
AND a.sort_number = #{param.sortNumber}
|
||||||
@@ -47,12 +47,12 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 分页查询 -->
|
<!-- 分页查询 -->
|
||||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.Category">
|
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlan">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询全部 -->
|
<!-- 查询全部 -->
|
||||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.Category">
|
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlan">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -1,36 +1,33 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.gxwebsoft.shop.mapper.StoreMapper">
|
<mapper namespace="com.gxwebsoft.love.mapper.UserPlanPriceMapper">
|
||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*
|
SELECT a.*
|
||||||
FROM shop_store a
|
FROM love_user_plan_price a
|
||||||
<where>
|
<where>
|
||||||
<if test="param.storeId != null">
|
<if test="param.id != null">
|
||||||
AND a.store_id = #{param.storeId}
|
AND a.id = #{param.id}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.storeName != null">
|
<if test="param.planId != null">
|
||||||
AND a.store_name LIKE CONCAT('%', #{param.storeName}, '%')
|
AND a.plan_id = #{param.planId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.logo != null">
|
<if test="param.name != null">
|
||||||
AND a.logo LIKE CONCAT('%', #{param.logo}, '%')
|
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.comments != null">
|
<if test="param.price != null">
|
||||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
AND a.price = #{param.price}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.sortNumber != null">
|
<if test="param.sortNumber != null">
|
||||||
AND a.sort_number = #{param.sortNumber}
|
AND a.sort_number = #{param.sortNumber}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
<if test="param.status != null">
|
<if test="param.status != null">
|
||||||
AND a.status = #{param.status}
|
AND a.status = #{param.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.deleted != null">
|
|
||||||
AND a.deleted = #{param.deleted}
|
|
||||||
</if>
|
|
||||||
<if test="param.deleted == null">
|
|
||||||
AND a.deleted = 0
|
|
||||||
</if>
|
|
||||||
<if test="param.createTimeStart != null">
|
<if test="param.createTimeStart != null">
|
||||||
AND a.create_time >= #{param.createTimeStart}
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
</if>
|
</if>
|
||||||
@@ -41,12 +38,12 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 分页查询 -->
|
<!-- 分页查询 -->
|
||||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Store">
|
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlanPrice">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询全部 -->
|
<!-- 查询全部 -->
|
||||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Store">
|
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlanPrice">
|
||||||
<include refid="selectSql"></include>
|
<include refid="selectSql"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.love.mapper.UserProfileMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*,b.nickname
|
||||||
|
FROM love_user_profile a
|
||||||
|
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.interest != null">
|
||||||
|
AND a.interest LIKE CONCAT('%', #{param.interest}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.height != null">
|
||||||
|
AND a.height LIKE CONCAT('%', #{param.height}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.monthlyPay != null">
|
||||||
|
AND a.monthly_pay LIKE CONCAT('%', #{param.monthlyPay}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.education != null">
|
||||||
|
AND a.education LIKE CONCAT('%', #{param.education}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.vocation != null">
|
||||||
|
AND a.vocation LIKE CONCAT('%', #{param.vocation}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.maritalStatus != null">
|
||||||
|
AND a.marital_status LIKE CONCAT('%', #{param.maritalStatus}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hasChildren != null">
|
||||||
|
AND a.has_children LIKE CONCAT('%', #{param.hasChildren}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.haveChild != null">
|
||||||
|
AND a.have_child LIKE CONCAT('%', #{param.haveChild}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.position != null">
|
||||||
|
AND a.position LIKE CONCAT('%', #{param.position}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.weight != null">
|
||||||
|
AND a.weight LIKE CONCAT('%', #{param.weight}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hasCar != null">
|
||||||
|
AND a.has_car LIKE CONCAT('%', #{param.hasCar}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.whenMarried != null">
|
||||||
|
AND a.when_married LIKE CONCAT('%', #{param.whenMarried}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.ageMate != null">
|
||||||
|
AND a.age_mate LIKE CONCAT('%', #{param.ageMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.heightMate != null">
|
||||||
|
AND a.height_mate LIKE CONCAT('%', #{param.heightMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.monthlyPayMate != null">
|
||||||
|
AND a.monthly_pay_mate LIKE CONCAT('%', #{param.monthlyPayMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.regionMate != null">
|
||||||
|
AND a.region_mate LIKE CONCAT('%', #{param.regionMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.country != null">
|
||||||
|
AND a.country LIKE CONCAT('%', #{param.country}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.province != null">
|
||||||
|
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.city != null">
|
||||||
|
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.region != null">
|
||||||
|
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.area != null">
|
||||||
|
AND a.area LIKE CONCAT('%', #{param.area}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.provinceMate != null">
|
||||||
|
AND a.province_mate LIKE CONCAT('%', #{param.provinceMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.cityMate != null">
|
||||||
|
AND a.city_mate LIKE CONCAT('%', #{param.cityMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.regionMate != null">
|
||||||
|
AND a.region_mate LIKE CONCAT('%', #{param.regionMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.areaMate != null">
|
||||||
|
AND a.area_mate LIKE CONCAT('%', #{param.areaMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.educationMate != null">
|
||||||
|
AND a.education_mate LIKE CONCAT('%', #{param.educationMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.maritalStatusMate != null">
|
||||||
|
AND a.marital_status_mate LIKE CONCAT('%', #{param.maritalStatusMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hasChildrenMate != null">
|
||||||
|
AND a.has_children_mate LIKE CONCAT('%', #{param.hasChildrenMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.haveChildMate != null">
|
||||||
|
AND a.have_child_mate LIKE CONCAT('%', #{param.haveChildMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.vocationMate != null">
|
||||||
|
AND a.vocation_mate LIKE CONCAT('%', #{param.vocationMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.weightMate != null">
|
||||||
|
AND a.weight_mate LIKE CONCAT('%', #{param.weightMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.shapeMate != null">
|
||||||
|
AND a.shape_mate LIKE CONCAT('%', #{param.shapeMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.isSmokingMate != null">
|
||||||
|
AND a.is_smoking_mate LIKE CONCAT('%', #{param.isSmokingMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.isDrinkMate != null">
|
||||||
|
AND a.is_drink_mate LIKE CONCAT('%', #{param.isDrinkMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hasCarMate != null">
|
||||||
|
AND a.has_car_mate LIKE CONCAT('%', #{param.hasCarMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hasHouseMate != null">
|
||||||
|
AND a.has_house_mate LIKE CONCAT('%', #{param.hasHouseMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.whenMarriedMate != null">
|
||||||
|
AND a.when_married_mate LIKE CONCAT('%', #{param.whenMarriedMate}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.recommend != null">
|
||||||
|
AND a.recommend = 1
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (
|
||||||
|
b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
OR a.age_mate = #{param.keywords}
|
||||||
|
OR a.user_id = #{param.keywords}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserProfile">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserProfile">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.gxwebsoft.cms.param;
|
package com.gxwebsoft.love.param;
|
||||||
|
|
||||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
@@ -9,58 +9,64 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章记录表查询参数
|
* 会员特权购买记录表查询参数
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:40:27
|
* @since 2023-06-23 03:05:44
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@ApiModel(value = "ArticleParam对象", description = "文章记录表查询参数")
|
@ApiModel(value = "UserPlanLogParam对象", description = "会员特权购买记录表查询参数")
|
||||||
public class ArticleParam extends BaseParam {
|
public class UserPlanLogParam extends BaseParam {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "文章ID")
|
@ApiModelProperty(value = "ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer articleId;
|
private Integer logId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "文章标题")
|
@ApiModelProperty(value = "订单号")
|
||||||
private String title;
|
private String logNo;
|
||||||
|
|
||||||
@ApiModelProperty(value = "列表显示方式(10小图展示 20大图展示)")
|
@ApiModelProperty(value = "付款金额")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer showType;
|
private BigDecimal money;
|
||||||
|
|
||||||
@ApiModelProperty(value = "文章分类ID")
|
@ApiModelProperty(value = "实际付款金额(包含运费)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer categoryId;
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
@ApiModelProperty(value = "封面图ID")
|
@ApiModelProperty(value = "套餐ID")
|
||||||
private String avatar;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "来源")
|
|
||||||
private String source;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "文章内容")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "虚拟阅读量(仅用作展示)")
|
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer virtualViews;
|
private Integer planId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "实际阅读量")
|
@ApiModelProperty(value = "卡ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer actualViews;
|
private Integer priceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "卡名称")
|
||||||
|
private String priceName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户ID")
|
@ApiModelProperty(value = "用户ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "所属门店ID")
|
@ApiModelProperty(value = "付款时间")
|
||||||
|
private String payTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "付款状态(10未付款 20已付款)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer shopId;
|
private Integer payStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "到期时间")
|
||||||
|
private String expirationTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isSettled;
|
||||||
|
|
||||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.gxwebsoft.cms.param;
|
package com.gxwebsoft.love.param;
|
||||||
|
|
||||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
@@ -10,36 +10,34 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章分类表查询参数
|
* 会员套餐管理表查询参数
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 12:11:38
|
* @since 2023-06-23 03:05:44
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@ApiModel(value = "CategoryParam对象", description = "文章分类表查询参数")
|
@ApiModel(value = "UserPlanParam对象", description = "会员套餐管理表查询参数")
|
||||||
public class CategoryParam extends BaseParam {
|
public class UserPlanParam extends BaseParam {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "文章分类ID")
|
@ApiModelProperty(value = "套餐ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer categoryId;
|
private Integer planId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分类名称")
|
@ApiModelProperty(value = "套餐名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "上级分类ID")
|
@ApiModelProperty(value = "套餐卖点")
|
||||||
@QueryField(type = QueryType.EQ)
|
private String subName;
|
||||||
private Integer parentId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户ID")
|
@ApiModelProperty(value = "获得的会员身份")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer userId;
|
private Integer roleId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "所属门店ID")
|
@ApiModelProperty(value = "图标")
|
||||||
@QueryField(type = QueryType.EQ)
|
private String icon;
|
||||||
private Integer shopId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.gxwebsoft.shop.param;
|
package com.gxwebsoft.love.param;
|
||||||
|
|
||||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
@@ -9,42 +9,45 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商城管理表查询参数
|
* 会员套餐定价表查询参数
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-17 15:14:05
|
* @since 2023-06-23 03:05:44
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@ApiModel(value = "StoreParam对象", description = "商城管理表查询参数")
|
@ApiModel(value = "UserPlanPriceParam对象", description = "会员套餐定价表查询参数")
|
||||||
public class StoreParam extends BaseParam {
|
public class UserPlanPriceParam extends BaseParam {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商户ID")
|
@ApiModelProperty(value = "ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer storeId;
|
private Integer id;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商户名称")
|
@ApiModelProperty(value = "套餐ID")
|
||||||
private String storeName;
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer planId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "LOGO")
|
@ApiModelProperty(value = "项目名称")
|
||||||
private String logo;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "描述")
|
@ApiModelProperty(value = "价格")
|
||||||
private String comments;
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer sortNumber;
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
|
||||||
@QueryField(type = QueryType.EQ)
|
|
||||||
private Integer deleted;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<UserPlanEquity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<UserPlanEquity>
|
||||||
|
*/
|
||||||
|
PageResult<UserPlanEquity> pageRel(UserPlanEquityParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlanEquity>
|
||||||
|
*/
|
||||||
|
List<UserPlanEquity> listRel(UserPlanEquityParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param planEquityId 权益ID
|
||||||
|
* @return UserPlanEquity
|
||||||
|
*/
|
||||||
|
UserPlanEquity getByIdRel(Integer planEquityId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<UserPlanLog> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<UserPlanLog>
|
||||||
|
*/
|
||||||
|
PageResult<UserPlanLog> pageRel(UserPlanLogParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlanLog>
|
||||||
|
*/
|
||||||
|
List<UserPlanLog> listRel(UserPlanLogParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param logId ID
|
||||||
|
* @return UserPlanLog
|
||||||
|
*/
|
||||||
|
UserPlanLog getByIdRel(Integer logId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<UserPlanPrice> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<UserPlanPrice>
|
||||||
|
*/
|
||||||
|
PageResult<UserPlanPrice> pageRel(UserPlanPriceParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlanPrice>
|
||||||
|
*/
|
||||||
|
List<UserPlanPrice> listRel(UserPlanPriceParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return UserPlanPrice
|
||||||
|
*/
|
||||||
|
UserPlanPrice getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<UserPlan> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<UserPlan>
|
||||||
|
*/
|
||||||
|
PageResult<UserPlan> pageRel(UserPlanParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserPlan>
|
||||||
|
*/
|
||||||
|
List<UserPlan> listRel(UserPlanParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param planId 套餐ID
|
||||||
|
* @return UserPlan
|
||||||
|
*/
|
||||||
|
UserPlan getByIdRel(Integer planId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<UserProfile> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<UserProfile>
|
||||||
|
*/
|
||||||
|
PageResult<UserProfile> pageRel(UserProfileParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<UserProfile>
|
||||||
|
*/
|
||||||
|
List<UserProfile> listRel(UserProfileParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 自增ID
|
||||||
|
* @return UserProfile
|
||||||
|
*/
|
||||||
|
UserProfile getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<UserPlanEquityMapper, UserPlanEquity> implements UserPlanEquityService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<UserPlanEquity> pageRel(UserPlanEquityParam param) {
|
||||||
|
PageParam<UserPlanEquity, UserPlanEquityParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<UserPlanEquity> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserPlanEquity> listRel(UserPlanEquityParam param) {
|
||||||
|
List<UserPlanEquity> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<UserPlanEquity, UserPlanEquityParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<UserPlanLogMapper, UserPlanLog> implements UserPlanLogService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<UserPlanLog> pageRel(UserPlanLogParam param) {
|
||||||
|
PageParam<UserPlanLog, UserPlanLogParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<UserPlanLog> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserPlanLog> listRel(UserPlanLogParam param) {
|
||||||
|
List<UserPlanLog> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<UserPlanLog, UserPlanLogParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<UserPlanPriceMapper, UserPlanPrice> implements UserPlanPriceService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<UserPlanPrice> pageRel(UserPlanPriceParam param) {
|
||||||
|
PageParam<UserPlanPrice, UserPlanPriceParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<UserPlanPrice> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserPlanPrice> listRel(UserPlanPriceParam param) {
|
||||||
|
List<UserPlanPrice> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<UserPlanPrice, UserPlanPriceParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<UserPlanMapper, UserPlan> implements UserPlanService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<UserPlan> pageRel(UserPlanParam param) {
|
||||||
|
PageParam<UserPlan, UserPlanParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<UserPlan> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserPlan> listRel(UserPlanParam param) {
|
||||||
|
List<UserPlan> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<UserPlan, UserPlanParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
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<UserProfileMapper, UserProfile> implements UserProfileService {
|
||||||
|
@Resource
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<UserProfile> pageRel(UserProfileParam param) {
|
||||||
|
PageParam<UserProfile, UserProfileParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<UserProfile> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserProfile> listRel(UserProfileParam param) {
|
||||||
|
List<UserProfile> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<UserProfile, UserProfileParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
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<UserPlanLog> 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<UserRole>()
|
||||||
|
.eq(UserRole::getUserId,d.getUserId())
|
||||||
|
.eq(UserRole::getRoleId,d.getRoleId())) == 0
|
||||||
|
) {
|
||||||
|
// 查找超级管理员ID
|
||||||
|
final Role superAdmin = roleService.getOne(new LambdaQueryWrapper<Role>()
|
||||||
|
.eq(Role::getRoleCode, "superAdmin")
|
||||||
|
.eq(Role::getTenantId,d.getTenantId()));
|
||||||
|
final Role exclusive = roleService.getOne(new LambdaQueryWrapper<Role>()
|
||||||
|
.eq(Role::getRoleCode, "exclusive")
|
||||||
|
.eq(Role::getTenantId,d.getTenantId()));
|
||||||
|
final Integer AdminRoleId = superAdmin.getRoleId();
|
||||||
|
final Integer ExclusiveRoleId = exclusive.getRoleId();
|
||||||
|
// 删除超管外的角色
|
||||||
|
userRoleService.remove(new LambdaQueryWrapper<UserRole>()
|
||||||
|
.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<UserPlanEquity> 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<Merchant>().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<Merchant>()
|
||||||
|
.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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
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<PageResult<AppUser>> page(AppUserParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(appUserService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('oa:appUser:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("查询全部应用成员")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<AppUser>> 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<AppUser> 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<AppUser>()
|
||||||
|
.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<AppUser> list) {
|
||||||
|
if (appUserService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('oa:appUser:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改应用成员")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<AppUser> 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<Integer> ids) {
|
||||||
|
if (appUserService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
243
cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/App.java
Normal file
243
cn.wsdns.file/src/main/java/com/gxwebsoft/oa/entity/App.java
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
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<AppUser> 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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,29 +2,29 @@ package com.gxwebsoft.oa.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.gxwebsoft.oa.entity.Customer;
|
import com.gxwebsoft.oa.entity.App;
|
||||||
import com.gxwebsoft.oa.param.CustomerParam;
|
import com.gxwebsoft.oa.param.AppParam;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户管理记录表Mapper
|
* 应用管理记录表Mapper
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:16:14
|
* @since 2023-03-28 10:45:39
|
||||||
*/
|
*/
|
||||||
public interface CustomerMapper extends BaseMapper<Customer> {
|
public interface AppMapper extends BaseMapper<App> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*
|
*
|
||||||
* @param page 分页对象
|
* @param page 分页对象
|
||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return List<Customer>
|
* @return List<App>
|
||||||
*/
|
*/
|
||||||
List<Customer> selectPageRel(@Param("page") IPage<Customer> page,
|
List<App> selectPageRel(@Param("page") IPage<App> page,
|
||||||
@Param("param") CustomerParam param);
|
@Param("param") AppParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -32,6 +32,7 @@ public interface CustomerMapper extends BaseMapper<Customer> {
|
|||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return List<User>
|
* @return List<User>
|
||||||
*/
|
*/
|
||||||
List<Customer> selectListRel(@Param("param") CustomerParam param);
|
List<App> selectListRel(@Param("param") AppParam param);
|
||||||
|
|
||||||
|
List<App> pageRel(@Param("param") AppParam param);
|
||||||
}
|
}
|
||||||
@@ -2,29 +2,29 @@ package com.gxwebsoft.oa.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.gxwebsoft.oa.entity.Project;
|
import com.gxwebsoft.oa.entity.AppUser;
|
||||||
import com.gxwebsoft.oa.param.ProjectParam;
|
import com.gxwebsoft.oa.param.AppUserParam;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目管理表Mapper
|
* 应用成员Mapper
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:00:43
|
* @since 2023-05-31 13:18:55
|
||||||
*/
|
*/
|
||||||
public interface ProjectMapper extends BaseMapper<Project> {
|
public interface AppUserMapper extends BaseMapper<AppUser> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*
|
*
|
||||||
* @param page 分页对象
|
* @param page 分页对象
|
||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return List<Project>
|
* @return List<AppUser>
|
||||||
*/
|
*/
|
||||||
List<Project> selectPageRel(@Param("page") IPage<Project> page,
|
List<AppUser> selectPageRel(@Param("page") IPage<AppUser> page,
|
||||||
@Param("param") ProjectParam param);
|
@Param("param") AppUserParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -32,6 +32,6 @@ public interface ProjectMapper extends BaseMapper<Project> {
|
|||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return List<User>
|
* @return List<User>
|
||||||
*/
|
*/
|
||||||
List<Project> selectListRel(@Param("param") ProjectParam param);
|
List<AppUser> selectListRel(@Param("param") AppUserParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,195 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.oa.mapper.AppMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
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
|
||||||
|
<where>
|
||||||
|
<if test="param.appId != null">
|
||||||
|
AND a.app_id = #{param.appId}
|
||||||
|
</if>
|
||||||
|
<if test="param.appName != null">
|
||||||
|
AND a.app_name LIKE CONCAT('%', #{param.appName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.parentId != null">
|
||||||
|
AND a.parent_id = #{param.parentId}
|
||||||
|
</if>
|
||||||
|
<if test="param.appCode != null">
|
||||||
|
AND a.app_code LIKE CONCAT('%', #{param.appCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.appType != null">
|
||||||
|
AND a.app_type LIKE CONCAT('%', #{param.appType}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.menuType != null">
|
||||||
|
AND a.menu_type = #{param.menuType}
|
||||||
|
</if>
|
||||||
|
<if test="param.companyId != null">
|
||||||
|
AND a.company_id = #{param.companyId}
|
||||||
|
</if>
|
||||||
|
<if test="param.appIcon != null">
|
||||||
|
AND a.app_icon LIKE CONCAT('%', #{param.appIcon}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.appQrcode != null">
|
||||||
|
AND a.app_qrcode LIKE CONCAT('%', #{param.appQrcode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.appUrl != null">
|
||||||
|
AND a.app_url LIKE CONCAT('%', #{param.appUrl}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.adminUrl != null">
|
||||||
|
AND a.admin_url LIKE CONCAT('%', #{param.adminUrl}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.downUrl != null">
|
||||||
|
AND a.down_url LIKE CONCAT('%', #{param.downUrl}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.ipAddress != null">
|
||||||
|
AND a.ip_address LIKE CONCAT('%', #{param.ipAddress}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.images != null">
|
||||||
|
AND a.images LIKE CONCAT('%', #{param.images}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.packageName != null">
|
||||||
|
AND a.package_name LIKE CONCAT('%', #{param.packageName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.clicks != null">
|
||||||
|
AND a.clicks = #{param.clicks}
|
||||||
|
</if>
|
||||||
|
<if test="param.installs != null">
|
||||||
|
AND a.installs = #{param.installs}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.content != null">
|
||||||
|
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.requirement != null">
|
||||||
|
AND a.requirement LIKE CONCAT('%', #{param.requirement}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.developer != null">
|
||||||
|
AND a.developer LIKE CONCAT('%', #{param.developer}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.price != null">
|
||||||
|
AND a.price = #{param.price}
|
||||||
|
</if>
|
||||||
|
<if test="param.linePrice != null">
|
||||||
|
AND a.line_price = #{param.linePrice}
|
||||||
|
</if>
|
||||||
|
<if test="param.score != null">
|
||||||
|
AND a.score LIKE CONCAT('%', #{param.score}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.star != null">
|
||||||
|
AND a.star LIKE CONCAT('%', #{param.star}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.path != null">
|
||||||
|
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.component != null">
|
||||||
|
AND a.component LIKE CONCAT('%', #{param.component}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.authority != null">
|
||||||
|
AND a.authority LIKE CONCAT('%', #{param.authority}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.target != null">
|
||||||
|
AND a.target LIKE CONCAT('%', #{param.target}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hide != null">
|
||||||
|
AND a.hide = #{param.hide}
|
||||||
|
</if>
|
||||||
|
<if test="param.search != null">
|
||||||
|
AND a.search = #{param.search}
|
||||||
|
</if>
|
||||||
|
<if test="param.active != null">
|
||||||
|
AND a.active LIKE CONCAT('%', #{param.active}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.meta != null">
|
||||||
|
AND a.meta LIKE CONCAT('%', #{param.meta}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.edition != null">
|
||||||
|
AND a.edition LIKE CONCAT('%', #{param.edition}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.version != null">
|
||||||
|
AND a.version LIKE CONCAT('%', #{param.version}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.isUse != null">
|
||||||
|
AND a.is_use = #{param.isUse}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.app_id IN (SELECT app_id FROM oa_app_user WHERE user_id=#{param.userId})
|
||||||
|
</if>
|
||||||
|
<if test="param.appIds != null">
|
||||||
|
AND a.app_id IN
|
||||||
|
<foreach collection="param.appIds" item="item" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.organizationId != null">
|
||||||
|
AND a.organization_id = #{param.organizationId}
|
||||||
|
</if>
|
||||||
|
<if test="param.tenantId != null">
|
||||||
|
AND a.tenant_id = #{param.tenantId}
|
||||||
|
</if>
|
||||||
|
<if test="param.tenantCode != null">
|
||||||
|
AND a.tenant_code LIKE CONCAT('%', #{param.tenantCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.appStatus != null">
|
||||||
|
AND a.app_status = #{param.appStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.companyName != null">
|
||||||
|
AND a.company_id = #{param.companyId}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
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}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.App">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="pageRel" resultType="com.gxwebsoft.oa.entity.App">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.App">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.oa.mapper.AppUserMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
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
|
||||||
|
<where>
|
||||||
|
<if test="param.appUserId != null">
|
||||||
|
AND a.app_user_id = #{param.appUserId}
|
||||||
|
</if>
|
||||||
|
<if test="param.role != null">
|
||||||
|
AND a.role = #{param.role}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.appId != null">
|
||||||
|
AND a.app_id = #{param.appId}
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (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}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.AppUser">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.AppUser">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
187
cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppParam.java
Normal file
187
cn.wsdns.file/src/main/java/com/gxwebsoft/oa/param/AppParam.java
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
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<Integer> appIds;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
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<App> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<App>
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
PageResult<App> pageRel(AppParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<App>
|
||||||
|
*/
|
||||||
|
List<App> listRel(AppParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param appId 应用ID
|
||||||
|
* @return App
|
||||||
|
*/
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
App getByIdRel(Integer appId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<AppUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<AppUser>
|
||||||
|
*/
|
||||||
|
PageResult<AppUser> pageRel(AppUserParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<AppUser>
|
||||||
|
*/
|
||||||
|
List<AppUser> listRel(AppUserParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param appUserId 自增ID
|
||||||
|
* @return AppUser
|
||||||
|
*/
|
||||||
|
AppUser getByIdRel(Integer appUserId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
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<AppMapper, App> implements AppService {
|
||||||
|
@Resource
|
||||||
|
private AppUserService appUserService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<App> pageRel(AppParam param) {
|
||||||
|
PageParam<App, AppParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
|
||||||
|
List<App> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<App> listRel(AppParam param) {
|
||||||
|
List<App> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<App, AppParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<AppUserMapper, AppUser> implements AppUserService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<AppUser> pageRel(AppUserParam param) {
|
||||||
|
PageParam<AppUser, AppUserParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<AppUser> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AppUser> listRel(AppUserParam param) {
|
||||||
|
List<AppUser> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<AppUser, AppUserParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
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<PageResult<MerchantClerk>> page(MerchantClerkParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(merchantClerkService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchantClerk:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("查询全部商家门店店员表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<MerchantClerk>> list(MerchantClerkParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(merchantClerkService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchantClerk:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("根据id查询商家门店店员表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<MerchantClerk> 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<MerchantClerk> list) {
|
||||||
|
if (merchantClerkService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchantClerk:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改商家门店店员表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<MerchantClerk> 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<Integer> ids) {
|
||||||
|
if (merchantClerkService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
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<PageResult<Merchant>> page(MerchantParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(merchantService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchant:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("查询全部商户管理")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<Merchant>> list(MerchantParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(merchantService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchant:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("根据id查询商户管理")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<Merchant> 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<Merchant> list) {
|
||||||
|
if (merchantService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchant:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改商户管理")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<Merchant> 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<Integer> ids) {
|
||||||
|
if (merchantService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
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<PageResult<MerchantWithdraw>> page(MerchantWithdrawParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(merchantWithdrawService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchantWithdraw:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("查询全部商户提现记录")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<MerchantWithdraw>> list(MerchantWithdrawParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(merchantWithdrawService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchantWithdraw:list')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("根据id查询商户提现记录")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<MerchantWithdraw> 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<MerchantWithdraw> list) {
|
||||||
|
if (merchantWithdrawService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchantWithdraw:update')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量修改商户提现记录")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<MerchantWithdraw> batchParam) {
|
||||||
|
if (batchParam.update(merchantWithdrawService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:merchantWithdraw:remove')")
|
||||||
|
@OperationLog
|
||||||
|
@ApiOperation("批量删除商户提现记录")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (merchantWithdrawService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ import java.util.List;
|
|||||||
* 订单记录表控制器
|
* 订单记录表控制器
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:25:58
|
* @since 2023-06-12 16:48:49
|
||||||
*/
|
*/
|
||||||
@Api(tags = "订单记录表管理")
|
@Api(tags = "订单记录表管理")
|
||||||
@RestController
|
@RestController
|
||||||
@@ -70,7 +70,7 @@ public class OrderController extends BaseController {
|
|||||||
@ApiOperation("添加订单记录表")
|
@ApiOperation("添加订单记录表")
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public ApiResult<?> save(@RequestBody Order order) {
|
public ApiResult<?> save(@RequestBody Order order) {
|
||||||
// 记录当前登录用户id、租户id
|
// 记录当前登录用户id
|
||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
if (loginUser != null) {
|
if (loginUser != null) {
|
||||||
order.setUserId(loginUser.getUserId());
|
order.setUserId(loginUser.getUserId());
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -17,7 +18,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
* 订单记录表
|
* 订单记录表
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:25:58
|
* @since 2023-06-12 16:48:49
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@@ -30,6 +31,9 @@ public class Order implements Serializable {
|
|||||||
@TableId(value = "order_id", type = IdType.AUTO)
|
@TableId(value = "order_id", type = IdType.AUTO)
|
||||||
private Integer orderId;
|
private Integer orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单标题")
|
||||||
|
private String subject;
|
||||||
|
|
||||||
@ApiModelProperty(value = "订单号")
|
@ApiModelProperty(value = "订单号")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
@@ -54,6 +58,9 @@ public class Order implements Serializable {
|
|||||||
@ApiModelProperty(value = "实际付款金额(包含运费)")
|
@ApiModelProperty(value = "实际付款金额(包含运费)")
|
||||||
private BigDecimal payPrice;
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "第三方支付实收金额")
|
||||||
|
private BigDecimal receiptAmount;
|
||||||
|
|
||||||
@ApiModelProperty(value = "后台修改的订单金额(差价)")
|
@ApiModelProperty(value = "后台修改的订单金额(差价)")
|
||||||
private BigDecimal updatePrice;
|
private BigDecimal updatePrice;
|
||||||
|
|
||||||
@@ -63,17 +70,17 @@ public class Order implements Serializable {
|
|||||||
@ApiModelProperty(value = "支付方式(废弃)")
|
@ApiModelProperty(value = "支付方式(废弃)")
|
||||||
private Integer payType;
|
private Integer payType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "支付方式(余额/微信/支付宝)")
|
@ApiModelProperty(value = "支付方式(余额10/微信20/支付宝30/通联支付40/其他支付50)")
|
||||||
private String payMethod;
|
private String payMethod;
|
||||||
|
|
||||||
@ApiModelProperty(value = "付款状态(10未付款 20已付款)")
|
@ApiModelProperty(value = "付款状态(10未付款 20已付款)")
|
||||||
private Integer payStatus;
|
private Integer payStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "付款时间")
|
@ApiModelProperty(value = "付款时间")
|
||||||
private Integer payTime;
|
private LocalDateTime payTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "第三方交易记录ID")
|
@ApiModelProperty(value = "第三方交易记录ID")
|
||||||
private Integer tradeId;
|
private String tradeId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "配送方式(10快递配送 20门店自提)")
|
@ApiModelProperty(value = "配送方式(10快递配送 20门店自提)")
|
||||||
private Integer deliveryType;
|
private Integer deliveryType;
|
||||||
@@ -97,13 +104,13 @@ public class Order implements Serializable {
|
|||||||
private Integer deliveryStatus;
|
private Integer deliveryStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "发货时间")
|
@ApiModelProperty(value = "发货时间")
|
||||||
private Integer deliveryTime;
|
private Date deliveryTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "收货状态(10未收货 20已收货)")
|
@ApiModelProperty(value = "收货状态(10未收货 20已收货 30已退货)")
|
||||||
private Integer receiptStatus;
|
private Integer receiptStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "收货时间")
|
@ApiModelProperty(value = "收货时间")
|
||||||
private Integer receiptTime;
|
private Date receiptTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "订单状态(10进行中 20取消 21待取消 30已完成)")
|
@ApiModelProperty(value = "订单状态(10进行中 20取消 21待取消 30已完成)")
|
||||||
private Integer orderStatus;
|
private Integer orderStatus;
|
||||||
@@ -117,6 +124,12 @@ public class Order implements Serializable {
|
|||||||
@ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)")
|
@ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)")
|
||||||
private Integer isSettled;
|
private Integer isSettled;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "最后结算时间")
|
||||||
|
private Date settledTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "续租订单的关联单号")
|
||||||
|
private Integer rentOrderId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "微信支付交易号(废弃)")
|
@ApiModelProperty(value = "微信支付交易号(废弃)")
|
||||||
private String transactionId;
|
private String transactionId;
|
||||||
|
|
||||||
@@ -132,15 +145,48 @@ public class Order implements Serializable {
|
|||||||
@ApiModelProperty(value = "来源记录的参数 (json格式)")
|
@ApiModelProperty(value = "来源记录的参数 (json格式)")
|
||||||
private String orderSourceData;
|
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、小程序等)")
|
@ApiModelProperty(value = "来源客户端 (APP、H5、小程序等)")
|
||||||
private String platform;
|
private String platform;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否续费订单")
|
||||||
|
private Integer isRenew;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否临时报餐")
|
||||||
|
private Integer isTemporary;
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户ID")
|
@ApiModelProperty(value = "用户ID")
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "所属门店ID")
|
@ApiModelProperty(value = "所属门店ID")
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品ID")
|
||||||
|
private Integer goodsId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电池商品ID")
|
||||||
|
private Integer equipmentId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
private Integer sortNumber;
|
private Integer sortNumber;
|
||||||
|
|
||||||
@@ -154,8 +200,8 @@ public class Order implements Serializable {
|
|||||||
@TableLogic
|
@TableLogic
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商城ID")
|
@ApiModelProperty(value = "商户编码")
|
||||||
private Integer storeId;
|
private String merchantCode;
|
||||||
|
|
||||||
@ApiModelProperty(value = "租户id")
|
@ApiModelProperty(value = "租户id")
|
||||||
private Integer tenantId;
|
private Integer tenantId;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<MerchantClerk> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<MerchantClerk>
|
||||||
|
*/
|
||||||
|
List<MerchantClerk> selectPageRel(@Param("page") IPage<MerchantClerk> page,
|
||||||
|
@Param("param") MerchantClerkParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<MerchantClerk> selectListRel(@Param("param") MerchantClerkParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,29 +2,29 @@ package com.gxwebsoft.shop.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.gxwebsoft.shop.entity.Store;
|
import com.gxwebsoft.shop.entity.Merchant;
|
||||||
import com.gxwebsoft.shop.param.StoreParam;
|
import com.gxwebsoft.shop.param.MerchantParam;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商城管理表Mapper
|
* 商户管理Mapper
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-17 15:14:05
|
* @since 2023-06-26 20:34:38
|
||||||
*/
|
*/
|
||||||
public interface StoreMapper extends BaseMapper<Store> {
|
public interface MerchantMapper extends BaseMapper<Merchant> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*
|
*
|
||||||
* @param page 分页对象
|
* @param page 分页对象
|
||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return List<Store>
|
* @return List<Merchant>
|
||||||
*/
|
*/
|
||||||
List<Store> selectPageRel(@Param("page") IPage<Store> page,
|
List<Merchant> selectPageRel(@Param("page") IPage<Merchant> page,
|
||||||
@Param("param") StoreParam param);
|
@Param("param") MerchantParam param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部
|
* 查询全部
|
||||||
@@ -32,6 +32,6 @@ public interface StoreMapper extends BaseMapper<Store> {
|
|||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return List<User>
|
* @return List<User>
|
||||||
*/
|
*/
|
||||||
List<Store> selectListRel(@Param("param") StoreParam param);
|
List<Merchant> selectListRel(@Param("param") MerchantParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
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<MerchantWithdraw> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<MerchantWithdraw>
|
||||||
|
*/
|
||||||
|
List<MerchantWithdraw> selectPageRel(@Param("page") IPage<MerchantWithdraw> page,
|
||||||
|
@Param("param") MerchantWithdrawParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<MerchantWithdraw> selectListRel(@Param("param") MerchantWithdrawParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
* 订单记录表Mapper
|
* 订单记录表Mapper
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:25:58
|
* @since 2023-06-12 16:48:49
|
||||||
*/
|
*/
|
||||||
public interface OrderMapper extends BaseMapper<Order> {
|
public interface OrderMapper extends BaseMapper<Order> {
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.MerchantClerkMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_merchant_clerk a
|
||||||
|
<where>
|
||||||
|
<if test="param.clerkId != null">
|
||||||
|
AND a.clerk_id = #{param.clerkId}
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantCode != null">
|
||||||
|
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.isOwner != null">
|
||||||
|
AND a.is_owner = #{param.isOwner}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.MerchantClerk">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.MerchantClerk">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.MerchantMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_merchant a
|
||||||
|
<where>
|
||||||
|
<if test="param.merchantId != null">
|
||||||
|
AND a.merchant_id = #{param.merchantId}
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantName != null">
|
||||||
|
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantCode != null">
|
||||||
|
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantType != null">
|
||||||
|
AND a.merchant_type LIKE CONCAT('%', #{param.merchantType}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.money != null">
|
||||||
|
AND a.money = #{param.money}
|
||||||
|
</if>
|
||||||
|
<if test="param.freezeMoney != null">
|
||||||
|
AND a.freeze_money = #{param.freezeMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.totalMoney != null">
|
||||||
|
AND a.total_money = #{param.totalMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.logo != null">
|
||||||
|
AND a.logo LIKE CONCAT('%', #{param.logo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.background != null">
|
||||||
|
AND a.background LIKE CONCAT('%', #{param.background}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantHours != null">
|
||||||
|
AND a.merchant_hours LIKE CONCAT('%', #{param.merchantHours}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.province != null">
|
||||||
|
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.city != null">
|
||||||
|
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.region != null">
|
||||||
|
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.address != null">
|
||||||
|
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.content != null">
|
||||||
|
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.lngAndLat != null">
|
||||||
|
AND a.lng_and_lat LIKE CONCAT('%', #{param.lngAndLat}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.geohash != null">
|
||||||
|
AND a.geohash LIKE CONCAT('%', #{param.geohash}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.summary != null">
|
||||||
|
AND a.summary LIKE CONCAT('%', #{param.summary}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.payType != null">
|
||||||
|
AND a.pay_type = #{param.payType}
|
||||||
|
</if>
|
||||||
|
<if test="param.alipayName != null">
|
||||||
|
AND a.alipay_name LIKE CONCAT('%', #{param.alipayName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.alipayAccount != null">
|
||||||
|
AND a.alipay_account LIKE CONCAT('%', #{param.alipayAccount}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankName != null">
|
||||||
|
AND a.bank_name LIKE CONCAT('%', #{param.bankName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankAccount != null">
|
||||||
|
AND a.bank_account LIKE CONCAT('%', #{param.bankAccount}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankCard != null">
|
||||||
|
AND a.bank_card LIKE CONCAT('%', #{param.bankCard}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.isEdit != null">
|
||||||
|
AND a.is_edit = #{param.isEdit}
|
||||||
|
</if>
|
||||||
|
<if test="param.isCheck != null">
|
||||||
|
AND a.is_check = #{param.isCheck}
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantOwner != null">
|
||||||
|
AND a.merchant_owner = #{param.merchantOwner}
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantPhone != null">
|
||||||
|
AND a.merchant_phone LIKE CONCAT('%', #{param.merchantPhone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.customerId != null">
|
||||||
|
AND a.customer_id = #{param.customerId}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Merchant">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Merchant">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.MerchantWithdrawMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_merchant_withdraw a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.withdrawCode != null">
|
||||||
|
AND a.withdraw_code LIKE CONCAT('%', #{param.withdrawCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.money != null">
|
||||||
|
AND a.money = #{param.money}
|
||||||
|
</if>
|
||||||
|
<if test="param.payType != null">
|
||||||
|
AND a.pay_type LIKE CONCAT('%', #{param.payType}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.alipayName != null">
|
||||||
|
AND a.alipay_name LIKE CONCAT('%', #{param.alipayName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.alipayAccount != null">
|
||||||
|
AND a.alipay_account LIKE CONCAT('%', #{param.alipayAccount}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankName != null">
|
||||||
|
AND a.bank_name LIKE CONCAT('%', #{param.bankName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankAccount != null">
|
||||||
|
AND a.bank_account LIKE CONCAT('%', #{param.bankAccount}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankCard != null">
|
||||||
|
AND a.bank_card LIKE CONCAT('%', #{param.bankCard}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.applyStatus != null">
|
||||||
|
AND a.apply_status = #{param.applyStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.auditTime != null">
|
||||||
|
AND a.audit_time = #{param.auditTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.rejectReason != null">
|
||||||
|
AND a.reject_reason LIKE CONCAT('%', #{param.rejectReason}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.platform != null">
|
||||||
|
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.merchantCode != null">
|
||||||
|
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.MerchantWithdraw">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.MerchantWithdraw">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -10,6 +10,9 @@
|
|||||||
<if test="param.orderId != null">
|
<if test="param.orderId != null">
|
||||||
AND a.order_id = #{param.orderId}
|
AND a.order_id = #{param.orderId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.subject != null">
|
||||||
|
AND a.subject LIKE CONCAT('%', #{param.subject}, '%')
|
||||||
|
</if>
|
||||||
<if test="param.orderNo != null">
|
<if test="param.orderNo != null">
|
||||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
@@ -34,6 +37,9 @@
|
|||||||
<if test="param.payPrice != null">
|
<if test="param.payPrice != null">
|
||||||
AND a.pay_price = #{param.payPrice}
|
AND a.pay_price = #{param.payPrice}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.receiptAmount != null">
|
||||||
|
AND a.receipt_amount = #{param.receiptAmount}
|
||||||
|
</if>
|
||||||
<if test="param.updatePrice != null">
|
<if test="param.updatePrice != null">
|
||||||
AND a.update_price = #{param.updatePrice}
|
AND a.update_price = #{param.updatePrice}
|
||||||
</if>
|
</if>
|
||||||
@@ -50,10 +56,10 @@
|
|||||||
AND a.pay_status = #{param.payStatus}
|
AND a.pay_status = #{param.payStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.payTime != null">
|
<if test="param.payTime != null">
|
||||||
AND a.pay_time = #{param.payTime}
|
AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.tradeId != null">
|
<if test="param.tradeId != null">
|
||||||
AND a.trade_id = #{param.tradeId}
|
AND a.trade_id LIKE CONCAT('%', #{param.tradeId}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.deliveryType != null">
|
<if test="param.deliveryType != null">
|
||||||
AND a.delivery_type = #{param.deliveryType}
|
AND a.delivery_type = #{param.deliveryType}
|
||||||
@@ -77,13 +83,13 @@
|
|||||||
AND a.delivery_status = #{param.deliveryStatus}
|
AND a.delivery_status = #{param.deliveryStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.deliveryTime != null">
|
<if test="param.deliveryTime != null">
|
||||||
AND a.delivery_time = #{param.deliveryTime}
|
AND a.delivery_time LIKE CONCAT('%', #{param.deliveryTime}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.receiptStatus != null">
|
<if test="param.receiptStatus != null">
|
||||||
AND a.receipt_status = #{param.receiptStatus}
|
AND a.receipt_status = #{param.receiptStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.receiptTime != null">
|
<if test="param.receiptTime != null">
|
||||||
AND a.receipt_time = #{param.receiptTime}
|
AND a.receipt_time LIKE CONCAT('%', #{param.receiptTime}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.orderStatus != null">
|
<if test="param.orderStatus != null">
|
||||||
AND a.order_status = #{param.orderStatus}
|
AND a.order_status = #{param.orderStatus}
|
||||||
@@ -97,6 +103,12 @@
|
|||||||
<if test="param.isSettled != null">
|
<if test="param.isSettled != null">
|
||||||
AND a.is_settled = #{param.isSettled}
|
AND a.is_settled = #{param.isSettled}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.settledTime != null">
|
||||||
|
AND a.settled_time LIKE CONCAT('%', #{param.settledTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.rentOrderId != null">
|
||||||
|
AND a.rent_order_id = #{param.rentOrderId}
|
||||||
|
</if>
|
||||||
<if test="param.transactionId != null">
|
<if test="param.transactionId != null">
|
||||||
AND a.transaction_id LIKE CONCAT('%', #{param.transactionId}, '%')
|
AND a.transaction_id LIKE CONCAT('%', #{param.transactionId}, '%')
|
||||||
</if>
|
</if>
|
||||||
@@ -112,15 +124,48 @@
|
|||||||
<if test="param.orderSourceData != null">
|
<if test="param.orderSourceData != null">
|
||||||
AND a.order_source_data LIKE CONCAT('%', #{param.orderSourceData}, '%')
|
AND a.order_source_data LIKE CONCAT('%', #{param.orderSourceData}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.batteryRent != null">
|
||||||
|
AND a.battery_rent = #{param.batteryRent}
|
||||||
|
</if>
|
||||||
|
<if test="param.batteryDeposit != null">
|
||||||
|
AND a.battery_deposit = #{param.batteryDeposit}
|
||||||
|
</if>
|
||||||
|
<if test="param.batteryInsurance != null">
|
||||||
|
AND a.battery_insurance = #{param.batteryInsurance}
|
||||||
|
</if>
|
||||||
|
<if test="param.month != null">
|
||||||
|
AND a.month = #{param.month}
|
||||||
|
</if>
|
||||||
|
<if test="param.week != null">
|
||||||
|
AND a.week = #{param.week}
|
||||||
|
</if>
|
||||||
|
<if test="param.startTime != null">
|
||||||
|
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.expirationTime != null">
|
||||||
|
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||||
|
</if>
|
||||||
<if test="param.platform != null">
|
<if test="param.platform != null">
|
||||||
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
|
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.isRenew != null">
|
||||||
|
AND a.is_renew = #{param.isRenew}
|
||||||
|
</if>
|
||||||
|
<if test="param.isTemporary != null">
|
||||||
|
AND a.is_temporary = #{param.isTemporary}
|
||||||
|
</if>
|
||||||
<if test="param.userId != null">
|
<if test="param.userId != null">
|
||||||
AND a.user_id = #{param.userId}
|
AND a.user_id = #{param.userId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.shopId != null">
|
<if test="param.shopId != null">
|
||||||
AND a.shop_id = #{param.shopId}
|
AND a.shop_id = #{param.shopId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.goodsId != null">
|
||||||
|
AND a.goods_id = #{param.goodsId}
|
||||||
|
</if>
|
||||||
|
<if test="param.equipmentId != null">
|
||||||
|
AND a.equipment_id = #{param.equipmentId}
|
||||||
|
</if>
|
||||||
<if test="param.sortNumber != null">
|
<if test="param.sortNumber != null">
|
||||||
AND a.sort_number = #{param.sortNumber}
|
AND a.sort_number = #{param.sortNumber}
|
||||||
</if>
|
</if>
|
||||||
@@ -136,8 +181,8 @@
|
|||||||
<if test="param.deleted == null">
|
<if test="param.deleted == null">
|
||||||
AND a.deleted = 0
|
AND a.deleted = 0
|
||||||
</if>
|
</if>
|
||||||
<if test="param.storeId != null">
|
<if test="param.merchantCode != null">
|
||||||
AND a.store_id = #{param.storeId}
|
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.createTimeStart != null">
|
<if test="param.createTimeStart != null">
|
||||||
AND a.create_time >= #{param.createTimeStart}
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ import java.math.BigDecimal;
|
|||||||
* 订单记录表查询参数
|
* 订单记录表查询参数
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:25:58
|
* @since 2023-06-12 16:48:49
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@@ -28,6 +28,9 @@ public class OrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer orderId;
|
private Integer orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单标题")
|
||||||
|
private String subject;
|
||||||
|
|
||||||
@ApiModelProperty(value = "订单号")
|
@ApiModelProperty(value = "订单号")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
@@ -59,6 +62,10 @@ public class OrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private BigDecimal payPrice;
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "第三方支付实收金额")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal receiptAmount;
|
||||||
|
|
||||||
@ApiModelProperty(value = "后台修改的订单金额(差价)")
|
@ApiModelProperty(value = "后台修改的订单金额(差价)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private BigDecimal updatePrice;
|
private BigDecimal updatePrice;
|
||||||
@@ -70,7 +77,7 @@ public class OrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer payType;
|
private Integer payType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "支付方式(余额/微信/支付宝)")
|
@ApiModelProperty(value = "支付方式(余额10/微信20/支付宝30/通联支付40/其他支付50)")
|
||||||
private String payMethod;
|
private String payMethod;
|
||||||
|
|
||||||
@ApiModelProperty(value = "付款状态(10未付款 20已付款)")
|
@ApiModelProperty(value = "付款状态(10未付款 20已付款)")
|
||||||
@@ -78,12 +85,10 @@ public class OrderParam extends BaseParam {
|
|||||||
private Integer payStatus;
|
private Integer payStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "付款时间")
|
@ApiModelProperty(value = "付款时间")
|
||||||
@QueryField(type = QueryType.EQ)
|
private String payTime;
|
||||||
private Integer payTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "第三方交易记录ID")
|
@ApiModelProperty(value = "第三方交易记录ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
private String tradeId;
|
||||||
private Integer tradeId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "配送方式(10快递配送 20门店自提)")
|
@ApiModelProperty(value = "配送方式(10快递配送 20门店自提)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
@@ -113,16 +118,14 @@ public class OrderParam extends BaseParam {
|
|||||||
private Integer deliveryStatus;
|
private Integer deliveryStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "发货时间")
|
@ApiModelProperty(value = "发货时间")
|
||||||
@QueryField(type = QueryType.EQ)
|
private String deliveryTime;
|
||||||
private Integer deliveryTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "收货状态(10未收货 20已收货)")
|
@ApiModelProperty(value = "收货状态(10未收货 20已收货 30已退货)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer receiptStatus;
|
private Integer receiptStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "收货时间")
|
@ApiModelProperty(value = "收货时间")
|
||||||
@QueryField(type = QueryType.EQ)
|
private String receiptTime;
|
||||||
private Integer receiptTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "订单状态(10进行中 20取消 21待取消 30已完成)")
|
@ApiModelProperty(value = "订单状态(10进行中 20取消 21待取消 30已完成)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
@@ -139,6 +142,13 @@ public class OrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer isSettled;
|
private Integer isSettled;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "最后结算时间")
|
||||||
|
private String settledTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "续租订单的关联单号")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer rentOrderId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "微信支付交易号(废弃)")
|
@ApiModelProperty(value = "微信支付交易号(废弃)")
|
||||||
private String transactionId;
|
private String transactionId;
|
||||||
|
|
||||||
@@ -157,9 +167,43 @@ public class OrderParam extends BaseParam {
|
|||||||
@ApiModelProperty(value = "来源记录的参数 (json格式)")
|
@ApiModelProperty(value = "来源记录的参数 (json格式)")
|
||||||
private String orderSourceData;
|
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、小程序等)")
|
@ApiModelProperty(value = "来源客户端 (APP、H5、小程序等)")
|
||||||
private String platform;
|
private String platform;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否续费订单")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isRenew;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否临时报餐")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isTemporary;
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户ID")
|
@ApiModelProperty(value = "用户ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
@@ -168,6 +212,14 @@ public class OrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer shopId;
|
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 = "排序(数字越小越靠前)")
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer sortNumber;
|
private Integer sortNumber;
|
||||||
@@ -183,8 +235,7 @@ public class OrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商城ID")
|
@ApiModelProperty(value = "商户编码")
|
||||||
@QueryField(type = QueryType.EQ)
|
private String merchantCode;
|
||||||
private Integer storeId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<MerchantClerk> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<MerchantClerk>
|
||||||
|
*/
|
||||||
|
PageResult<MerchantClerk> pageRel(MerchantClerkParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<MerchantClerk>
|
||||||
|
*/
|
||||||
|
List<MerchantClerk> listRel(MerchantClerkParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param clerkId 商户人员ID
|
||||||
|
* @return MerchantClerk
|
||||||
|
*/
|
||||||
|
MerchantClerk getByIdRel(Integer clerkId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<Merchant> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<Merchant>
|
||||||
|
*/
|
||||||
|
PageResult<Merchant> pageRel(MerchantParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Merchant>
|
||||||
|
*/
|
||||||
|
List<Merchant> listRel(MerchantParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param merchantId 商户ID
|
||||||
|
* @return Merchant
|
||||||
|
*/
|
||||||
|
Merchant getByIdRel(Long merchantId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
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<MerchantWithdraw> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<MerchantWithdraw>
|
||||||
|
*/
|
||||||
|
PageResult<MerchantWithdraw> pageRel(MerchantWithdrawParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<MerchantWithdraw>
|
||||||
|
*/
|
||||||
|
List<MerchantWithdraw> listRel(MerchantWithdrawParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return MerchantWithdraw
|
||||||
|
*/
|
||||||
|
MerchantWithdraw getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
* 订单记录表Service
|
* 订单记录表Service
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:25:58
|
* @since 2023-06-12 16:48:49
|
||||||
*/
|
*/
|
||||||
public interface OrderService extends IService<Order> {
|
public interface OrderService extends IService<Order> {
|
||||||
|
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<MerchantClerkMapper, MerchantClerk> implements MerchantClerkService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<MerchantClerk> pageRel(MerchantClerkParam param) {
|
||||||
|
PageParam<MerchantClerk, MerchantClerkParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<MerchantClerk> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MerchantClerk> listRel(MerchantClerkParam param) {
|
||||||
|
List<MerchantClerk> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<MerchantClerk, MerchantClerkParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<MerchantMapper, Merchant> implements MerchantService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<Merchant> pageRel(MerchantParam param) {
|
||||||
|
PageParam<Merchant, MerchantParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<Merchant> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Merchant> listRel(MerchantParam param) {
|
||||||
|
List<Merchant> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<Merchant, MerchantParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
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<MerchantWithdrawMapper, MerchantWithdraw> implements MerchantWithdrawService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<MerchantWithdraw> pageRel(MerchantWithdrawParam param) {
|
||||||
|
PageParam<MerchantWithdraw, MerchantWithdrawParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<MerchantWithdraw> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MerchantWithdraw> listRel(MerchantWithdrawParam param) {
|
||||||
|
List<MerchantWithdraw> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<MerchantWithdraw, MerchantWithdrawParam> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
* 订单记录表Service实现
|
* 订单记录表Service实现
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2022-11-16 11:25:58
|
* @since 2023-06-12 16:48:49
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
|
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
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<Order> list = orderService.list(new LambdaQueryWrapper<Order>().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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
21
cn.wsdns.file/src/test/java/com/gxwebsoft/TestMain.java
Normal file
21
cn.wsdns.file/src/test/java/com/gxwebsoft/TestMain.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
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()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.gxwebsoft;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
public class WebSoftApplicationTests {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void contextLoads() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ import java.util.Map;
|
|||||||
* @author WebSoft
|
* @author WebSoft
|
||||||
* @since 2021-09-05 00:31:14
|
* @since 2021-09-05 00:31:14
|
||||||
*/
|
*/
|
||||||
public class ShopGenerator {
|
public class LoveGenerator {
|
||||||
// 输出位置
|
// 输出位置
|
||||||
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
private static final String OUTPUT_LOCATION = System.getProperty("user.dir");
|
||||||
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
//private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径
|
||||||
@@ -38,20 +38,18 @@ public class ShopGenerator {
|
|||||||
// 包名
|
// 包名
|
||||||
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
private static final String PACKAGE_NAME = "com.gxwebsoft";
|
||||||
// 模块名
|
// 模块名
|
||||||
private static final String MODULE_NAME = "shop";
|
private static final String MODULE_NAME = "love";
|
||||||
// 需要生成的表
|
// 需要生成的表
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
private static final String[] TABLE_NAMES = new String[]{
|
||||||
// "shop_order",
|
// "love_user_profile",
|
||||||
// "shop_goods",
|
// "love_user_plan",
|
||||||
// "shop_store",
|
// "love_user_plan_price",
|
||||||
"shop_cart"
|
// "love_user_plan_log",
|
||||||
// "oa_assets",
|
"love_user_plan_equity"
|
||||||
// "oa_assets",
|
|
||||||
// "oa_assets",
|
|
||||||
};
|
};
|
||||||
// 需要去除的表前缀
|
// 需要去除的表前缀
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
private static final String[] TABLE_PREFIX = new String[]{
|
||||||
"shop_",
|
"love_",
|
||||||
"tb_"
|
"tb_"
|
||||||
};
|
};
|
||||||
// 不需要作为查询参数的字段
|
// 不需要作为查询参数的字段
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
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<String, Object> 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<FileOutConfig> 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
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<String, Object> 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<FileOutConfig> 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user