PC 版本管理

This commit is contained in:
2024-08-28 16:20:04 +08:00
parent 15c09f9666
commit ae3d77e8c3
5 changed files with 148 additions and 0 deletions

View File

@@ -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) {