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
d63a956b
Commit
d63a956b
authored
Jul 02, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
48e5e7a5
f1f642e2
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1359 additions
and
21 deletions
+1359
-21
WeekdayEnum.java
...api/src/main/java/com/gic/store/constant/WeekdayEnum.java
+41
-0
CityDTO.java
gic-store-api/src/main/java/com/gic/store/dto/CityDTO.java
+88
-0
CountyDTO.java
gic-store-api/src/main/java/com/gic/store/dto/CountyDTO.java
+114
-0
ProvinceDTO.java
...tore-api/src/main/java/com/gic/store/dto/ProvinceDTO.java
+75
-0
StoreBusinessTimeDTO.java
...src/main/java/com/gic/store/dto/StoreBusinessTimeDTO.java
+10
-0
StoreDTO.java
gic-store-api/src/main/java/com/gic/store/dto/StoreDTO.java
+11
-0
ProvincesApiService.java
.../main/java/com/gic/store/service/ProvincesApiService.java
+16
-0
TabCityMapper.java
...src/main/java/com/gic/store/dao/mapper/TabCityMapper.java
+62
-0
TabCountyMapper.java
...c/main/java/com/gic/store/dao/mapper/TabCountyMapper.java
+58
-0
TabProvinceMapper.java
...main/java/com/gic/store/dao/mapper/TabProvinceMapper.java
+58
-0
TabCity.java
...e-service/src/main/java/com/gic/store/entity/TabCity.java
+87
-0
TabCounty.java
...service/src/main/java/com/gic/store/entity/TabCounty.java
+113
-0
TabProvince.java
...rvice/src/main/java/com/gic/store/entity/TabProvince.java
+74
-0
TabStore.java
...-service/src/main/java/com/gic/store/entity/TabStore.java
+13
-0
ProvincesService.java
...src/main/java/com/gic/store/service/ProvincesService.java
+15
-0
StoreBusinessTimeService.java
.../java/com/gic/store/service/StoreBusinessTimeService.java
+2
-0
StoreService.java
...ice/src/main/java/com/gic/store/service/StoreService.java
+2
-0
ProvincesServiceImpl.java
...java/com/gic/store/service/impl/ProvincesServiceImpl.java
+38
-0
StoreBusinessTimeServiceImpl.java
.../gic/store/service/impl/StoreBusinessTimeServiceImpl.java
+27
-2
StoreServiceImpl.java
...ain/java/com/gic/store/service/impl/StoreServiceImpl.java
+27
-1
ProvincesApiServiceImpl.java
.../com/gic/store/service/outer/ProvincesApiServiceImpl.java
+54
-0
StoreApiServiceImpl.java
...java/com/gic/store/service/outer/StoreApiServiceImpl.java
+3
-1
StoreBrandApiServiceImpl.java
...com/gic/store/service/outer/StoreBrandApiServiceImpl.java
+0
-1
TabCityMapper.xml
...store-service/src/main/resources/mapper/TabCityMapper.xml
+113
-0
TabCountyMapper.xml
...ore-service/src/main/resources/mapper/TabCountyMapper.xml
+136
-0
TabProvinceMapper.xml
...e-service/src/main/resources/mapper/TabProvinceMapper.xml
+100
-0
TabStoreMapper.xml
...tore-service/src/main/resources/mapper/TabStoreMapper.xml
+22
-16
No files found.
gic-store-api/src/main/java/com/gic/store/constant/WeekdayEnum.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
constant
;
/**
* @author zhiwj
* @date 2019/7/2
*/
public
enum
WeekdayEnum
{
MONDAY
(
1
,
"周一"
),
TUESDAY
(
2
,
"周二"
),
WEDNESDAY
(
3
,
"周三"
),
THURSDAY
(
4
,
"周四"
),
FRIDAY
(
5
,
"周五"
),
SATURDAY
(
6
,
"周六"
),
SUNDAY
(
7
,
"周日"
);
private
int
code
;
private
String
message
;
WeekdayEnum
(
int
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
static
String
parse
(
int
code
)
{
for
(
WeekdayEnum
weekday
:
values
())
{
if
(
weekday
.
getCode
()
==
code
)
{
return
weekday
.
message
;
}
}
return
null
;
}
}
gic-store-api/src/main/java/com/gic/store/dto/CityDTO.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* tab_city
*/
public
class
CityDTO
implements
Serializable
{
/**
* 城市id
*/
private
String
cityId
;
/**
* 城市名称
*/
private
String
cityName
;
/**
* 省份id
*/
private
String
provinceId
;
/**
* 城市拼音
*/
private
String
cityPy
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
public
String
getCityId
()
{
return
cityId
;
}
public
void
setCityId
(
String
cityId
)
{
this
.
cityId
=
cityId
;
}
public
String
getCityName
()
{
return
cityName
;
}
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
;
}
public
String
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
String
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getCityPy
()
{
return
cityPy
;
}
public
void
setCityPy
(
String
cityPy
)
{
this
.
cityPy
=
cityPy
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
gic-store-api/src/main/java/com/gic/store/dto/CountyDTO.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* tab_county
*/
public
class
CountyDTO
implements
Serializable
{
/**
*
*/
private
String
countyId
;
/**
*
*/
private
String
countyName
;
/**
*
*/
private
String
cityId
;
/**
*
*/
private
String
provinceId
;
/**
*
*/
private
String
fullName
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
* 拼音
*/
private
String
countyPy
;
public
String
getCountyId
()
{
return
countyId
;
}
public
void
setCountyId
(
String
countyId
)
{
this
.
countyId
=
countyId
;
}
public
String
getCountyName
()
{
return
countyName
;
}
public
void
setCountyName
(
String
countyName
)
{
this
.
countyName
=
countyName
;
}
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
getFullName
()
{
return
fullName
;
}
public
void
setFullName
(
String
fullName
)
{
this
.
fullName
=
fullName
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getCountyPy
()
{
return
countyPy
;
}
public
void
setCountyPy
(
String
countyPy
)
{
this
.
countyPy
=
countyPy
;
}
}
\ No newline at end of file
gic-store-api/src/main/java/com/gic/store/dto/ProvinceDTO.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* tab_province
*/
public
class
ProvinceDTO
implements
Serializable
{
/**
* 省份id
*/
private
String
provinceId
;
/**
* 省份名称
*/
private
String
provinceName
;
/**
* 省份拼音
*/
private
String
provincePy
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
public
String
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
String
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getProvinceName
()
{
return
provinceName
;
}
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
;
}
public
String
getProvincePy
()
{
return
provincePy
;
}
public
void
setProvincePy
(
String
provincePy
)
{
this
.
provincePy
=
provincePy
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
gic-store-api/src/main/java/com/gic/store/dto/StoreBusinessTimeDTO.java
View file @
d63a956b
...
...
@@ -35,6 +35,8 @@ public class StoreBusinessTimeDTO implements Serializable {
*/
private
Integer
storeId
;
private
String
weekdayShow
;
public
Integer
getStoreBusinessTimeId
()
{
return
storeBusinessTimeId
;
}
...
...
@@ -74,4 +76,12 @@ public class StoreBusinessTimeDTO implements Serializable {
public
void
setStoreId
(
Integer
storeId
)
{
this
.
storeId
=
storeId
;
}
public
String
getWeekdayShow
()
{
return
weekdayShow
;
}
public
void
setWeekdayShow
(
String
weekdayShow
)
{
this
.
weekdayShow
=
weekdayShow
;
}
}
gic-store-api/src/main/java/com/gic/store/dto/StoreDTO.java
View file @
d63a956b
...
...
@@ -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-api/src/main/java/com/gic/store/service/ProvincesApiService.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
service
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.store.dto.CityDTO
;
import
com.gic.store.dto.CountyDTO
;
import
com.gic.store.dto.ProvinceDTO
;
import
java.util.List
;
public
interface
ProvincesApiService
{
ServiceResponse
<
List
<
ProvinceDTO
>>
selectAllProvince
();
ServiceResponse
<
List
<
CityDTO
>>
selectAllCity
();
ServiceResponse
<
List
<
CountyDTO
>>
selectAllCounty
();
}
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabCityMapper.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
dao
.
mapper
;
import
com.gic.store.entity.TabCity
;
import
java.util.List
;
public
interface
TabCityMapper
{
/**
* 根据主键删除
*
* @param cityId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
String
cityId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabCity
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabCity
record
);
/**
* 根据主键查询
*
* @param cityId 主键
* @return 实体对象
*/
TabCity
selectByPrimaryKey
(
String
cityId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabCity
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabCity
record
);
/**
* 查询所有城市
* @return
*/
List
<
TabCity
>
selectAllCity
();
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabCountyMapper.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
dao
.
mapper
;
import
com.gic.store.entity.TabCounty
;
import
java.util.List
;
public
interface
TabCountyMapper
{
/**
* 根据主键删除
*
* @param countyId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
String
countyId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabCounty
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabCounty
record
);
/**
* 根据主键查询
*
* @param countyId 主键
* @return 实体对象
*/
TabCounty
selectByPrimaryKey
(
String
countyId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabCounty
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabCounty
record
);
List
<
TabCounty
>
selectAllCounty
();
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabProvinceMapper.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
dao
.
mapper
;
import
com.gic.store.entity.TabProvince
;
import
java.util.List
;
public
interface
TabProvinceMapper
{
/**
* 根据主键删除
*
* @param provinceId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
String
provinceId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabProvince
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabProvince
record
);
/**
* 根据主键查询
*
* @param provinceId 主键
* @return 实体对象
*/
TabProvince
selectByPrimaryKey
(
String
provinceId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabProvince
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabProvince
record
);
List
<
TabProvince
>
selectAllProvince
();
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/TabCity.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
entity
;
import
java.util.Date
;
/**
* tab_city
*/
public
class
TabCity
{
/**
* 城市id
*/
private
String
cityId
;
/**
* 城市名称
*/
private
String
cityName
;
/**
* 省份id
*/
private
String
provinceId
;
/**
* 城市拼音
*/
private
String
cityPy
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
public
String
getCityId
()
{
return
cityId
;
}
public
void
setCityId
(
String
cityId
)
{
this
.
cityId
=
cityId
;
}
public
String
getCityName
()
{
return
cityName
;
}
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
;
}
public
String
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
String
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getCityPy
()
{
return
cityPy
;
}
public
void
setCityPy
(
String
cityPy
)
{
this
.
cityPy
=
cityPy
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/TabCounty.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
entity
;
import
java.util.Date
;
/**
* tab_county
*/
public
class
TabCounty
{
/**
*
*/
private
String
countyId
;
/**
*
*/
private
String
countyName
;
/**
*
*/
private
String
cityId
;
/**
*
*/
private
String
provinceId
;
/**
*
*/
private
String
fullName
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
* 拼音
*/
private
String
countyPy
;
public
String
getCountyId
()
{
return
countyId
;
}
public
void
setCountyId
(
String
countyId
)
{
this
.
countyId
=
countyId
;
}
public
String
getCountyName
()
{
return
countyName
;
}
public
void
setCountyName
(
String
countyName
)
{
this
.
countyName
=
countyName
;
}
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
getFullName
()
{
return
fullName
;
}
public
void
setFullName
(
String
fullName
)
{
this
.
fullName
=
fullName
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getCountyPy
()
{
return
countyPy
;
}
public
void
setCountyPy
(
String
countyPy
)
{
this
.
countyPy
=
countyPy
;
}
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/TabProvince.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
entity
;
import
java.util.Date
;
/**
* tab_province
*/
public
class
TabProvince
{
/**
* 省份id
*/
private
String
provinceId
;
/**
* 省份名称
*/
private
String
provinceName
;
/**
* 省份拼音
*/
private
String
provincePy
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
public
String
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
String
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getProvinceName
()
{
return
provinceName
;
}
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
;
}
public
String
getProvincePy
()
{
return
provincePy
;
}
public
void
setProvincePy
(
String
provincePy
)
{
this
.
provincePy
=
provincePy
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/TabStore.java
View file @
d63a956b
...
...
@@ -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/ProvincesService.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
service
;
import
com.gic.store.entity.TabCity
;
import
com.gic.store.entity.TabCounty
;
import
com.gic.store.entity.TabProvince
;
import
java.util.List
;
public
interface
ProvincesService
{
List
<
TabProvince
>
selectAllProvince
();
List
<
TabCity
>
selectAllCity
();
List
<
TabCounty
>
selectAllCounty
();
}
gic-store-service/src/main/java/com/gic/store/service/StoreBusinessTimeService.java
View file @
d63a956b
...
...
@@ -13,4 +13,6 @@ public interface StoreBusinessTimeService {
void
editStoreBusinessTime
(
Integer
enterpriseId
,
Integer
storeId
,
List
<
StoreBusinessTimeDTO
>
businessTimeList
,
List
<
Integer
>
delBusinessTimes
);
List
<
TabStoreBusinessTime
>
listBusinessTime
(
Integer
storeId
);
void
convertBusinessTime
(
List
<
StoreBusinessTimeDTO
>
businessTimeDTOList
);
}
gic-store-service/src/main/java/com/gic/store/service/StoreService.java
View file @
d63a956b
...
...
@@ -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/ProvincesServiceImpl.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
service
.
impl
;
import
com.gic.store.dao.mapper.TabCityMapper
;
import
com.gic.store.dao.mapper.TabCountyMapper
;
import
com.gic.store.dao.mapper.TabProvinceMapper
;
import
com.gic.store.entity.TabCity
;
import
com.gic.store.entity.TabCounty
;
import
com.gic.store.entity.TabProvince
;
import
com.gic.store.service.ProvincesService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"provincesService"
)
public
class
ProvincesServiceImpl
implements
ProvincesService
{
@Autowired
private
TabProvinceMapper
tabProvinceMapper
;
@Autowired
private
TabCityMapper
tabCityMapper
;
@Autowired
private
TabCountyMapper
tabCountyMapper
;
@Override
public
List
<
TabProvince
>
selectAllProvince
()
{
return
this
.
tabProvinceMapper
.
selectAllProvince
();
}
@Override
public
List
<
TabCity
>
selectAllCity
()
{
return
this
.
tabCityMapper
.
selectAllCity
();
}
@Override
public
List
<
TabCounty
>
selectAllCounty
()
{
return
this
.
tabCountyMapper
.
selectAllCounty
();
}
}
gic-store-service/src/main/java/com/gic/store/service/impl/StoreBusinessTimeServiceImpl.java
View file @
d63a956b
package
com
.
gic
.
store
.
service
.
impl
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.store.constant.WeekdayEnum
;
import
com.gic.store.dao.mapper.TabStoreBusinessTimeMapper
;
import
com.gic.store.dto.StoreBusinessTimeDTO
;
import
com.gic.store.entity.TabStoreBusinessTime
;
...
...
@@ -11,6 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @author zhiwj
...
...
@@ -30,7 +34,7 @@ public class StoreBusinessTimeServiceImpl implements StoreBusinessTimeService {
tabStoreBusinessTimeMapper
.
deleteByPrimaryKey
(
delId
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
businessTimeList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
businessTimeList
))
{
for
(
StoreBusinessTimeDTO
storeBusinessTimeDTO
:
businessTimeList
)
{
TabStoreBusinessTime
businessTime
=
new
TabStoreBusinessTime
();
businessTime
.
setStoreBusinessTimeId
(
storeBusinessTimeDTO
.
getStoreBusinessTimeId
());
...
...
@@ -50,6 +54,27 @@ public class StoreBusinessTimeServiceImpl implements StoreBusinessTimeService {
@Override
public
List
<
TabStoreBusinessTime
>
listBusinessTime
(
Integer
storeId
)
{
return
tabStoreBusinessTimeMapper
.
listBusinessTime
(
storeId
);
return
tabStoreBusinessTimeMapper
.
listBusinessTime
(
storeId
);
}
@Override
public
void
convertBusinessTime
(
List
<
StoreBusinessTimeDTO
>
businessTimeDTOList
)
{
for
(
StoreBusinessTimeDTO
storeBusinessTimeDTO
:
businessTimeDTOList
)
{
String
weekday
=
storeBusinessTimeDTO
.
getWeekday
();
List
<
Integer
>
list
=
Stream
.
of
(
weekday
.
split
(
GlobalInfo
.
FLAG_COMMA
)).
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
if
(
list
.
size
()
>=
3
&&
list
.
get
(
list
.
size
()
-
1
)
-
list
.
get
(
0
)
==
list
.
size
()
-
1
)
{
// 超过三条的需要判断
// 都是连续的
storeBusinessTimeDTO
.
setWeekdayShow
(
WeekdayEnum
.
parse
(
list
.
get
(
0
))
+
"至"
+
WeekdayEnum
.
parse
(
list
.
get
(
list
.
size
()
-
1
)));
}
else
{
// 直接解析返回
StringBuilder
sb
=
new
StringBuilder
();
for
(
Integer
code
:
list
)
{
sb
.
append
(
WeekdayEnum
.
parse
(
code
)).
append
(
"、"
);
}
sb
.
deleteCharAt
(
sb
.
length
()
-
1
);
storeBusinessTimeDTO
.
setWeekdayShow
(
sb
.
toString
());
}
}
}
}
gic-store-service/src/main/java/com/gic/store/service/impl/StoreServiceImpl.java
View file @
d63a956b
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/ProvincesApiServiceImpl.java
0 → 100644
View file @
d63a956b
package
com
.
gic
.
store
.
service
.
outer
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.store.dto.CityDTO
;
import
com.gic.store.dto.CountyDTO
;
import
com.gic.store.dto.ProvinceDTO
;
import
com.gic.store.service.ProvincesApiService
;
import
com.gic.store.service.ProvincesService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
@Service
(
"provincesApiService"
)
public
class
ProvincesApiServiceImpl
implements
ProvincesApiService
{
@Autowired
private
ProvincesService
provincesService
;
@Override
public
ServiceResponse
<
List
<
ProvinceDTO
>>
selectAllProvince
()
{
String
key
=
"enterprise:province"
;
List
<
ProvinceDTO
>
list
=
(
List
<
ProvinceDTO
>)
RedisUtil
.
getCache
(
key
);
if
(
list
==
null
){
list
=
EntityUtil
.
changeEntityListByJSON
(
ProvinceDTO
.
class
,
this
.
provincesService
.
selectAllProvince
());
RedisUtil
.
setCache
(
key
,
list
,
6
*
30
l
,
TimeUnit
.
DAYS
);
}
return
ServiceResponse
.
success
(
list
);
}
@Override
public
ServiceResponse
<
List
<
CityDTO
>>
selectAllCity
()
{
String
key
=
"enterprise:city"
;
List
<
CityDTO
>
list
=
(
List
<
CityDTO
>)
RedisUtil
.
getCache
(
key
);
if
(
list
==
null
){
list
=
EntityUtil
.
changeEntityListByJSON
(
CityDTO
.
class
,
this
.
provincesService
.
selectAllCity
());
RedisUtil
.
setCache
(
key
,
list
,
6
*
30
l
,
TimeUnit
.
DAYS
);
}
return
ServiceResponse
.
success
(
list
);
}
@Override
public
ServiceResponse
<
List
<
CountyDTO
>>
selectAllCounty
()
{
String
key
=
"enterprise:county"
;
List
<
CountyDTO
>
list
=
(
List
<
CountyDTO
>)
RedisUtil
.
getCache
(
key
);
if
(
list
==
null
){
list
=
EntityUtil
.
changeEntityListByJSON
(
CountyDTO
.
class
,
this
.
provincesService
.
selectAllCounty
());
RedisUtil
.
setCache
(
key
,
list
,
6
*
30
l
,
TimeUnit
.
DAYS
);
}
return
ServiceResponse
.
success
(
list
);
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/StoreApiServiceImpl.java
View file @
d63a956b
...
...
@@ -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
);
...
...
@@ -99,6 +100,7 @@ public class StoreApiServiceImpl implements StoreApiService {
List
<
TabStoreBusinessTime
>
tabBusinessTimeList
=
storeBusinessTimeService
.
listBusinessTime
(
store
.
getStoreId
());
List
<
StoreBusinessTimeDTO
>
businessTimeDTOList
=
EntityUtil
.
changeEntityListByOrika
(
StoreBusinessTimeDTO
.
class
,
tabBusinessTimeList
);
storeDTO
.
setBusinessTimeList
(
businessTimeDTOList
);
storeBusinessTimeService
.
convertBusinessTime
(
businessTimeDTOList
);
List
<
TabStoreBrand
>
storeBrandList
=
storeBrandService
.
listStoreBrandByIds
(
store
.
getBrandIds
());
List
<
StoreBrandDTO
>
brandDTOList
=
EntityUtil
.
changeEntityListByOrika
(
StoreBrandDTO
.
class
,
storeBrandList
);
storeDTO
.
setBrandList
(
brandDTOList
);
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/StoreBrandApiServiceImpl.java
View file @
d63a956b
...
...
@@ -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/TabCityMapper.xml
0 → 100644
View file @
d63a956b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.store.dao.mapper.TabCityMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.TabCity"
>
<id
column=
"city_id"
jdbcType=
"VARCHAR"
property=
"cityId"
/>
<result
column=
"city_name"
jdbcType=
"VARCHAR"
property=
"cityName"
/>
<result
column=
"province_id"
jdbcType=
"VARCHAR"
property=
"provinceId"
/>
<result
column=
"city_py"
jdbcType=
"VARCHAR"
property=
"cityPy"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
city_id, city_name, province_id, city_py, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_city
where city_id = #{cityId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_city
where city_id = #{cityId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabCity"
>
insert into tab_city (city_id, city_name, province_id,
city_py, create_time, update_time
)
values (#{cityId,jdbcType=VARCHAR}, #{cityName,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR},
#{cityPy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabCity"
>
insert into tab_city
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"cityId != null"
>
city_id,
</if>
<if
test=
"cityName != null"
>
city_name,
</if>
<if
test=
"provinceId != null"
>
province_id,
</if>
<if
test=
"cityPy != null"
>
city_py,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"cityId != null"
>
#{cityId,jdbcType=VARCHAR},
</if>
<if
test=
"cityName != null"
>
#{cityName,jdbcType=VARCHAR},
</if>
<if
test=
"provinceId != null"
>
#{provinceId,jdbcType=VARCHAR},
</if>
<if
test=
"cityPy != null"
>
#{cityPy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.TabCity"
>
update tab_city
<set>
<if
test=
"cityName != null"
>
city_name = #{cityName,jdbcType=VARCHAR},
</if>
<if
test=
"provinceId != null"
>
province_id = #{provinceId,jdbcType=VARCHAR},
</if>
<if
test=
"cityPy != null"
>
city_py = #{cityPy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where city_id = #{cityId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.TabCity"
>
update tab_city
set city_name = #{cityName,jdbcType=VARCHAR},
province_id = #{provinceId,jdbcType=VARCHAR},
city_py = #{cityPy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where city_id = #{cityId,jdbcType=VARCHAR}
</update>
<select
id=
"selectAllCity"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_city
</select>
</mapper>
\ No newline at end of file
gic-store-service/src/main/resources/mapper/TabCountyMapper.xml
0 → 100644
View file @
d63a956b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.store.dao.mapper.TabCountyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.TabCounty"
>
<id
column=
"county_id"
jdbcType=
"VARCHAR"
property=
"countyId"
/>
<result
column=
"county_name"
jdbcType=
"VARCHAR"
property=
"countyName"
/>
<result
column=
"city_id"
jdbcType=
"VARCHAR"
property=
"cityId"
/>
<result
column=
"province_id"
jdbcType=
"VARCHAR"
property=
"provinceId"
/>
<result
column=
"full_name"
jdbcType=
"VARCHAR"
property=
"fullName"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"county_py"
jdbcType=
"VARCHAR"
property=
"countyPy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
county_id, county_name, city_id, province_id, full_name, create_time, update_time,
county_py
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_county
where county_id = #{countyId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_county
where county_id = #{countyId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabCounty"
>
insert into tab_county (county_id, county_name, city_id,
province_id, full_name, create_time,
update_time, county_py)
values (#{countyId,jdbcType=VARCHAR}, #{countyName,jdbcType=VARCHAR}, #{cityId,jdbcType=VARCHAR},
#{provinceId,jdbcType=VARCHAR}, #{fullName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{countyPy,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabCounty"
>
insert into tab_county
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"countyId != null"
>
county_id,
</if>
<if
test=
"countyName != null"
>
county_name,
</if>
<if
test=
"cityId != null"
>
city_id,
</if>
<if
test=
"provinceId != null"
>
province_id,
</if>
<if
test=
"fullName != null"
>
full_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"countyPy != null"
>
county_py,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"countyId != null"
>
#{countyId,jdbcType=VARCHAR},
</if>
<if
test=
"countyName != null"
>
#{countyName,jdbcType=VARCHAR},
</if>
<if
test=
"cityId != null"
>
#{cityId,jdbcType=VARCHAR},
</if>
<if
test=
"provinceId != null"
>
#{provinceId,jdbcType=VARCHAR},
</if>
<if
test=
"fullName != null"
>
#{fullName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"countyPy != null"
>
#{countyPy,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.TabCounty"
>
update tab_county
<set>
<if
test=
"countyName != null"
>
county_name = #{countyName,jdbcType=VARCHAR},
</if>
<if
test=
"cityId != null"
>
city_id = #{cityId,jdbcType=VARCHAR},
</if>
<if
test=
"provinceId != null"
>
province_id = #{provinceId,jdbcType=VARCHAR},
</if>
<if
test=
"fullName != null"
>
full_name = #{fullName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"countyPy != null"
>
county_py = #{countyPy,jdbcType=VARCHAR},
</if>
</set>
where county_id = #{countyId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.TabCounty"
>
update tab_county
set county_name = #{countyName,jdbcType=VARCHAR},
city_id = #{cityId,jdbcType=VARCHAR},
province_id = #{provinceId,jdbcType=VARCHAR},
full_name = #{fullName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
county_py = #{countyPy,jdbcType=VARCHAR}
where county_id = #{countyId,jdbcType=VARCHAR}
</update>
<select
id=
"selectAllCounty"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_county
</select>
</mapper>
\ No newline at end of file
gic-store-service/src/main/resources/mapper/TabProvinceMapper.xml
0 → 100644
View file @
d63a956b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.store.dao.mapper.TabProvinceMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.TabProvince"
>
<id
column=
"province_id"
jdbcType=
"VARCHAR"
property=
"provinceId"
/>
<result
column=
"province_name"
jdbcType=
"VARCHAR"
property=
"provinceName"
/>
<result
column=
"province_py"
jdbcType=
"VARCHAR"
property=
"provincePy"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
province_id, province_name, province_py, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_province
where province_id = #{provinceId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_province
where province_id = #{provinceId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabProvince"
>
insert into tab_province (province_id, province_name, province_py,
create_time, update_time)
values (#{provinceId,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, #{provincePy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabProvince"
>
insert into tab_province
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"provinceId != null"
>
province_id,
</if>
<if
test=
"provinceName != null"
>
province_name,
</if>
<if
test=
"provincePy != null"
>
province_py,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"provinceId != null"
>
#{provinceId,jdbcType=VARCHAR},
</if>
<if
test=
"provinceName != null"
>
#{provinceName,jdbcType=VARCHAR},
</if>
<if
test=
"provincePy != null"
>
#{provincePy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.TabProvince"
>
update tab_province
<set>
<if
test=
"provinceName != null"
>
province_name = #{provinceName,jdbcType=VARCHAR},
</if>
<if
test=
"provincePy != null"
>
province_py = #{provincePy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where province_id = #{provinceId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.TabProvince"
>
update tab_province
set province_name = #{provinceName,jdbcType=VARCHAR},
province_py = #{provincePy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where province_id = #{provinceId,jdbcType=VARCHAR}
</update>
<select
id=
"selectAllProvince"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_province
</select>
</mapper>
\ No newline at end of file
gic-store-service/src/main/resources/mapper/TabStoreMapper.xml
View file @
d63a956b
...
...
@@ -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