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
4ce27d53
Commit
4ce27d53
authored
Nov 13, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增 店铺表 字段
parent
9a1ba06c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
5 deletions
+111
-5
WebShopController.java
...in/java/cn/com/fqy/controller/mapi/WebShopController.java
+1
-0
Store.java
...ore-system/src/main/java/cn/com/fqy/core/model/Store.java
+42
-1
StoreServiceImpl.java
...n/java/cn/com/fqy/core/service/impl/StoreServiceImpl.java
+7
-0
WorkerServiceImpl.java
.../java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
+6
-0
StoreMapper.xml
...-system/src/main/resources/mybatis/mapper/StoreMapper.xml
+55
-4
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/WebShopController.java
View file @
4ce27d53
...
...
@@ -93,6 +93,7 @@ public class WebShopController {
for
(
Store
list:
storeList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"storeId"
,
list
.
getStoreId
());
map
.
put
(
"countyId"
,
list
.
getCountyId
());
map
.
put
(
"county"
,
list
.
getCounty
());
listQuery
.
add
(
map
);
}
...
...
2code/server/store-system/src/main/java/cn/com/fqy/core/model/Store.java
View file @
4ce27d53
...
...
@@ -91,6 +91,14 @@ public class Store extends Entity<String> {
private
Integer
isAvailable
;
//店铺管理员名称
private
String
administratorsName
;
//市名称
private
String
cityName
;
//市ID
private
String
cityId
;
//省ID
private
String
provinceId
;
//区ID
private
String
countyId
;
/*Auto generated properties end*/
...
...
@@ -107,6 +115,38 @@ public class Store extends Entity<String> {
return
administratorsName
;
}
public
String
getCityName
()
{
return
cityName
;
}
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
;
}
public
String
getCityId
()
{
return
cityId
;
}
public
void
setCityId
(
String
cityId
)
{
this
.
cityId
=
cityId
;
}
public
String
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
String
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getCountyId
()
{
return
countyId
;
}
public
void
setCountyId
(
String
countyId
)
{
this
.
countyId
=
countyId
;
}
public
void
setAdministratorsName
(
String
administratorsName
)
{
this
.
administratorsName
=
administratorsName
;
}
...
...
@@ -445,6 +485,7 @@ public class Store extends Entity<String> {
+
", createTimeEnd="
+
createTimeEnd
+
", updateTime="
+
updateTime
+
", updateTimeStart="
+
updateTimeStart
+
", updateTimeEnd="
+
updateTimeEnd
+
", operatorId="
+
operatorId
+
", operatorType="
+
operatorType
+
", serialNumber="
+
serialNumber
+
", isDeleted="
+
isDeleted
+
", isAvailable="
+
isAvailable
+
", administratorsName="
+
administratorsName
+
"]"
;
+
", isAvailable="
+
isAvailable
+
", administratorsName="
+
administratorsName
+
", cityName="
+
cityName
+
", cityId="
+
cityId
+
", provinceId="
+
provinceId
+
", countyId="
+
countyId
+
"]"
;
}
}
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/StoreServiceImpl.java
View file @
4ce27d53
...
...
@@ -100,6 +100,13 @@ public class StoreServiceImpl implements StoreService {
try
{
//调用dao,根据主键查询
obj
=
storeDao
.
get
(
id
);
if
(
null
!=
obj
)
{
Store
store
=
new
Store
();
store
.
setStoreId
(
obj
.
getStoreId
());
store
.
setClicks
(
obj
.
getClicks
()+
1
);
storeDao
.
update
(
obj
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
}
...
...
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
View file @
4ce27d53
...
...
@@ -100,6 +100,12 @@ public class WorkerServiceImpl implements WorkerService {
try
{
//调用dao,根据主键查询
obj
=
workerDao
.
get
(
id
);
if
(
null
!=
obj
)
{
Worker
worker
=
new
Worker
();
worker
.
setWorkerId
(
obj
.
getWorkerId
());
worker
.
setClicks
(
obj
.
getClicks
()+
1
);
workerDao
.
update
(
worker
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
}
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/StoreMapper.xml
View file @
4ce27d53
...
...
@@ -34,6 +34,10 @@
<result
column=
"IS_DELETED"
property=
"isDeleted"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<result
column=
"IS_AVAILABLE"
property=
"isAvailable"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<result
column=
"ADMINISTRATORS_NAME"
property=
"administratorsName"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"CITY_NAME"
property=
"cityName"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"CITY_ID"
property=
"cityId"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"PROVINCE_ID"
property=
"provinceId"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"COUNTY_ID"
property=
"countyId"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
</resultMap>
...
...
@@ -43,7 +47,8 @@ STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE,
ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL,
STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME,
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME,
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
</sql>
<!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 -->
...
...
@@ -52,7 +57,8 @@ STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE,
ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL,
STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME,
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME,
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
</sql>
<insert
id=
"add"
parameterType=
"Store"
useGeneratedKeys=
"true"
keyProperty=
"storeId"
>
...
...
@@ -89,7 +95,11 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
SERIAL_NUMBER,
IS_DELETED,
IS_AVAILABLE,
ADMINISTRATORS_NAME
ADMINISTRATORS_NAME,
CITY_NAME,
CITY_ID,
PROVINCE_ID,
COUNTY_ID
) values (
<if
test=
"storeId!=null"
>
#{storeId,jdbcType = VARCHAR},
...
...
@@ -123,7 +133,11 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
#{serialNumber,jdbcType = INTEGER},
#{isDeleted,jdbcType = TINYINT},
#{isAvailable,jdbcType = TINYINT},
#{administratorsName,jdbcType = VARCHAR}
#{administratorsName,jdbcType = VARCHAR},
#{cityName,jdbcType = VARCHAR},
#{cityId,jdbcType = VARCHAR},
#{provinceId,jdbcType = VARCHAR},
#{countyId,jdbcType = VARCHAR}
)
</insert>
...
...
@@ -220,6 +234,18 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
<if
test=
"administratorsName!=null and administratorsName!=''"
>
ADMINISTRATORS_NAME=#{administratorsName,jdbcType = VARCHAR},
</if>
<if
test=
"cityName!=null and cityName!=''"
>
CITY_NAME=#{cityName,jdbcType = VARCHAR},
</if>
<if
test=
"cityId!=null and cityId!=''"
>
CITY_ID=#{cityId,jdbcType = VARCHAR},
</if>
<if
test=
"provinceId!=null and provinceId!=''"
>
PROVINCE_ID=#{provinceId,jdbcType = VARCHAR},
</if>
<if
test=
"countyId!=null and countyId!=''"
>
COUNTY_ID=#{countyId,jdbcType = VARCHAR},
</if>
</set>
<where>
AND STORE_ID=#{storeId}
...
...
@@ -390,6 +416,18 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
<if
test=
"q.administratorsName!=null and q.administratorsName!=''"
>
AND ADMINISTRATORS_NAME=#{q.administratorsName}
</if>
<if
test=
"q.cityName!=null and q.cityName!=''"
>
AND CITY_NAME=#{q.cityName}
</if>
<if
test=
"q.cityId!=null and q.cityId!=''"
>
AND CITY_ID=#{q.cityId}
</if>
<if
test=
"q.provinceId!=null and q.provinceId!=''"
>
AND PROVINCE_ID=#{q.provinceId}
</if>
<if
test=
"q.countyId!=null and q.countyId!=''"
>
AND COUNTY_ID=#{q.countyId}
</if>
</if>
</sql>
...
...
@@ -515,6 +553,18 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
<if
test=
"q.administratorsName!=null and q.administratorsName!=''"
>
AND ADMINISTRATORS_NAME=#{q.administratorsName}
</if>
<if
test=
"q.cityName!=null and q.cityName!=''"
>
AND CITY_NAME=#{q.cityName}
</if>
<if
test=
"q.cityId!=null and q.cityId!=''"
>
AND CITY_ID=#{q.cityId}
</if>
<if
test=
"q.provinceId!=null and q.provinceId!=''"
>
AND PROVINCE_ID=#{q.provinceId}
</if>
<if
test=
"q.countyId!=null and q.countyId!=''"
>
AND COUNTY_ID=#{q.countyId}
</if>
</if>
</sql>
</mapper>
\ No newline at end of file
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