店铺详情新增行业相关字段信息。
This commit is contained in:
parent
464b7f5c4b
commit
605549e648
@ -134,8 +134,11 @@ public interface IShopDao {
|
|||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params) throws SearchException;
|
Integer count(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过店铺ID查询店铺行业信息
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<ShopDTO> getIndustry(Map<String, Object> params) throws SearchException;
|
||||||
}
|
}
|
@ -34,6 +34,10 @@ public class ShopDTO {
|
|||||||
private String shopLatitude;
|
private String shopLatitude;
|
||||||
@ApiModelProperty(name = "shopVideo", value = "店铺宣传视频")
|
@ApiModelProperty(name = "shopVideo", value = "店铺宣传视频")
|
||||||
private String shopVideo;
|
private String shopVideo;
|
||||||
|
@ApiModelProperty(name = "industryName", value = "店铺行业")
|
||||||
|
private String industryName;
|
||||||
|
@ApiModelProperty(name = "industryId", value = "店铺行业ID")
|
||||||
|
private String industryId;
|
||||||
|
|
||||||
@ApiModelProperty(name = "userEvaluate", value = "用户评价,分数,满分10分,通过用户对商品的满意度计算")
|
@ApiModelProperty(name = "userEvaluate", value = "用户评价,分数,满分10分,通过用户对商品的满意度计算")
|
||||||
private Double userEvaluate;
|
private Double userEvaluate;
|
||||||
@ -198,4 +202,20 @@ public class ShopDTO {
|
|||||||
public void setCreatorName(String creatorName) {
|
public void setCreatorName(String creatorName) {
|
||||||
this.creatorName = creatorName;
|
this.creatorName = creatorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getIndustryName() {
|
||||||
|
return industryName == null ? "" : industryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndustryName(String industryName) {
|
||||||
|
this.industryName = industryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndustryId() {
|
||||||
|
return industryId == null ? "" : industryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndustryId(String industryId) {
|
||||||
|
this.industryId = industryId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,20 @@ public class ShopServiceImpl extends DefaultBaseService implements IShopService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ShopDTO get(Map<String, Object> params) {
|
public ShopDTO get(Map<String, Object> params) {
|
||||||
return shopDao.get(params);
|
ShopDTO shopDTO = shopDao.get(params);
|
||||||
|
// 通过店铺ID获取店铺行业信息
|
||||||
|
List<ShopDTO> shopDTOS = shopDao.getIndustry(params);
|
||||||
|
if(null != shopDTOS && shopDTOS.size() > 0) {
|
||||||
|
StringBuffer industryName = new StringBuffer();
|
||||||
|
StringBuffer industryId = new StringBuffer();
|
||||||
|
for(ShopDTO dto: shopDTOS) {
|
||||||
|
industryName.append(dto.getIndustryName()).append(",");
|
||||||
|
industryId.append(dto.getIndustryId()).append(",");
|
||||||
|
}
|
||||||
|
shopDTO.setIndustryName(industryName.deleteCharAt(industryName.length() - 1).toString());
|
||||||
|
shopDTO.setIndustryId(industryId.deleteCharAt(industryId.length() - 1).toString());
|
||||||
|
}
|
||||||
|
return shopDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
<result column="shop_longitude" property="shopLongitude"/>
|
<result column="shop_longitude" property="shopLongitude"/>
|
||||||
<result column="shop_latitude" property="shopLatitude"/>
|
<result column="shop_latitude" property="shopLatitude"/>
|
||||||
<result column="shop_video" property="shopVideo"/>
|
<result column="shop_video" property="shopVideo"/>
|
||||||
|
<result column="industry_id" property="industryId"/>
|
||||||
|
<result column="industry_name" property="industryName"/>
|
||||||
|
|
||||||
<result column="user_evaluate" property="userEvaluate"/>
|
<result column="user_evaluate" property="userEvaluate"/>
|
||||||
<result column="is_open" property="isOpen"/>
|
<result column="is_open" property="isOpen"/>
|
||||||
@ -459,5 +461,18 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 通过店铺Id查询店铺行业信息 -->
|
||||||
|
<select id="getIndustry" parameterType="map" resultMap="shopDTO">
|
||||||
|
SELECT
|
||||||
|
t2.industry_id,
|
||||||
|
t2.industry_name
|
||||||
|
FROM
|
||||||
|
svc_shop_indusrty t1
|
||||||
|
LEFT JOIN data_industry t2 ON t1.industry_id = t2.industry_id
|
||||||
|
AND t2.is_delete = 0
|
||||||
|
WHERE
|
||||||
|
t1.shop_id = #{shopId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user