mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-01 06:29:36 +08:00
修改登录
用户列表 全局配置 用户修改 同步用户表结构
This commit is contained in:
@@ -14,10 +14,10 @@ public class PageResult<T> {
|
||||
private Long count;
|
||||
|
||||
/** 当前页码 **/
|
||||
private Integer pageNo;
|
||||
private Integer page_no;
|
||||
|
||||
/** 每页条数 **/
|
||||
private Integer pageSize;
|
||||
private Integer page_size;
|
||||
|
||||
/** 扩展字段 **/
|
||||
private Map<String, Object> extend;
|
||||
@@ -37,8 +37,8 @@ public class PageResult<T> {
|
||||
PageResult<T> pageResult = new PageResult<>();
|
||||
PageInfo<T> pageInfo = new PageInfo<>(list);
|
||||
pageResult.setCount(pageInfo.getTotal());
|
||||
pageResult.setPageNo(pageInfo.getPageNum());
|
||||
pageResult.setPageSize(pageInfo.getPageSize());
|
||||
pageResult.setPage_no(pageInfo.getPageNum());
|
||||
pageResult.setPage_size(pageInfo.getPageSize());
|
||||
pageResult.setLists(pageInfo.getList());
|
||||
return pageResult;
|
||||
}
|
||||
@@ -55,8 +55,8 @@ public class PageResult<T> {
|
||||
PageResult<T> pageResult = new PageResult<>();
|
||||
PageInfo<T> pageInfo = new PageInfo<>(list);
|
||||
pageResult.setCount(pageInfo.getTotal());
|
||||
pageResult.setPageSize(pageInfo.getPageSize());
|
||||
pageResult.setPageNo(pageInfo.getPageNum());
|
||||
pageResult.setPage_no(pageInfo.getPageSize());
|
||||
pageResult.setPage_size(pageInfo.getPageNum());
|
||||
pageResult.setLists(data);
|
||||
return pageResult;
|
||||
}
|
||||
@@ -72,8 +72,8 @@ public class PageResult<T> {
|
||||
public static <T> PageResult<T> iPageHandle(IPage<T> iPage) {
|
||||
PageResult<T> pageResult = new PageResult<>();
|
||||
pageResult.setCount(iPage.getTotal());
|
||||
pageResult.setPageNo((int) iPage.getCurrent());
|
||||
pageResult.setPageSize((int) iPage.getSize());
|
||||
pageResult.setPage_no((int) iPage.getCurrent());
|
||||
pageResult.setPage_size((int) iPage.getSize());
|
||||
pageResult.setLists(iPage.getRecords());
|
||||
return pageResult;
|
||||
}
|
||||
@@ -92,8 +92,8 @@ public class PageResult<T> {
|
||||
public static <T> PageResult<T> iPageHandle(Long total, Long pageNo, Long size, List<T> list) {
|
||||
PageResult<T> pageResult = new PageResult<>();
|
||||
pageResult.setCount(total);
|
||||
pageResult.setPageNo(Math.toIntExact(pageNo));
|
||||
pageResult.setPageSize(Math.toIntExact(size));
|
||||
pageResult.setPage_no(Math.toIntExact(pageNo));
|
||||
pageResult.setPage_size(Math.toIntExact(size));
|
||||
pageResult.setLists(list);
|
||||
return pageResult;
|
||||
}
|
||||
@@ -112,8 +112,8 @@ public class PageResult<T> {
|
||||
public static <T> PageResult<T> iPageHandle(Long total, Long pageNo, Long size, List<T> list, Map<String,Object> extend) {
|
||||
PageResult<T> pageResult = new PageResult<>();
|
||||
pageResult.setCount(total);
|
||||
pageResult.setPageNo(Math.toIntExact(pageNo));
|
||||
pageResult.setPageSize(Math.toIntExact(size));
|
||||
pageResult.setPage_no(Math.toIntExact(pageNo));
|
||||
pageResult.setPage_size(Math.toIntExact(size));
|
||||
pageResult.setLists(list);
|
||||
pageResult.setExtend(extend);
|
||||
return pageResult;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mdd.common.entity.album;
|
||||
package com.mdd.common.entity.file;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -9,8 +9,8 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("相册实体")
|
||||
public class Album implements Serializable {
|
||||
@ApiModel("文件实体")
|
||||
public class File implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -21,11 +21,8 @@ public class Album implements Serializable {
|
||||
@ApiModelProperty("类目ID")
|
||||
private Integer cid;
|
||||
|
||||
@ApiModelProperty("管理ID")
|
||||
private Integer aid;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer uid;
|
||||
@ApiModelProperty("上传者id")
|
||||
private Integer sourceId;
|
||||
|
||||
@ApiModelProperty("文件类型: [10=图片, 20=视频]")
|
||||
private Integer type;
|
||||
@@ -36,15 +33,6 @@ public class Album implements Serializable {
|
||||
@ApiModelProperty("文件路径")
|
||||
private String uri;
|
||||
|
||||
@ApiModelProperty("文件扩展")
|
||||
private String ext;
|
||||
|
||||
@ApiModelProperty("文件大小")
|
||||
private Long size;
|
||||
|
||||
@ApiModelProperty("是否删除: [0=否, 1=是]")
|
||||
private Integer isDelete;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mdd.common.entity.album;
|
||||
package com.mdd.common.entity.file;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -9,8 +9,8 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("相册分类实体")
|
||||
public class AlbumCate implements Serializable {
|
||||
@ApiModel("文件分类实体")
|
||||
public class FileCate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -27,9 +27,6 @@ public class AlbumCate implements Serializable {
|
||||
@ApiModelProperty("分类名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("是否删除: [0=否,1=是]")
|
||||
private Integer isDelete;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@ApiModel("账户变动实体")
|
||||
public class LogMoney {
|
||||
public class UserAccountLog {
|
||||
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@ApiModelProperty("主键")
|
||||
@@ -22,8 +22,8 @@ public class LogMoney {
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("关联ID")
|
||||
private Integer sourceId;
|
||||
@ApiModelProperty("变动对象")
|
||||
private Integer changeObject;
|
||||
|
||||
@ApiModelProperty("关联单号")
|
||||
private String sourceSn;
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.mdd.common.mapper.album;
|
||||
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.album.AlbumCate;
|
||||
import com.mdd.common.entity.file.FileCate;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 相册分类
|
||||
*/
|
||||
@Mapper
|
||||
public interface AlbumCateMapper extends IBaseMapper<AlbumCate> {
|
||||
public interface FileCateMapper extends IBaseMapper<FileCate> {
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.mdd.common.mapper.album;
|
||||
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.album.Album;
|
||||
import com.mdd.common.entity.file.File;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
@Mapper
|
||||
public interface AlbumMapper extends IBaseMapper<Album> {
|
||||
public interface FileMapper extends IBaseMapper<File> {
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.mdd.common.mapper.log;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.log.LogMoney;
|
||||
import com.mdd.common.entity.log.UserAccountLog;
|
||||
import com.mdd.common.entity.user.User;
|
||||
import com.mdd.common.mapper.user.UserMapper;
|
||||
import com.mdd.common.util.SpringUtils;
|
||||
@@ -17,7 +17,7 @@ import java.math.BigDecimal;
|
||||
* 账户变动Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface LogMoneyMapper extends IBaseMapper<LogMoney> {
|
||||
public interface UserAccountLogMapper extends IBaseMapper<UserAccountLog> {
|
||||
|
||||
/**
|
||||
* 增加
|
||||
@@ -41,11 +41,9 @@ public interface LogMoneyMapper extends IBaseMapper<LogMoney> {
|
||||
}
|
||||
|
||||
BigDecimal leftAmount = user.getUserMoney().add(changeAmount);
|
||||
|
||||
LogMoney logMoney = new LogMoney();
|
||||
UserAccountLog logMoney = new UserAccountLog();
|
||||
logMoney.setSn(this.randMakeOrderSn());
|
||||
logMoney.setUserId(userId);
|
||||
logMoney.setSourceId(sourceId);
|
||||
logMoney.setSourceSn(sourceSn);
|
||||
logMoney.setChangeType(changeType);
|
||||
logMoney.setChangeAmount(changeAmount);
|
||||
@@ -82,10 +80,9 @@ public interface LogMoneyMapper extends IBaseMapper<LogMoney> {
|
||||
|
||||
BigDecimal leftAmount = user.getUserMoney().subtract(changeAmount);
|
||||
|
||||
LogMoney logMoney = new LogMoney();
|
||||
UserAccountLog logMoney = new UserAccountLog();
|
||||
logMoney.setSn(this.randMakeOrderSn());
|
||||
logMoney.setUserId(userId);
|
||||
logMoney.setSourceId(sourceId);
|
||||
logMoney.setSourceSn(sourceSn);
|
||||
logMoney.setChangeType(changeType);
|
||||
logMoney.setChangeAmount(changeAmount);
|
||||
@@ -110,8 +107,8 @@ public interface LogMoneyMapper extends IBaseMapper<LogMoney> {
|
||||
String sn;
|
||||
while (true) {
|
||||
sn = date + ToolUtils.randomInt(12);
|
||||
LogMoney snModel = this.selectOne(
|
||||
new QueryWrapper<LogMoney>()
|
||||
UserAccountLog snModel = this.selectOne(
|
||||
new QueryWrapper<UserAccountLog>()
|
||||
.select("id")
|
||||
.eq("sn", sn)
|
||||
.last("limit 1"));
|
||||
@@ -107,6 +107,7 @@ public class ConfigUtils {
|
||||
public static Map<String, String> getMap(String type, String name) {
|
||||
String cache = ConfigCache.get(type, name);
|
||||
if (!StringUtils.isNull(cache) && !StringUtils.isEmpty(cache)) {
|
||||
cache = "[]".equals(cache) ? "{}" : cache;
|
||||
return MapUtils.jsonToMap(cache);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user