Commit 02533198 authored by wangyihao's avatar wangyihao

修改 过滤条件, 删除不用的controller

parent 380fd545
......@@ -136,19 +136,26 @@ public class IndexController {
store.setIsDeleted(0); // 未删除
store.setIsAvailable(1); // 店铺启用状态
store.setIsShopping(1); // 店铺展示状态
String str = store.getConsumeInterval();
String[] arrStr = str.split("-");
int firstNumber = Integer.valueOf(arrStr[0]);
int lastNUmber = Integer.valueOf(arrStr[1]);
store.setConsumeInterval(null);
int firstNumber = 0;
int lastNUmber = 0;
if(store.getConsumeInterval() != null && !"".equals(store.getConsumeInterval())) {
String str = store.getConsumeInterval();
String[] arrStr = str.split("-");
firstNumber = Integer.valueOf(arrStr[0]);
lastNUmber = Integer.valueOf(arrStr[1]);
store.setConsumeInterval(null);
}
List<Store> storelist = storeService.getStoreList(new Query(store));
if (storelist.size() > 0 && storelist != null) {
for (Store list : storelist) {
String[] strQuery = list.getConsumeInterval().split("-");
int firstNumber1 = Integer.valueOf(strQuery[0]);
int lastNUmber1 = Integer.valueOf(strQuery[1]);
if (lastNUmber1 < firstNumber || firstNumber1 > lastNUmber) {
continue;
if(firstNumber !=0 || lastNUmber !=0) {
if (lastNUmber1 < firstNumber || firstNumber1 > lastNUmber) {
continue;
}
}
listQuery.add(list);
}
......@@ -204,7 +211,7 @@ public class IndexController {
if (workerlist.size() > 0 && workerlist != null) {
for (Worker list : workerlist) {
int hegit = Integer.valueOf(list.getWorkerHeight());
if (firstNumber != 0 && lastNUmber != 0) {
if (firstNumber != 0 || lastNUmber != 0) {
if (hegit < firstNumber || hegit > lastNUmber) {
continue;
}
......
package cn.com.fqy.controller.mapi;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("hello")
public class hello {
@RequestMapping("fqy")
@ResponseBody
public String fqy (){
return "fqy";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment