Explorar el Código

[商户][添加][是否显示在C端]

release_toaliyun_real
gongbiao hace 7 años
padre
commit
95598b0e5a
Se han modificado 5 ficheros con 61 adiciones y 19 borrados
  1. +2
    -0
      mallinkCApi/src/main/java/com/iformall/controller/WxMerchantController.java
  2. +8
    -8
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  3. +5
    -5
      mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java
  4. +35
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumMerchantPublic.java
  5. +11
    -6
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 2
- 0
mallinkCApi/src/main/java/com/iformall/controller/WxMerchantController.java Ver fichero

@@ -5,6 +5,7 @@ import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.vo.WxMerchantVo;
import com.iformall.enums.EnumMerchantPublic;
import com.iformall.enums.EnumMerchantStatus;
import com.iformall.service.WxMerchantService;
import com.iformall.utils.HashUtil;
@@ -39,6 +40,7 @@ public class WxMerchantController extends BaseController {
logger.debug("[" + getIpAddr() + "] WxMerchantController::list");
if (null == wxMerchant) wxMerchant = new WxMerchantVo();
wxMerchant.setMerchantStatus(EnumMerchantStatus.VALID.getCode());
wxMerchant.setIsPublic(EnumMerchantPublic.PUBLIC.getCode());
return new ResultData(wxMerchantService.listAsPageCVo(wxMerchant, pageNum, pageSize));
}



+ 8
- 8
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java Ver fichero

@@ -140,8 +140,8 @@ public class WxMerchant implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "类型", name = "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() {
return levelConfigList;
@@ -380,13 +380,13 @@ public class WxMerchant implements Serializable {
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
{


+ 5
- 5
mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java Ver fichero

@@ -51,14 +51,14 @@ public class WxMerchantVo {
private String floorName;

@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; }


+ 35
- 0
mallinkService/src/main/java/com/iformall/enums/EnumMerchantPublic.java Ver fichero

@@ -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;
}
}

+ 11
- 6
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Ver fichero

@@ -17,13 +17,13 @@
<result column="shop_type" jdbcType="INTEGER" property="shopType"/>
<result column="brand" jdbcType="VARCHAR" property="brand"/>
<result column="type" jdbcType="SMALLINT" property="type"/>
<result column="show" jdbcType="SMALLINT" property="show"/>
<result column="public" jdbcType="SMALLINT" property="isPublic"/>

</resultMap>

<sql id="allColumns">
`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 id="dynamicWhereConditions">
@@ -77,8 +77,8 @@
<if test=" null != type ">
and `type` = #{type}
</if>
<if test=" null != show ">
and `show` = #{show}
<if test=" null != public ">
and `public` = #{public}
</if>
<if test=" null != ids ">
and id in
@@ -100,7 +100,7 @@
m.id,
m.img_url,m.name,m.link_phone,m.status,m.business_id,
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>

<resultMap id="MerchantVoResultMap" type="com.iformall.domain.vo.WxMerchantVo">
@@ -115,7 +115,7 @@
<result column="building_name" jdbcType="VARCHAR" property="buildingName"/>
<result column="floor_name" jdbcType="VARCHAR" property="floorName"/>
<result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/>
<result column="show" jdbcType="VARCHAR" property="show"/>
<result column="is_public" jdbcType="SMALLINT" property="isPublic"/>

</resultMap>

@@ -177,6 +177,11 @@
<if test=" null != floorName and ''!=floorName ">
and mf.`floor_name` like concat('%', #{floorName},'%')
</if>
<if test=" null != is_public">
and m.`is_public` = #{isPublic}
</if>


</select>



Cargando…
Cancelar
Guardar