|
@@ -2,6 +2,7 @@ package com.kexun.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.kexun.common.Model;
|
|
import com.kexun.entity.ModelEntity;
|
|
import com.kexun.entity.ModelEntity;
|
|
import com.kexun.mapper.UserModelMapper;
|
|
import com.kexun.mapper.UserModelMapper;
|
|
import com.kexun.service.UserModelService;
|
|
import com.kexun.service.UserModelService;
|
|
@@ -15,6 +16,27 @@ public class UserModelServiceImpl extends ServiceImpl<UserModelMapper, ModelEnti
|
|
{
|
|
{
|
|
@Resource
|
|
@Resource
|
|
UserModelMapper userModelMapper;
|
|
UserModelMapper userModelMapper;
|
|
|
|
+
|
|
|
|
+// public String getModelNoService(String userName) {
|
|
|
|
+// QueryWrapper<ModelEntity> wrapper = new QueryWrapper<ModelEntity>()
|
|
|
|
+// .eq("create_by", userName)
|
|
|
|
+// .orderByDesc("id")
|
|
|
|
+// .last("LIMIT 1");
|
|
|
|
+//
|
|
|
|
+// ModelEntity lastModel = modelMapper.selectOne(wrapper);
|
|
|
|
+//
|
|
|
|
+// if (lastModel != null) {
|
|
|
|
+// return lastModel.getModelNo();
|
|
|
|
+// } else {
|
|
|
|
+// return null; // or handle the case when no data is found
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ @Override
|
|
|
|
+ public List<ModelEntity> findAll(){
|
|
|
|
+ List<ModelEntity> model_list=list();
|
|
|
|
+ return model_list;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public List<ModelEntity> findByUserName(String user_name) {
|
|
public List<ModelEntity> findByUserName(String user_name) {
|
|
|
|
|
|
@@ -24,7 +46,6 @@ public class UserModelServiceImpl extends ServiceImpl<UserModelMapper, ModelEnti
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
-
|
|
|
|
public ModelEntity findByModelName(String model_name)
|
|
public ModelEntity findByModelName(String model_name)
|
|
{
|
|
{
|
|
QueryWrapper<ModelEntity> wrapper=new QueryWrapper<ModelEntity>().eq("model_name",model_name);
|
|
QueryWrapper<ModelEntity> wrapper=new QueryWrapper<ModelEntity>().eq("model_name",model_name);
|
|
@@ -58,4 +79,9 @@ public class UserModelServiceImpl extends ServiceImpl<UserModelMapper, ModelEnti
|
|
userModelMapper.changeModelNameQuery(modelName,modelNo);
|
|
userModelMapper.changeModelNameQuery(modelName,modelNo);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public String getModelNo(){
|
|
|
|
+ return userModelMapper.getModelNo();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|