Commit f1e529ae authored by wangyihao's avatar wangyihao

修改 员工年龄字段类型

parent f11f3e9a
......@@ -113,12 +113,13 @@ public class IndexController {
}
//
// /**
// * 搜索查询 - 待需求明确
// * 首页搜索查询 - 待需求明确
// */
// @RequestMapping("searchShop")
// @RequestMapping("searchStoreResult")
// @ResponseBody
// public PageFinder<Store> searchShopResult(Store store){
// public PageFinder<Store> searchStoreResult(Store store){
// store.setIsDeleted(0); //未删除
// store.setIsAvailable(1); //店铺启用状态
// store.setIsShopping(1); //店铺展示状态
......@@ -126,7 +127,7 @@ public class IndexController {
// return storeService.getStorePagedList(q);
// }
/**
* 店铺搜索查询
* 店铺过滤搜索查询
*/
@RequestMapping("searchShopResult")
@ResponseBody
......@@ -138,21 +139,20 @@ public class IndexController {
store.setIsShopping(1); // 店铺展示状态
int firstNumber = 0;
int lastNUmber = 0;
if(store.getConsumeInterval() != null && !"".equals(store.getConsumeInterval())) {
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(firstNumber !=0 || lastNUmber !=0) {
if (firstNumber != 0 || lastNUmber != 0) {
String[] strQuery = list.getConsumeInterval().split("-");
int firstNumber1 = Integer.valueOf(strQuery[0]);
int lastNUmber1 = Integer.valueOf(strQuery[1]);
if (lastNUmber1 < firstNumber || firstNumber1 > lastNUmber) {
continue;
}
......@@ -174,7 +174,7 @@ public class IndexController {
}
/**
* 员工搜索查询
* 员工过滤搜索查询
*/
@RequestMapping("searchWorkerResult")
@ResponseBody
......@@ -197,28 +197,28 @@ public class IndexController {
}
// 体重区间过滤
if (worker.getWorkerWeight() != null && !"".equals(worker.getWorkerWeight())) {
String str1 = worker.getWorkerHeight();
// 年龄区间过滤
if (worker.getWorkerAge() != null && !"".equals(worker.getWorkerAge())) {
String str1 = worker.getWorkerAge();
String[] arrStr1 = str1.split("-");
firstNumber1 = Integer.valueOf(arrStr1[0]);
lastNUmber1 = Integer.valueOf(arrStr1[1]);
worker.setWorkerWeight(null);
worker.setWorkerAge(null);
}
List<Worker> workerlist = workerService.getWorkerList(new Query(worker));
if (workerlist.size() > 0 && workerlist != null) {
for (Worker list : workerlist) {
int hegit = Integer.valueOf(list.getWorkerHeight());
if (firstNumber != 0 || lastNUmber != 0) {
int hegit = Integer.valueOf(list.getWorkerHeight());
if (hegit < firstNumber || hegit > lastNUmber) {
continue;
}
}
if (firstNumber1 != 0 && lastNUmber1 != 0) {
int weight = Integer.valueOf(list.getWorkerWeight());
if (hegit < firstNumber1 || hegit > lastNUmber1) {
int age = Integer.valueOf(list.getWorkerAge());
if (age < firstNumber1 || age > lastNUmber1) {
continue;
}
}
......
......@@ -22,7 +22,7 @@ public class Worker extends Entity<String> {
//性别
private Integer workerSex;
//年龄
private Integer workerAge;
private String workerAge;
//生日
private String workerBirthday;
//祖籍
......@@ -146,14 +146,14 @@ public class Worker extends Entity<String> {
this.workerSex = workerSex;
}
public Integer getWorkerAge(){
public String getWorkerAge() {
return workerAge;
}
public void setWorkerAge(Integer workerAge){
public void setWorkerAge(String workerAge) {
this.workerAge = workerAge;
}
public String getWorkerBirthday(){
return workerBirthday;
}
......
......@@ -7,7 +7,7 @@
<result column="WORKER_NAME" property="workerName" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="WORKER_NUMBER" property="workerNumber" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="WORKER_SEX" property="workerSex" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="WORKER_AGE" property="workerAge" javaType="java.lang.Integer" jdbcType="INTEGER"/>
<result column="WORKER_AGE" property="workerAge" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="WORKER_BIRTHDAY" property="workerBirthday" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="WORKER_ANCESTRAL" property="workerAncestral" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="WORKER_HEIGHT" property="workerHeight" javaType="java.lang.String" jdbcType="VARCHAR"/>
......@@ -95,7 +95,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
#{workerName,jdbcType = VARCHAR},
#{workerNumber,jdbcType = VARCHAR},
#{workerSex,jdbcType = TINYINT},
#{workerAge,jdbcType = INTEGER},
#{workerAge,jdbcType = VARCHAR},
#{workerBirthday,jdbcType = VARCHAR},
#{workerAncestral,jdbcType = VARCHAR},
#{workerHeight,jdbcType = VARCHAR},
......@@ -136,8 +136,8 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
<if test="workerSex!=null ">
WORKER_SEX=#{workerSex,jdbcType = TINYINT},
</if>
<if test="workerAge!=null ">
WORKER_AGE=#{workerAge,jdbcType = INTEGER},
<if test="workerAge!=null and workerAge!=''">
WORKER_AGE=#{workerAge,jdbcType = VARCHAR},
</if>
<if test="workerBirthday!=null and workerBirthday!=''">
WORKER_BIRTHDAY=#{workerBirthday,jdbcType = VARCHAR},
......@@ -279,7 +279,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
<if test="q.workerSex!=null ">
AND WORKER_SEX=#{q.workerSex}
</if>
<if test="q.workerAge!=null ">
<if test="q.workerAge!=null and q.workerAge!=''">
AND WORKER_AGE=#{q.workerAge}
</if>
<if test="q.workerBirthday!=null and q.workerBirthday!=''">
......@@ -401,7 +401,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
<if test="q.workerSex!=null ">
AND WORKER_SEX=#{q.workerSex}
</if>
<if test="q.workerAge!=null ">
<if test="q.workerAge!=null and q.workerAge!=''">
AND WORKER_AGE=#{q.workerAge}
</if>
<if test="q.workerBirthday!=null and q.workerBirthday!=''">
......
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