From 7ae050aa97ba5fdfa274e5dcd50698527c73d7fc Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期一, 25 三月 2019 17:00:22 +0800
Subject: [PATCH] 添加店铺名称精准搜索
---
fanli/src/main/java/com/yeshi/fanli/service/impl/config/SystemConfigServiceImpl.java | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/config/SystemConfigServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/config/SystemConfigServiceImpl.java
index 4e5ee24..ca5d5c4 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/config/SystemConfigServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/config/SystemConfigServiceImpl.java
@@ -11,11 +11,11 @@
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.config.SystemConfigDao;
-import com.yeshi.fanli.entity.system.System;
+import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.system.SystemConfig;
import com.yeshi.fanli.exception.NotExistObjectException;
+import com.yeshi.fanli.service.inter.config.BusinessSystemService;
import com.yeshi.fanli.service.inter.config.SystemConfigService;
-import com.yeshi.fanli.service.inter.config.SystemService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.Utils;
@@ -26,9 +26,9 @@
private SystemConfigDao systemConfigDao;
@Resource
- private SystemService systemService;
+ private BusinessSystemService businessSystemService;
- public int getCount(System system,String key) {
+ public int getCount(BusinessSystem system,String key) {
Long lcount;
if(system!=null){
lcount = systemConfigDao.getCount("select count(sc.id) from SystemConfig sc left join sc.systems s where s.id=? and sc.name like ?",new Serializable[]{system.getId(),"%"+key+"%"});
@@ -38,7 +38,7 @@
return lcount.intValue();
}
- public List<SystemConfig> getSystemConfigList(int index,System system, String key) {
+ public List<SystemConfig> getSystemConfigList(int index,BusinessSystem system, String key) {
int start =index * Constant.PAGE_SIZE;
List<SystemConfig> list;
@@ -65,12 +65,12 @@
}
public void addSystemConfig(SystemConfig sc) {
- Set<System> systems = sc.getSystems();
- Set<System> newSystems=new HashSet<System>();
- for (System system : systems) {
+ Set<BusinessSystem> systems = sc.getSystems();
+ Set<BusinessSystem> newSystems=new HashSet<BusinessSystem>();
+ for (BusinessSystem system : systems) {
String platform = Utils.getMap().get(String.valueOf(system.getPlatform()));
String packages = system.getPackageName();
- System find = systemService.getSystem(platform, packages);
+ BusinessSystem find = businessSystemService.getBusinessSystem(platform, packages);
if(find != null){
newSystems.add(find);
}
@@ -80,7 +80,7 @@
systemConfigDao.save(sc);
}
- public void deleteSystem(long id, System system) throws NotExistObjectException {
+ public void deleteSystem(long id, BusinessSystem system) throws NotExistObjectException {
SystemConfig find = systemConfigDao.find(SystemConfig.class, id);
if(find==null){
throw new NotExistObjectException("涓嶅瓨鍦ㄨ瀛愮郴缁�");
@@ -90,7 +90,7 @@
systemConfigDao.update(find);
}
- public void addSystem(long id, System system) throws NotExistObjectException {
+ public void addSystem(long id, BusinessSystem system) throws NotExistObjectException {
SystemConfig find = systemConfigDao.find(SystemConfig.class, id);
if(find==null){
throw new NotExistObjectException("涓嶅瓨鍦ㄨ瀛愮郴缁�");
@@ -111,12 +111,12 @@
throw new NotExistObjectException("涓嶅瓨鍦ㄨ瀵硅薄");
}
sc.setUpdatetime(java.lang.System.currentTimeMillis());
- Set<System> newSystems=new HashSet<System>();
- Set<System> systems = sc.getSystems();
- for (System system : systems) {
+ Set<BusinessSystem> newSystems=new HashSet<BusinessSystem>();
+ Set<BusinessSystem> systems = sc.getSystems();
+ for (BusinessSystem system : systems) {
String platform = Utils.getMap().get(String.valueOf(system.getPlatform()));
String packages = system.getPackageName();
- System sfind = systemService.getSystem(platform, packages);
+ BusinessSystem sfind = businessSystemService.getBusinessSystem(platform, packages);
if(sfind != null){
newSystems.add(sfind);
}
@@ -137,7 +137,7 @@
return list.get(0).getValue();
}
@Cacheable(value={"childSystemCache"}, key="#p0+#system.id")
- public String get(String key, System system) {
+ public String get(String key, BusinessSystem system) {
if(system==null || system.getId()==0){
return "";
}
--
Gitblit v1.8.0