Commit 182818c8 by guojuxing

装修页面-附近门店:添加快捷导航开关

parent f48d8853
......@@ -53,6 +53,11 @@ public class CustomStoreDTO implements Serializable {
*/
private Integer appType;
/**
* 快捷导航开关 1:开启 0:关闭
*/
private Integer quickGuideSwitch;
public Integer getCustomStoreId() {
return customStoreId;
}
......@@ -125,6 +130,15 @@ public class CustomStoreDTO implements Serializable {
this.title = title;
}
public Integer getQuickGuideSwitch() {
return quickGuideSwitch;
}
public CustomStoreDTO setQuickGuideSwitch(Integer quickGuideSwitch) {
this.quickGuideSwitch = quickGuideSwitch;
return this;
}
@Override
public String toString() {
return "CustomStoreDTO{" +
......@@ -137,6 +151,7 @@ public class CustomStoreDTO implements Serializable {
", updateTime=" + updateTime +
", storeWidgetId=" + storeWidgetId +
", appType=" + appType +
", quickGuideSwitch=" + quickGuideSwitch +
'}';
}
}
\ No newline at end of file
......@@ -55,6 +55,11 @@ public class TabCustomStore {
*/
private Integer appType;
/**
* 快捷导航开关 1:开启 0:关闭
*/
private Integer quickGuideSwitch;
public Integer getCustomStoreId() {
return customStoreId;
}
......@@ -126,4 +131,13 @@ public class TabCustomStore {
public void setAppType(Integer appType) {
this.appType = appType;
}
public Integer getQuickGuideSwitch() {
return quickGuideSwitch;
}
public TabCustomStore setQuickGuideSwitch(Integer quickGuideSwitch) {
this.quickGuideSwitch = quickGuideSwitch;
return this;
}
}
\ No newline at end of file
......@@ -25,6 +25,10 @@ public class CustomStoreServiceImpl implements CustomStoreService {
@Override
public int saveCustomStore(TabCustomStore tabCustomStore) {
tabCustomStore.setUpdateTime(new Date());
if (tabCustomStore.getQuickGuideSwitch() == null) {
//默认开启
tabCustomStore.setQuickGuideSwitch(1);
}
if(tabCustomStore.getCustomStoreId() != null){
return this.tabCustomStoreMapper.updateByPrimaryKeySelective(tabCustomStore);
}
......
......@@ -11,10 +11,11 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="store_widget_id" jdbcType="INTEGER" property="storeWidgetId" />
<result column="app_type" jdbcType="INTEGER" property="appType" />
<result column="quick_guide_switch" jdbcType="INTEGER" property="quickGuideSwitch" />
</resultMap>
<sql id="Base_Column_List">
custom_store_id, title, enterprise_id, appid, status, create_time, update_time, store_widget_id,
app_type
app_type, quick_guide_switch
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -26,11 +27,11 @@
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomStore">
insert into tab_custom_store (custom_store_id, title, enterprise_id,
appid, status, create_time,
update_time, store_widget_id, app_type
update_time, store_widget_id, app_type, quick_guide_switch
)
values (#{customStoreId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{appid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{storeWidgetId,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER}
#{updateTime,jdbcType=TIMESTAMP}, #{storeWidgetId,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER} #{quickGuideSwitch,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomStore">
......@@ -63,6 +64,9 @@
<if test="appType != null">
app_type,
</if>
<if test="quickGuideSwitch != null">
quick_guide_switch,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customStoreId != null">
......@@ -92,6 +96,9 @@
<if test="appType != null">
#{appType,jdbcType=INTEGER},
</if>
<if test="quickGuideSwitch != null">
#{quickGuideSwitch,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomStore">
......@@ -121,6 +128,9 @@
<if test="appType != null">
app_type = #{appType,jdbcType=INTEGER},
</if>
<if test="quickGuideSwitch != null">
quick_guide_switch = #{quickGuideSwitch,jdbcType=INTEGER},
</if>
</set>
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</update>
......@@ -133,7 +143,8 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
store_widget_id = #{storeWidgetId,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER}
app_type = #{appType,jdbcType=INTEGER},
quick_guide_switch = #{quickGuideSwitch,jdbcType=INTEGER}
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</update>
<select id="pageCustomStore" resultMap="BaseResultMap">
......
......@@ -41,6 +41,7 @@ public class CustomStoreController {
dto.setCustomStoreId(customStoreQO.getCustomStoreId());
dto.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
dto.setStoreWidgetId(customStoreQO.getStorewidgetId());
dto.setQuickGuideSwitch(customStoreQO.getQuickGuideSwitch());
if(customStoreQO.getSaveType().intValue() == Constants.TWO.intValue()){
this.customStoreApiService.closeCustomStore(UserDetailUtils.getUserDetail().getEnterpriseId(), customStoreQO.getAppId());
dto.setStatus(1);
......
......@@ -13,6 +13,10 @@ public class CustomStoreQO {
private Integer appType;
private Integer storewidgetId;
private Integer saveType; //1保存 2保存发布
/**
* 快捷导航开关 1:开启 0:关闭
*/
private Integer quickGuideSwitch;
public Integer getCustomStoreId() {
return customStoreId;
......@@ -61,4 +65,13 @@ public class CustomStoreQO {
public void setStorewidgetId(Integer storewidgetId) {
this.storewidgetId = storewidgetId;
}
public Integer getQuickGuideSwitch() {
return quickGuideSwitch;
}
public CustomStoreQO setQuickGuideSwitch(Integer quickGuideSwitch) {
this.quickGuideSwitch = quickGuideSwitch;
return this;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment