style:调整
parent
10d944174d
commit
a18a478b36
|
@ -62,6 +62,18 @@
|
||||||
<version>3.8.8</version>
|
<version>3.8.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mcwl</groupId>
|
||||||
|
<artifactId>mcwl-memberCenter</artifactId>
|
||||||
|
<version>3.8.8</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 代码生成-->
|
<!-- 代码生成-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mcwl</groupId>
|
<groupId>com.mcwl</groupId>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.mcwl;
|
package com.mcwl;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
* @author mcwl
|
* @author mcwl
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||||
|
@MapperScan(basePackages = "com.mcwl")
|
||||||
public class McWlApplication
|
public class McWlApplication
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package com.mcwl.web.controller.myInvitation;
|
package com.mcwl.web.controller.myInvitation;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController("/consume")
|
@RestController()
|
||||||
|
@RequestMapping("/consume")
|
||||||
public class ConsumeController {
|
public class ConsumeController {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,16 @@ import com.mcwl.myInvitation.domain.Invitation;
|
||||||
import com.mcwl.myInvitation.service.InvitationService;
|
import com.mcwl.myInvitation.service.InvitationService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.mcwl.common.core.domain.AjaxResult.success;
|
import static com.mcwl.common.core.domain.AjaxResult.success;
|
||||||
|
|
||||||
@RestController("/invitation")
|
@RestController()
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/invitation")
|
||||||
public class InvitationController {
|
public class InvitationController {
|
||||||
|
|
||||||
private final InvitationService invitationService;
|
private final InvitationService invitationService;
|
||||||
|
|
|
@ -61,9 +61,9 @@ spring:
|
||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
# Mapper XML文件位置
|
# Mapper XML文件位置
|
||||||
mapper-locations: classpath:mapper/**/*.xml
|
mapper-locations: classpath*:mapper/**/*.xml
|
||||||
# 配置实体类所在的包名,MyBatis-Plus会自动扫描并注册为别名
|
# 配置实体类所在的包名,MyBatis-Plus会自动扫描并注册为别名
|
||||||
type-aliases-package: com.mcwl.**.mapper
|
type-aliases-package: com.mcwl.**.domain
|
||||||
# 全局配置
|
# 全局配置
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.mcwl.memberCenter;
|
||||||
|
|
||||||
|
import com.mcwl.McWlApplication;
|
||||||
|
import com.mcwl.memberCenter.service.MemberService;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
|
@RunWith(SpringRunner.class)
|
||||||
|
@SpringBootTest(classes = McWlApplication.class)
|
||||||
|
public class MemberTest {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MemberService memberService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void memberServiceTest() {
|
||||||
|
System.out.println(memberService.list());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.mcwl</groupId>
|
||||||
|
<artifactId>mcwl</artifactId>
|
||||||
|
<version>3.8.8</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>mcwl-memberCenter</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mcwl</groupId>
|
||||||
|
<artifactId>mcwl-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.mcwl.memberCenter.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("mem_member")
|
||||||
|
public class Member extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
// 会员类型
|
||||||
|
private String member_type;
|
||||||
|
|
||||||
|
// 会员名称
|
||||||
|
private String member_name;
|
||||||
|
|
||||||
|
// 会员价格
|
||||||
|
private Double unit_price;
|
||||||
|
|
||||||
|
// 会员原价
|
||||||
|
private Double original_price;
|
||||||
|
|
||||||
|
// 删除标志(0代表存在 2代表删除)
|
||||||
|
private String delFlag;
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.mcwl.memberCenter.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import com.mcwl.memberCenter.enums.MemberMenu;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("mem_member")
|
||||||
|
public class UserMember extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
// 用户ID
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
// 会员ID
|
||||||
|
private Long memberId;
|
||||||
|
|
||||||
|
// 会员开始时间
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
// 会员结束时间
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
// 会员积分
|
||||||
|
private Integer points;
|
||||||
|
|
||||||
|
// 订阅状态 active(活跃)、inactive(非活跃)、pending(待支付)和expired(过期)
|
||||||
|
@EnumValue
|
||||||
|
private MemberMenu subscriptionStatus;
|
||||||
|
|
||||||
|
// 支付方式
|
||||||
|
private String paymentMethod;
|
||||||
|
|
||||||
|
// 上次支付时间
|
||||||
|
private Date lastPaymentDate;
|
||||||
|
|
||||||
|
// 下次计费时间
|
||||||
|
private Date nextBillingDate;
|
||||||
|
|
||||||
|
// 上次登录时间
|
||||||
|
private Date lastLoginDate;
|
||||||
|
|
||||||
|
// 状态(0:正常 1:禁用)
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
// 删除标志(0代表存在 2代表删除)
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.mcwl.memberCenter.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum MemberMenu {
|
||||||
|
MEMBER_CENTER_ACTIVE("active", "活跃"),
|
||||||
|
MEMBER_CENTER_INACTIVE("inactive", "非活跃"),
|
||||||
|
MEMBER_CENTER_PENDING("pending", "待支付"),
|
||||||
|
MEMBER_CENTER_EXPIRED("expired", "过期");
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.mcwl.memberCenter.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mcwl.memberCenter.domain.Member;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
//@Mapper
|
||||||
|
public interface MemberMapper extends BaseMapper<Member> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.mcwl.memberCenter.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mcwl.memberCenter.domain.UserMember;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
//@Mapper
|
||||||
|
public interface UserMemberMapper extends BaseMapper<UserMember> {
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.mcwl.memberCenter.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mcwl.memberCenter.domain.Member;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MemberService extends IService<Member> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.mcwl.memberCenter.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mcwl.memberCenter.domain.UserMember;
|
||||||
|
|
||||||
|
public interface UserMemberService extends IService<UserMember> {
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.mcwl.memberCenter.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mcwl.memberCenter.domain.Member;
|
||||||
|
import com.mcwl.memberCenter.mapper.MemberMapper;
|
||||||
|
import com.mcwl.memberCenter.service.MemberService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.mcwl.memberCenter.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mcwl.memberCenter.domain.UserMember;
|
||||||
|
import com.mcwl.memberCenter.mapper.UserMemberMapper;
|
||||||
|
import com.mcwl.memberCenter.service.UserMemberService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UserMemberServiceImpl extends ServiceImpl<UserMemberMapper, UserMember> implements UserMemberService {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?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.mcwl.memberCenter.mapper.MemberMapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -27,6 +27,9 @@ public class Commission extends BaseEntity {
|
||||||
// 支付状态
|
// 支付状态
|
||||||
private Integer payStatus;
|
private Integer payStatus;
|
||||||
|
|
||||||
|
// 删除标志(0代表存在 2代表删除)
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
|
@ -25,6 +25,9 @@ public class Consume extends BaseEntity {
|
||||||
// 消费时间
|
// 消费时间
|
||||||
private Date consumeDate;
|
private Date consumeDate;
|
||||||
|
|
||||||
|
// 删除标志(0代表存在 2代表删除)
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
|
@ -25,6 +25,9 @@ public class Invitation extends BaseEntity {
|
||||||
// 邀请码
|
// 邀请码
|
||||||
private String invitationCode;
|
private String invitationCode;
|
||||||
|
|
||||||
|
// 删除标志(0代表存在 2代表删除)
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -230,6 +230,7 @@
|
||||||
<module>mcwl-common</module>
|
<module>mcwl-common</module>
|
||||||
<module>mcwl-myInvitation</module>
|
<module>mcwl-myInvitation</module>
|
||||||
<module>mcwl-resource</module>
|
<module>mcwl-resource</module>
|
||||||
|
<module>mcwl-memberCenter</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue