| @@ -5,6 +5,7 @@ import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.vo.WxMerchantVo; | import com.iformall.domain.vo.WxMerchantVo; | ||||
| import com.iformall.enums.EnumMerchantPublic; | |||||
| import com.iformall.enums.EnumMerchantStatus; | import com.iformall.enums.EnumMerchantStatus; | ||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import com.iformall.utils.HashUtil; | import com.iformall.utils.HashUtil; | ||||
| @@ -39,6 +40,7 @@ public class WxMerchantController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::list"); | logger.debug("[" + getIpAddr() + "] WxMerchantController::list"); | ||||
| if (null == wxMerchant) wxMerchant = new WxMerchantVo(); | if (null == wxMerchant) wxMerchant = new WxMerchantVo(); | ||||
| wxMerchant.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | wxMerchant.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | ||||
| wxMerchant.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | |||||
| return new ResultData(wxMerchantService.listAsPageCVo(wxMerchant, pageNum, pageSize)); | return new ResultData(wxMerchantService.listAsPageCVo(wxMerchant, pageNum, pageSize)); | ||||
| } | } | ||||
| @@ -140,8 +140,8 @@ public class WxMerchant implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "类型", name = "type") | @io.swagger.annotations.ApiModelProperty(value = "类型", name = "type") | ||||
| private Integer type; | private Integer type; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show") | |||||
| private Integer show; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "isPublic") | |||||
| private Integer isPublic; | |||||
| public List<WxLevelConfig> getLevelConfigList() { | public List<WxLevelConfig> getLevelConfigList() { | ||||
| return levelConfigList; | return levelConfigList; | ||||
| @@ -380,13 +380,13 @@ public class WxMerchant implements Serializable { | |||||
| this.type = type; | this.type = type; | ||||
| } | } | ||||
| public Integer getShow() { | |||||
| return show; | |||||
| } | |||||
| public Integer getIsPublic() { | |||||
| return isPublic; | |||||
| } | |||||
| public void setShow(Integer show) { | |||||
| this.show = show; | |||||
| } | |||||
| public void setIsPublic(Integer isPublic) { | |||||
| this.isPublic = isPublic; | |||||
| } | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| @@ -51,14 +51,14 @@ public class WxMerchantVo { | |||||
| private String floorName; | private String floorName; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show") | @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show") | ||||
| private String show; | |||||
| private Integer isPublic; | |||||
| public String getShow() { | |||||
| return show; | |||||
| public Integer getIsPublic() { | |||||
| return isPublic; | |||||
| } | } | ||||
| public void setShow(String show) { | |||||
| this.show = show; | |||||
| public void setIsPublic(Integer isPublic) { | |||||
| this.isPublic = isPublic; | |||||
| } | } | ||||
| public String getBuildingName() {return buildingName; } | public String getBuildingName() {return buildingName; } | ||||
| @@ -0,0 +1,35 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumMerchantPublic { | |||||
| PUBLIC(1, "公开"), | |||||
| PRIVATE(0, "私有"),; | |||||
| public static EnumMerchantPublic getEnum(Integer code) { | |||||
| for (EnumMerchantPublic value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumMerchantPublic(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -17,13 +17,13 @@ | |||||
| <result column="shop_type" jdbcType="INTEGER" property="shopType"/> | <result column="shop_type" jdbcType="INTEGER" property="shopType"/> | ||||
| <result column="brand" jdbcType="VARCHAR" property="brand"/> | <result column="brand" jdbcType="VARCHAR" property="brand"/> | ||||
| <result column="type" jdbcType="SMALLINT" property="type"/> | <result column="type" jdbcType="SMALLINT" property="type"/> | ||||
| <result column="show" jdbcType="SMALLINT" property="show"/> | |||||
| <result column="public" jdbcType="SMALLINT" property="isPublic"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`, | `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`, | ||||
| `business_id`,`shop_type`,`brand`,`type`,`show` | |||||
| `business_id`,`shop_type`,`brand`,`type`,`public` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -77,8 +77,8 @@ | |||||
| <if test=" null != type "> | <if test=" null != type "> | ||||
| and `type` = #{type} | and `type` = #{type} | ||||
| </if> | </if> | ||||
| <if test=" null != show "> | |||||
| and `show` = #{show} | |||||
| <if test=" null != public "> | |||||
| and `public` = #{public} | |||||
| </if> | </if> | ||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| @@ -100,7 +100,7 @@ | |||||
| m.id, | m.id, | ||||
| m.img_url,m.name,m.link_phone,m.status,m.business_id, | m.img_url,m.name,m.link_phone,m.status,m.business_id, | ||||
| s.addr,s.shop_number,s.baidu_poi, | s.addr,s.shop_number,s.baidu_poi, | ||||
| mb.building_name,mf.floor_name,m.show | |||||
| mb.building_name,mf.floor_name,m.is_public | |||||
| </sql> | </sql> | ||||
| <resultMap id="MerchantVoResultMap" type="com.iformall.domain.vo.WxMerchantVo"> | <resultMap id="MerchantVoResultMap" type="com.iformall.domain.vo.WxMerchantVo"> | ||||
| @@ -115,7 +115,7 @@ | |||||
| <result column="building_name" jdbcType="VARCHAR" property="buildingName"/> | <result column="building_name" jdbcType="VARCHAR" property="buildingName"/> | ||||
| <result column="floor_name" jdbcType="VARCHAR" property="floorName"/> | <result column="floor_name" jdbcType="VARCHAR" property="floorName"/> | ||||
| <result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/> | <result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/> | ||||
| <result column="show" jdbcType="VARCHAR" property="show"/> | |||||
| <result column="is_public" jdbcType="SMALLINT" property="isPublic"/> | |||||
| </resultMap> | </resultMap> | ||||
| @@ -177,6 +177,11 @@ | |||||
| <if test=" null != floorName and ''!=floorName "> | <if test=" null != floorName and ''!=floorName "> | ||||
| and mf.`floor_name` like concat('%', #{floorName},'%') | and mf.`floor_name` like concat('%', #{floorName},'%') | ||||
| </if> | </if> | ||||
| <if test=" null != is_public"> | |||||
| and m.`is_public` = #{isPublic} | |||||
| </if> | |||||
| </select> | </select> | ||||