Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
This commit is contained in:
@@ -30,7 +30,7 @@ import java.util.Date;
|
||||
@Table(name = "li_app_version")
|
||||
@TableName("li_app_version")
|
||||
@ApiModel(value = "app版本控制")
|
||||
public class AppVersionDO{
|
||||
public class AppVersion {
|
||||
|
||||
private static final long serialVersionUID = 3034686331756935L;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package cn.lili.modules.system.mapper;
|
||||
|
||||
import cn.lili.modules.system.entity.dos.AppVersionDO;
|
||||
import cn.lili.modules.system.entity.dos.AppVersion;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* app版本控制数据处理层
|
||||
@@ -9,6 +10,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 8:01 下午
|
||||
*/
|
||||
public interface AppVersionMapper extends BaseMapper<AppVersionDO> {
|
||||
public interface AppVersionMapper extends BaseMapper<AppVersion> {
|
||||
|
||||
@Select("SELECT * FROM li_app_version WHERE type=#{appType} ORDER BY version_update_date DESC LIMIT 1")
|
||||
AppVersion getLatestVersion(String appType);
|
||||
|
||||
}
|
||||
@@ -1,15 +1,20 @@
|
||||
package cn.lili.modules.system.service;
|
||||
|
||||
import cn.lili.modules.system.entity.dos.AppVersionDO;
|
||||
import cn.lili.modules.system.entity.dos.AppVersion;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 物流公司业务层
|
||||
* app版本业务层
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 8:02 下午
|
||||
*/
|
||||
public interface AppVersionService extends IService<AppVersionDO> {
|
||||
|
||||
public interface AppVersionService extends IService<AppVersion> {
|
||||
|
||||
/**
|
||||
* 获取当前最新的APP版本
|
||||
* 获取用户的APP类型,返回最新的数据的版本号
|
||||
* @return 最新的APP版本号
|
||||
*/
|
||||
AppVersion getAppVersion(String appType);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.lili.modules.system.serviceimpl;
|
||||
|
||||
import cn.lili.modules.system.entity.dos.AppVersionDO;
|
||||
import cn.lili.modules.system.entity.dos.AppVersion;
|
||||
import cn.lili.modules.system.mapper.AppVersionMapper;
|
||||
import cn.lili.modules.system.service.AppVersionService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -16,6 +16,10 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVersionDO> implements AppVersionService {
|
||||
public class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVersion> implements AppVersionService {
|
||||
|
||||
@Override
|
||||
public AppVersion getAppVersion(String appType) {
|
||||
return this.baseMapper.getLatestVersion(appType);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user