account模块相关表引入
This commit is contained in:
parent
f9a3d37bb1
commit
0204f427cc
|
|
@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
|
|
@ -31,4 +33,10 @@ public class AuthorizationController {
|
||||||
public CzgResult<?> login(@Validated SysLoginDTO loginDTO) {
|
public CzgResult<?> login(@Validated SysLoginDTO loginDTO) {
|
||||||
return CzgResult.success(authorizationService.login(loginDTO));
|
return CzgResult.success(authorizationService.login(loginDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("test")
|
||||||
|
public CzgResult<?> login() {
|
||||||
|
StpKit.ADMIN.login(1);
|
||||||
|
return CzgResult.success(Map.of("token", StpKit.ADMIN.getTokenInfo()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.czg.controller;
|
||||||
|
|
||||||
|
import com.czg.annotation.SaAdminCheckPermission;
|
||||||
|
import com.czg.resp.CzgResult;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 角色管理
|
||||||
|
* @author Administrator
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/role")
|
||||||
|
public class RoleController {
|
||||||
|
|
||||||
|
@SaAdminCheckPermission(value = "role.add")
|
||||||
|
public CzgResult add() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,26 @@
|
||||||
package com.czg.controller;
|
package com.czg.controller;
|
||||||
|
|
||||||
|
import com.czg.resp.CzgResult;
|
||||||
|
import com.czg.service.ShopInfoService;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 店铺管理
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("shopInfo")
|
@RequestMapping("shopInfo")
|
||||||
public class ShopInfoController {
|
public class ShopInfoController {
|
||||||
|
private final ShopInfoService shopInfoService;
|
||||||
|
|
||||||
|
public ShopInfoController(ShopInfoService shopInfoService) {
|
||||||
|
this.shopInfoService = shopInfoService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
public CzgResult add() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.czg.controller;
|
package com.czg.controller;
|
||||||
|
|
||||||
|
import com.czg.sa.StpKit;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,16 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Sa-Token 权限认证,在线文档:https://sa-token.cc -->
|
<!-- Sa-Token 权限认证,在线文档:https://sa-token.cc -->
|
||||||
<!-- start -->
|
<!-- start -->
|
||||||
|
<!-- 提供Redis连接池 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-pool2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- Sa-Token 整合 Redis (使用 jdk 默认序列化方式) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-redis</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.dev33</groupId>
|
<groupId>cn.dev33</groupId>
|
||||||
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,19 @@
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- Sa-Token 整合 Redis (使用 jdk 默认序列化方式) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-redis</artifactId>
|
||||||
|
<version>1.40.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- 提供Redis连接池 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-pool2</artifactId>
|
||||||
|
<version>2.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tomcat.embed</groupId>
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
<artifactId>tomcat-embed-core</artifactId>
|
<artifactId>tomcat-embed-core</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.czg.dto.shopuser;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
public record ShopUserAddDTO(@NotEmpty(message = "店铺名称不为空") String shopName,
|
||||||
|
@NotEmpty(message = "logo不为空") String logo,
|
||||||
|
@NotEmpty String profiles,
|
||||||
|
@NotNull(message = "店铺类型不为空") Integer shopType,
|
||||||
|
@NotEmpty(message = "经营模式不为空") String registerType,
|
||||||
|
@NotEmpty(message = "账号不为空") String loginName,
|
||||||
|
@NotEmpty(message = "密码不为空") String loginPwd,
|
||||||
|
@NotEmpty(message = "经度不为空") String lat,
|
||||||
|
@NotEmpty(message = "维度不为空") String lng,
|
||||||
|
@NotEmpty(message = "详细地址不为空") String address,
|
||||||
|
@NotNull(message = "店铺状态不为空") Integer status,
|
||||||
|
String detail,
|
||||||
|
String phone,
|
||||||
|
String activateCode,
|
||||||
|
String coverImg,
|
||||||
|
String chainName) {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.czg.service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
*/
|
||||||
|
public interface ShopInfoService {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.czg.service.account.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Column;
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色表 实体类。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("sys_role")
|
||||||
|
public class SysRole implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色级别
|
||||||
|
*/
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private Long updateUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
@Column(onInsertValue = "now()")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
package com.czg.service.account.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Column;
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户 实体类。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("sys_user")
|
||||||
|
public class SysUser implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账号
|
||||||
|
*/
|
||||||
|
private String account;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
*/
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为admin账号
|
||||||
|
*/
|
||||||
|
private Boolean isAdmin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:1启用、0禁用
|
||||||
|
*/
|
||||||
|
private Integer stauts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private Long updateUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改密码的时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime pwdResetTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
@Column(onInsertValue = "now()")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
package com.czg.service.account.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Column;
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户储值会员 实体类。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_user")
|
||||||
|
public class TbShopUser implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (随机)
|
||||||
|
*/
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Id
|
||||||
|
*/
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户Id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账户积分
|
||||||
|
*/
|
||||||
|
private Integer accountPoints;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 钱包余额
|
||||||
|
*/
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消费累计
|
||||||
|
*/
|
||||||
|
private BigDecimal consumeAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消费次数累计
|
||||||
|
*/
|
||||||
|
private Integer consumeCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-不可使用 1可使用
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否会员,
|
||||||
|
*/
|
||||||
|
private Integer isVip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员编号
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员码
|
||||||
|
*/
|
||||||
|
private String dynamicCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最近一次积分变动时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime lastPointsChangeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最近一次浮动积分
|
||||||
|
*/
|
||||||
|
private Integer lastFloatPoints;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成为会员的时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime joinTime;
|
||||||
|
|
||||||
|
@Column(onInsertValue = "now()")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.service.account.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.service.account.entity.SysRole;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色表 映射层。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
public interface SysRoleMapper extends BaseMapper<SysRole> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.service.account.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.service.account.entity.SysUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户 映射层。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.service.account.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.service.account.entity.TbShopUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户储值会员 映射层。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
public interface TbShopUserMapper extends BaseMapper<TbShopUser> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.service.account.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.service.account.entity.SysRole;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色表 服务层。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
public interface SysRoleService extends IService<SysRole> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.service.account.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.service.account.entity.SysUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户 服务层。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
public interface SysUserService extends IService<SysUser> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.czg.service.account.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.service.account.entity.TbShopUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户储值会员 服务层。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
public interface TbShopUserService extends IService<TbShopUser> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.czg.service.account.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.service.account.entity.SysRole;
|
||||||
|
import com.czg.service.account.mapper.SysRoleMapper;
|
||||||
|
import com.czg.service.account.service.SysRoleService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色表 服务层实现。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.czg.service.account.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.service.account.entity.SysUser;
|
||||||
|
import com.czg.service.account.mapper.SysUserMapper;
|
||||||
|
import com.czg.service.account.service.SysUserService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户 服务层实现。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.czg.service.account.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.service.account.entity.TbShopUser;
|
||||||
|
import com.czg.service.account.mapper.TbShopUserMapper;
|
||||||
|
import com.czg.service.account.service.TbShopUserService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户储值会员 服务层实现。
|
||||||
|
*
|
||||||
|
* @author Administrator
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TbShopUserServiceImpl extends ServiceImpl<TbShopUserMapper, TbShopUser> implements TbShopUserService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,7 @@ package com.czg.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.czg.dto.SysLoginDTO;
|
import com.czg.dto.SysLoginDTO;
|
||||||
|
import com.czg.sa.StpKit;
|
||||||
import com.czg.service.AuthorizationService;
|
import com.czg.service.AuthorizationService;
|
||||||
import com.wf.captcha.SpecCaptcha;
|
import com.wf.captcha.SpecCaptcha;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -30,6 +31,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object login(SysLoginDTO loginDTO) {
|
public Object login(SysLoginDTO loginDTO) {
|
||||||
return null;
|
StpKit.ADMIN.login(1);
|
||||||
|
return Map.of("token", StpKit.ADMIN.getTokenInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.czg.service.impl;
|
||||||
|
|
||||||
|
import com.czg.service.ShopInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Administrator
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ShopInfoServiceImpl implements ShopInfoService {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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.czg.service.account.mapper.SysRoleMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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.czg.service.account.mapper.SysUserMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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.czg.service.account.mapper.TbShopUserMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -39,15 +39,15 @@ public class Main {
|
||||||
GlobalConfig globalConfig = new GlobalConfig();
|
GlobalConfig globalConfig = new GlobalConfig();
|
||||||
|
|
||||||
String currentWorkingDirectory = System.getProperty("user.dir");
|
String currentWorkingDirectory = System.getProperty("user.dir");
|
||||||
String projectPath = currentWorkingDirectory + "/cash-service/system-service";
|
// String projectPath = currentWorkingDirectory + "/cash-service/system-service";
|
||||||
// String projectPath = currentWorkingDirectory + "/cash-service/account-service";
|
String projectPath = currentWorkingDirectory + "/cash-service/account-service";
|
||||||
// String projectPath = currentWorkingDirectory + "/cash-service/product-service";
|
// String projectPath = currentWorkingDirectory + "/cash-service/product-service";
|
||||||
// String projectPath = currentWorkingDirectory + "/cash-service/order-service";
|
// String projectPath = currentWorkingDirectory + "/cash-service/order-service";
|
||||||
|
|
||||||
//设置根包
|
//设置根包
|
||||||
globalConfig.getPackageConfig()
|
globalConfig.getPackageConfig()
|
||||||
.setSourceDir(projectPath + "/src/main/java")
|
.setSourceDir(projectPath + "/src/main/java")
|
||||||
.setBasePackage("com.czg.service.system");
|
.setBasePackage("com.czg.service.account");
|
||||||
|
|
||||||
globalConfig.getServiceConfig()
|
globalConfig.getServiceConfig()
|
||||||
.setClassSuffix("Service")
|
.setClassSuffix("Service")
|
||||||
|
|
@ -69,7 +69,7 @@ public class Main {
|
||||||
//设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表
|
//设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表
|
||||||
globalConfig.getStrategyConfig()
|
globalConfig.getStrategyConfig()
|
||||||
.setTablePrefix("")
|
.setTablePrefix("")
|
||||||
.setGenerateTable("sys_params");
|
.setGenerateTable("tb_shop_user");
|
||||||
|
|
||||||
//设置生成 entity 并启用 Lombok
|
//设置生成 entity 并启用 Lombok
|
||||||
globalConfig.enableEntity()
|
globalConfig.enableEntity()
|
||||||
|
|
@ -93,11 +93,11 @@ public class Main {
|
||||||
globalConfig.getStrategyConfig()
|
globalConfig.getStrategyConfig()
|
||||||
.setColumnConfig(updateTime);
|
.setColumnConfig(updateTime);
|
||||||
|
|
||||||
ColumnConfig deleted = new ColumnConfig();
|
// ColumnConfig deleted = new ColumnConfig();
|
||||||
deleted.setColumnName("is_del");
|
// deleted.setColumnName("is_del");
|
||||||
deleted.setLogicDelete(true);
|
// deleted.setLogicDelete(true);
|
||||||
globalConfig.getStrategyConfig()
|
// globalConfig.getStrategyConfig()
|
||||||
.setColumnConfig(deleted);
|
// .setColumnConfig(deleted);
|
||||||
|
|
||||||
// ColumnConfig version = new ColumnConfig();
|
// ColumnConfig version = new ColumnConfig();
|
||||||
// version.setColumnName("version");
|
// version.setColumnName("version");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue