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
118f4eba
Commit
118f4eba
authored
Jul 04, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分组策略
parent
5227ec54
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
245 deletions
+47
-245
StoreStrategyDTO.java
...api/src/main/java/com/gic/store/dto/StoreStrategyDTO.java
+13
-0
TabStoreGroupStrategyWeightsMapper.java
.../store/dao/mapper/TabStoreGroupStrategyWeightsMapper.java
+0
-61
TabStoreGroupStrategyWeights.java
...va/com/gic/store/entity/TabStoreGroupStrategyWeights.java
+0
-74
TabStoreStrategy.java
.../src/main/java/com/gic/store/entity/TabStoreStrategy.java
+14
-0
StoreStrategyApiServiceImpl.java
.../gic/store/service/outer/StoreStrategyApiServiceImpl.java
+11
-0
TabStoreGroupStrategyWeightsMapper.xml
...n/resources/mapper/TabStoreGroupStrategyWeightsMapper.xml
+0
-110
StoreStrategyQO.java
...a/com/gic/store/web/qo/storestrategy/StoreStrategyQO.java
+9
-0
No files found.
gic-store-api/src/main/java/com/gic/store/dto/StoreStrategyDTO.java
View file @
118f4eba
...
...
@@ -66,6 +66,11 @@ public class StoreStrategyDTO implements Serializable{
private
Double
sort
;
/**
* 策略类型,1门店状态策略时候,可以多选,门店创建方式,1:后台新增 2:批量导入 3:订单生成 4:erp同步,可以多选 _1_2_格式
*/
private
String
storeCreateType
;
/**
* 排序值
*/
private
Integer
seq
;
...
...
@@ -165,4 +170,12 @@ public class StoreStrategyDTO implements Serializable{
public
void
setSeq
(
Integer
seq
)
{
this
.
seq
=
seq
;
}
public
String
getStoreCreateType
()
{
return
storeCreateType
;
}
public
void
setStoreCreateType
(
String
storeCreateType
)
{
this
.
storeCreateType
=
storeCreateType
;
}
}
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabStoreGroupStrategyWeightsMapper.java
deleted
100644 → 0
View file @
5227ec54
package
com
.
gic
.
store
.
dao
.
mapper
;
import
com.gic.store.entity.TabStoreGroupStrategyWeights
;
public
interface
TabStoreGroupStrategyWeightsMapper
{
/**
* 根据主键删除
*
* @param weightsId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
weightsId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabStoreGroupStrategyWeights
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabStoreGroupStrategyWeights
record
);
/**
* 根据主键查询
*
* @param weightsId 主键
* @return 实体对象
*/
TabStoreGroupStrategyWeights
selectByPrimaryKey
(
Integer
weightsId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabStoreGroupStrategyWeights
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabStoreGroupStrategyWeights
record
);
/**
* 查询
* @param record
* @return
*/
TabStoreGroupStrategyWeights
selectByPrimary
(
TabStoreGroupStrategyWeights
record
);
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/TabStoreGroupStrategyWeights.java
deleted
100644 → 0
View file @
5227ec54
package
com
.
gic
.
store
.
entity
;
import
java.util.Date
;
/**
* tab_store_group_strategy_weights
*/
public
class
TabStoreGroupStrategyWeights
{
/**
*
*/
private
Integer
weightsId
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
* 人为操作填写过门店分组后,门店资料更新不再执行快捷分组策略 1开启 0不开启
*/
private
Integer
status
;
/**
*
*/
private
Integer
enterpriseId
;
public
Integer
getWeightsId
()
{
return
weightsId
;
}
public
void
setWeightsId
(
Integer
weightsId
)
{
this
.
weightsId
=
weightsId
;
}
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
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/entity/TabStoreStrategy.java
View file @
118f4eba
...
...
@@ -61,6 +61,11 @@ public class TabStoreStrategy {
*/
private
Double
sort
;
/**
* 策略类型,1门店状态策略时候,可以多选,门店创建方式,1:后台新增 2:批量导入 3:订单生成 4:erp同步,可以多选 _1_2_格式
*/
private
String
storeCreateType
;
public
Integer
getStrategyId
()
{
return
strategyId
;
}
...
...
@@ -148,4 +153,12 @@ public class TabStoreStrategy {
public
void
setSort
(
Double
sort
)
{
this
.
sort
=
sort
;
}
public
String
getStoreCreateType
()
{
return
storeCreateType
;
}
public
void
setStoreCreateType
(
String
storeCreateType
)
{
this
.
storeCreateType
=
storeCreateType
;
}
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/service/outer/StoreStrategyApiServiceImpl.java
View file @
118f4eba
...
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.store.constant.StoreGroupConstant
;
import
com.gic.store.dto.StoreStrategyDTO
;
import
com.gic.store.entity.TabStoreStrategy
;
import
com.gic.store.service.StoreStrategyApiService
;
...
...
@@ -41,6 +42,16 @@ public class StoreStrategyApiServiceImpl implements StoreStrategyApiService{
if
(
StringUtils
.
isBlank
(
storeStrategyDTO
.
getTargetValue
()))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
ERR_5
.
getCode
(),
"策略命中值不能为空"
);
}
if
(
storeStrategyDTO
.
getStrategyType
()
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
ERR_5
.
getCode
(),
"策略类型不能为空"
);
}
if
(
storeStrategyDTO
.
getStrategyType
()
==
StoreGroupConstant
.
STORE_STRATEGY_TYPE
)
{
//如果是门店状态策略类型,必须有
if
(
StringUtils
.
isBlank
(
storeStrategyDTO
.
getStoreCreateType
()))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
ERR_5
.
getCode
(),
"门店创建方式不能为空"
);
}
}
storeStrategyDTO
.
setCreateTime
(
new
Date
());
storeStrategyDTO
.
setUpdateTime
(
new
Date
());
...
...
gic-store-service/src/main/resources/mapper/TabStoreGroupStrategyWeightsMapper.xml
deleted
100644 → 0
View file @
5227ec54
<?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.TabStoreGroupStrategyWeightsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.store.entity.TabStoreGroupStrategyWeights"
>
<id
column=
"weights_id"
jdbcType=
"INTEGER"
property=
"weightsId"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"enterprise_id"
jdbcType=
"INTEGER"
property=
"enterpriseId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
weights_id, create_time, update_time, status, enterprise_id
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_store_group_strategy_weights
where weights_id = #{weightsId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_store_group_strategy_weights
where weights_id = #{weightsId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.store.entity.TabStoreGroupStrategyWeights"
>
insert into tab_store_group_strategy_weights (weights_id, create_time, update_time,
status, enterprise_id)
values (#{weightsId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.store.entity.TabStoreGroupStrategyWeights"
>
insert into tab_store_group_strategy_weights
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"weightsId != null"
>
weights_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"weightsId != null"
>
#{weightsId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.store.entity.TabStoreGroupStrategyWeights"
>
update tab_store_group_strategy_weights
<set>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
</set>
where weights_id = #{weightsId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.store.entity.TabStoreGroupStrategyWeights"
>
update tab_store_group_strategy_weights
set create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER}
where weights_id = #{weightsId,jdbcType=INTEGER}
</update>
<select
id=
"selectByPrimary"
parameterType=
"com.gic.store.entity.TabStoreGroupStrategyWeights"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_store_group_strategy_weights
where 1 = 1
<if
test=
"weightsId != null"
>
and weights_id = #{weightsId}
</if>
<if
test=
"status != null"
>
and status = #{status}
</if>
<if
test=
"enterpriseId != null"
>
and enterprise_id = #{enterpriseId}
</if>
</select>
</mapper>
\ No newline at end of file
gic-store-web/src/main/java/com/gic/store/web/qo/storestrategy/StoreStrategyQO.java
View file @
118f4eba
...
...
@@ -95,6 +95,11 @@ public class StoreStrategyQO implements Serializable{
private
Double
sort
;
/**
* 策略类型,1门店状态策略时候,可以多选,门店创建方式,1:后台新增 2:批量导入 3:订单生成 4:erp同步,可以多选 _1_2_格式
*/
private
String
storeCreateType
;
/**
* 排序值
*/
private
Integer
seq
;
...
...
@@ -225,4 +230,8 @@ public class StoreStrategyQO implements Serializable{
public
void
setSortValue
(
Integer
sortValue
)
{
this
.
sortValue
=
sortValue
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
}
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