PC 版本管理
This commit is contained in:
@@ -34,6 +34,11 @@ public class LoginContoller {
|
||||
return Result.fail(CodeEnum.FAIL);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "findVersion",method = RequestMethod.POST)
|
||||
public Result findVersion() {
|
||||
return loginService.findVersion();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("logout")
|
||||
public Result logout( @RequestHeader("token") String token,
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
/**
|
||||
* 版本管理(TbVersion)表实体类
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-28 11:22:09
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TbVersion extends Model<TbVersion> {
|
||||
|
||||
private Integer id;
|
||||
//PC;APP;
|
||||
private String source;
|
||||
//ios;android;
|
||||
private String type;
|
||||
//版本号
|
||||
private String version;
|
||||
//是否强制更新 0:否 1:是
|
||||
private Integer isUp;
|
||||
//更新提示内容
|
||||
private String message;
|
||||
//下载地址
|
||||
private String url;
|
||||
//选中 0否 1是
|
||||
private Integer sel;
|
||||
//创建时间
|
||||
private Long createdAt;
|
||||
//更新时间
|
||||
private Long updatedAt;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Integer getIsUp() {
|
||||
return isUp;
|
||||
}
|
||||
|
||||
public void setIsUp(Integer isUp) {
|
||||
this.isUp = isUp;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public Integer getSel() {
|
||||
return sel;
|
||||
}
|
||||
|
||||
public void setSel(Integer sel) {
|
||||
this.sel = sel;
|
||||
}
|
||||
|
||||
public Long getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Long createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Long updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ public class WebAppConfigurer implements WebMvcConfigurer {
|
||||
.addPathPatterns("/**")
|
||||
.excludePathPatterns("/login/login")
|
||||
.excludePathPatterns("/login/getPhone")
|
||||
.excludePathPatterns("/login/findVersion")
|
||||
.excludePathPatterns("/cloudPrinter/print")
|
||||
.excludePathPatterns("/cloudPrinter/handoverPrint")
|
||||
.excludePathPatterns("/data/handoverData")
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.chaozhanggui.system.cashierservice.mybatis;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbVersion;
|
||||
|
||||
/**
|
||||
* 版本管理(TbVersion)表数据库访问层
|
||||
*
|
||||
* @author ww
|
||||
* @since 2024-08-28 11:22:09
|
||||
*/
|
||||
public interface TbVersionMapper extends BaseMapper<TbVersion> {
|
||||
|
||||
}
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.chaozhanggui.system.cashierservice.service;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.model.LoginReq;
|
||||
import com.chaozhanggui.system.cashierservice.mybatis.TbVersionMapper;
|
||||
import com.chaozhanggui.system.cashierservice.rabbit.RabbitProducer;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
@@ -48,6 +50,8 @@ public class LoginService {
|
||||
@Autowired
|
||||
TbTokenMapper tbTokenMapper;
|
||||
@Autowired
|
||||
TbVersionMapper versionMapper;
|
||||
@Autowired
|
||||
RabbitProducer rabbitProducer;
|
||||
|
||||
|
||||
@@ -141,6 +145,14 @@ public class LoginService {
|
||||
return Result.success(CodeEnum.SUCCESS, accountMap);
|
||||
}
|
||||
|
||||
public Result findVersion() {
|
||||
LambdaQueryWrapper<TbVersion> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(TbVersion::getSource,"PC");
|
||||
queryWrapper.eq(TbVersion::getSel,1);
|
||||
return new Result(SUCCESS,versionMapper.selectOne(queryWrapper));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Result logout(String loginName, String clientType, String token, String status) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user