Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luoyangfei
store-system
Commits
f1e529ae
Commit
f1e529ae
authored
Nov 12, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 员工年龄字段类型
parent
f11f3e9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
29 deletions
+29
-29
IndexController.java
...main/java/cn/com/fqy/controller/mapi/IndexController.java
+18
-18
Worker.java
...re-system/src/main/java/cn/com/fqy/core/model/Worker.java
+5
-5
WorkerMapper.xml
...system/src/main/resources/mybatis/mapper/WorkerMapper.xml
+6
-6
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/IndexController.java
View file @
f1e529ae
...
...
@@ -113,12 +113,13 @@ public class IndexController {
}
//
// /**
// * 搜索查询 - 待需求明确
// *
首页
搜索查询 - 待需求明确
// */
// @RequestMapping("searchS
hop
")
// @RequestMapping("searchS
toreResult
")
// @ResponseBody
// public PageFinder<Store> searchS
hop
Result(Store store){
// public PageFinder<Store> searchS
tore
Result(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
.
getWorker
Weight
()
!=
null
&&
!
""
.
equals
(
worker
.
getWorkerWeight
()))
{
String
str1
=
worker
.
getWorker
Height
();
//
年龄
区间过滤
if
(
worker
.
getWorker
Age
()
!=
null
&&
!
""
.
equals
(
worker
.
getWorkerAge
()))
{
String
str1
=
worker
.
getWorker
Age
();
String
[]
arrStr1
=
str1
.
split
(
"-"
);
firstNumber1
=
Integer
.
valueOf
(
arrStr1
[
0
]);
lastNUmber1
=
Integer
.
valueOf
(
arrStr1
[
1
]);
worker
.
setWorker
Weight
(
null
);
worker
.
setWorker
Age
(
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
;
}
}
...
...
2code/server/store-system/src/main/java/cn/com/fqy/core/model/Worker.java
View file @
f1e529ae
...
...
@@ -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
;
}
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/WorkerMapper.xml
View file @
f1e529ae
...
...
@@ -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=
"INTEGE
R"
/>
<result
column=
"WORKER_AGE"
property=
"workerAge"
javaType=
"java.lang.
String"
jdbcType=
"VARCHA
R"
/>
<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 =
INTEGE
R},
#{workerAge,jdbcType =
VARCHA
R},
#{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 =
INTEGE
R},
<if
test=
"workerAge!=null
and workerAge!=''
"
>
WORKER_AGE=#{workerAge,jdbcType =
VARCHA
R},
</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!=''"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment