Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
Overview
Overview
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
base_platform_enterprise
gic-store
Commits
32b049b9
Commit
32b049b9
authored
Jul 02, 2019
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店完善状态
parent
7750cd19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
19 deletions
+77
-19
StoreDTO.java
gic-store-api/src/main/java/com/gic/store/dto/StoreDTO.java
+11
-0
TabStore.java
...-service/src/main/java/com/gic/store/entity/TabStore.java
+13
-0
StoreService.java
...ice/src/main/java/com/gic/store/service/StoreService.java
+2
-0
StoreServiceImpl.java
...ain/java/com/gic/store/service/impl/StoreServiceImpl.java
+27
-1
StoreApiServiceImpl.java
...java/com/gic/store/service/outer/StoreApiServiceImpl.java
+2
-1
StoreBrandApiServiceImpl.java
...com/gic/store/service/outer/StoreBrandApiServiceImpl.java
+0
-1
TabStoreMapper.xml
...tore-service/src/main/resources/mapper/TabStoreMapper.xml
+22
-16
No files found.
gic-store-api/src/main/java/com/gic/store/dto/StoreDTO.java
View file @
32b049b9
...
...
@@ -75,6 +75,8 @@ public class StoreDTO implements Serializable {
*/
private
Integer
status
;
private
Integer
completeStatus
;
/**
* erp门店状态
*/
...
...
@@ -111,6 +113,7 @@ public class StoreDTO implements Serializable {
private
String
provinces
;
private
Integer
createType
;
public
Integer
getStoreId
()
{
return
storeId
;
}
...
...
@@ -334,4 +337,12 @@ public class StoreDTO implements Serializable {
public
void
setCreateType
(
Integer
createType
)
{
this
.
createType
=
createType
;
}
public
Integer
getCompleteStatus
()
{
return
completeStatus
;
}
public
void
setCompleteStatus
(
Integer
completeStatus
)
{
this
.
completeStatus
=
completeStatus
;
}
}
gic-store-service/src/main/java/com/gic/store/entity/TabStore.java
View file @
32b049b9
...
...
@@ -82,6 +82,11 @@ public class TabStore {
private
Integer
overflowStatus
;
/**
* 完善标识(0:未完善,1:已完善)
*/
private
Integer
completeStatus
;
/**
* 门店启用状态;1启用 2不启用
*/
private
Integer
status
;
...
...
@@ -236,6 +241,14 @@ public class TabStore {
this
.
overflowStatus
=
overflowStatus
;
}
public
Integer
getCompleteStatus
()
{
return
completeStatus
;
}
public
void
setCompleteStatus
(
Integer
completeStatus
)
{
this
.
completeStatus
=
completeStatus
;
}
public
Integer
getStatus
()
{
return
status
;
}
...
...
gic-store-service/src/main/java/com/gic/store/service/StoreService.java
View file @
32b049b9
...
...
@@ -52,4 +52,6 @@ public interface StoreService {
Integer
countByStoreCode
(
Integer
enterpriseId
,
String
storeCode
,
Integer
storeId
);
Page
listStore
(
StoreDTO
storeDTO
,
Integer
pageNum
,
Integer
pageSize
);
Integer
checkCompleteStatus
(
StoreDTO
storeDTO
);
}
gic-store-service/src/main/java/com/gic/store/service/impl/StoreServiceImpl.java
View file @
32b049b9
package
com
.
gic
.
store
.
service
.
impl
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.store.dao.mapper.TabStoreMapper
;
import
com.gic.store.dto.StoreDTO
;
import
com.gic.store.entity.TabStore
;
import
com.gic.store.service.StoreService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -38,7 +41,9 @@ public class StoreServiceImpl implements StoreService {
tabStore
.
setProvinces
(
copy
.
getProvinces
());
tabStore
.
setLongitude
(
copy
.
getLongitude
());
tabStore
.
setLatitude
(
copy
.
getLatitude
());
tabStore
.
setCompleteStatus
(
copy
.
getCompleteStatus
());
// TODO 这里要判断一下总量
tabStore
.
setOverflowStatus
(
0
);
tabStore
.
setStatus
(
copy
.
getStatus
());
...
...
@@ -73,7 +78,7 @@ public class StoreServiceImpl implements StoreService {
tabStore
.
setErpStatus
(
copy
.
getErpStatus
());
tabStore
.
setStoreType
(
copy
.
getStoreType
());
tabStore
.
setStoreGroupId
(
copy
.
getStoreGroupId
());
tabStore
.
set
UpdateTime
(
copy
.
getUpdateTime
());
tabStore
.
set
CompleteStatus
(
copy
.
getCompleteStatus
());
return
tabStoreMapper
.
updateByPrimaryKeySelective
(
tabStore
);
}
...
...
@@ -114,4 +119,25 @@ public class StoreServiceImpl implements StoreService {
PageHelper
.
startPage
(
pageNum
,
pageSize
);
return
tabStoreMapper
.
listStore
(
storeDTO
);
}
@Override
public
Integer
checkCompleteStatus
(
StoreDTO
storeDTO
)
{
return
StringUtils
.
isNotBlank
(
storeDTO
.
getStoreName
())
&&
storeDTO
.
getRegionId
()
!=
null
&&
StringUtils
.
isNotBlank
(
storeDTO
.
getStoreCode
())
&&
CollectionUtils
.
isNotEmpty
(
storeDTO
.
getPhotoList
())
&&
storeDTO
.
getStoreType
()
!=
null
&&
storeDTO
.
getErpStatus
()
!=
null
&&
StringUtils
.
isNotBlank
(
storeDTO
.
getConactsPhone
())
&&
CollectionUtils
.
isNotEmpty
(
storeDTO
.
getBusinessTimeList
())
&&
storeDTO
.
getStoreGroupId
()
!=
null
&&
StringUtils
.
isNotBlank
(
storeDTO
.
getBrandIds
())
&&
StringUtils
.
isNotBlank
(
storeDTO
.
getProvinces
())
&&
StringUtils
.
isNotBlank
(
storeDTO
.
getLongitude
())
&&
StringUtils
.
isNotBlank
(
storeDTO
.
getLatitude
())
&&
StringUtils
.
isNotBlank
(
storeDTO
.
getAddress
())
?
GlobalInfo
.
DATA_STATUS_NORMAL
:
GlobalInfo
.
DATA_STATUS_DELETE
;
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/StoreApiServiceImpl.java
View file @
32b049b9
...
...
@@ -49,7 +49,8 @@ public class StoreApiServiceImpl implements StoreApiService {
if
(
count
>
0
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
ERR_6
.
getCode
(),
"关联主键参数已经存在"
);
}
Integer
completeStatus
=
storeService
.
checkCompleteStatus
(
storeDTO
);
storeDTO
.
setCompleteStatus
(
completeStatus
);
// 门店自身信息
if
(
storeDTO
.
getStoreId
()
==
null
)
{
Integer
id
=
storeService
.
save
(
storeDTO
);
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/StoreBrandApiServiceImpl.java
View file @
32b049b9
...
...
@@ -87,7 +87,6 @@ public class StoreBrandApiServiceImpl implements StoreBrandApiService {
@Override
public
ServiceResponse
<
List
<
Integer
>>
deleteByIds
(
Integer
enterpriseId
,
String
ids
)
{
//TODO 要查询门店中是否使用门店品牌
List
<
Integer
>
notDelList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
ids
))
{
String
[]
idArr
=
ids
.
split
(
GlobalInfo
.
FLAG_COMMA
);
...
...
gic-store-service/src/main/resources/mapper/TabStoreMapper.xml
View file @
32b049b9
...
...
@@ -17,6 +17,7 @@
<result
column=
"longitude"
jdbcType=
"VARCHAR"
property=
"longitude"
/>
<result
column=
"latitude"
jdbcType=
"VARCHAR"
property=
"latitude"
/>
<result
column=
"overflow_status"
jdbcType=
"INTEGER"
property=
"overflowStatus"
/>
<result
column=
"complete_status"
jdbcType=
"INTEGER"
property=
"completeStatus"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"erp_status"
jdbcType=
"INTEGER"
property=
"erpStatus"
/>
<result
column=
"store_type"
jdbcType=
"INTEGER"
property=
"storeType"
/>
...
...
@@ -28,7 +29,8 @@
<sql
id=
"Base_Column_List"
>
store_id, enterprise_id, store_name, store_code, region_id, conacts_phone, address,
brand_ids, province_id, city_id, area_id, provinces, longitude, latitude, overflow_status,
status, erp_status, store_type, store_group_id, create_type, create_time, update_time
complete_status, status, erp_status, store_type, store_group_id, create_type, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -41,30 +43,24 @@
where store_id = #{storeId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabStore"
>
<selectKey
keyProperty=
"storeId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_store (store_id, enterprise_id, store_name,
store_code, region_id, conacts_phone,
address, brand_ids, province_id,
city_id, area_id, provinces,
longitude, latitude, overflow_status,
status, erp_status, store_type
,
store_
group_id, create_type, create_tim
e,
update_time)
complete_status, status, erp_status
,
store_
type, store_group_id, create_typ
e,
create_time,
update_time)
values (#{storeId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeCode,jdbcType=VARCHAR}, #{regionId,jdbcType=INTEGER}, #{conactsPhone,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{brandIds,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR},
#{cityId,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR}, #{provinces,jdbcType=VARCHAR},
#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{overflowStatus,jdbcType=INTEGER},
#{
status,jdbcType=INTEGER}, #{erpStatus,jdbcType=INTEGER}, #{storeType
,jdbcType=INTEGER},
#{store
GroupId,jdbcType=INTEGER}, #{createType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP
},
#{updateTime,jdbcType=TIMESTAMP})
#{
completeStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{erpStatus
,jdbcType=INTEGER},
#{store
Type,jdbcType=INTEGER}, #{storeGroupId,jdbcType=INTEGER}, #{createType,jdbcType=INTEGER
},
#{
createTime,jdbcType=TIMESTAMP}, #{
updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabStore"
>
<selectKey
keyProperty=
"storeId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_store
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"storeId != null"
>
...
...
@@ -112,6 +108,9 @@
<if
test=
"overflowStatus != null"
>
overflow_status,
</if>
<if
test=
"completeStatus != null"
>
complete_status,
</if>
<if
test=
"status != null"
>
status,
</if>
...
...
@@ -180,6 +179,9 @@
<if
test=
"overflowStatus != null"
>
#{overflowStatus,jdbcType=INTEGER},
</if>
<if
test=
"completeStatus != null"
>
#{completeStatus,jdbcType=INTEGER},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
...
...
@@ -248,6 +250,9 @@
<if
test=
"overflowStatus != null"
>
overflow_status = #{overflowStatus,jdbcType=INTEGER},
</if>
<if
test=
"completeStatus != null"
>
complete_status = #{completeStatus,jdbcType=INTEGER},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
...
...
@@ -288,6 +293,7 @@
longitude = #{longitude,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=VARCHAR},
overflow_status = #{overflowStatus,jdbcType=INTEGER},
complete_status = #{completeStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
erp_status = #{erpStatus,jdbcType=INTEGER},
store_type = #{storeType,jdbcType=INTEGER},
...
...
@@ -311,7 +317,7 @@
and store_code = #{storeCode}
</if>
<if
test=
"storeId != null"
>
and store_id
<>
#{storeId}
and store_id
<>
#{storeId}
</if>
</where>
</select>
...
...
@@ -327,7 +333,6 @@
<select
id=
"listStore"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_store
from tab_store
</select>
</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