Burce 6 лет назад
Родитель
Сommit
0fa59c9f5f
3 измененных файлов: 6 добавлений и 28 удалений
  1. +1
    -0
      mallinkCApi/src/main/java/com/iformall/controller/WxCampaignController.java
  2. +1
    -0
      mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java
  3. +4
    -28
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 1
- 0
mallinkCApi/src/main/java/com/iformall/controller/WxCampaignController.java Просмотреть файл

@@ -51,6 +51,7 @@ public class WxCampaignController extends BaseController {
wxCampaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); wxCampaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode());
wxCampaign.updateTenantInfo(getTenantInfo()); wxCampaign.updateTenantInfo(getTenantInfo());
wxCampaign.setSortColumns(BaseEntity.SortField.SortNum_ASC, BaseEntity.SortField.CreateTime_ASC); wxCampaign.setSortColumns(BaseEntity.SortField.SortNum_ASC, BaseEntity.SortField.CreateTime_ASC);
// TODO 缓存优化
final PageInfo<WxCampaign> page = wxCampaignService.clistAsPage(wxCampaign, pageNum, pageSize); final PageInfo<WxCampaign> page = wxCampaignService.clistAsPage(wxCampaign, pageNum, pageSize);
return new ResultData(page); return new ResultData(page);
} }


+ 1
- 0
mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java Просмотреть файл

@@ -86,6 +86,7 @@ public class WxMallController extends BaseController {
@ApiOperation("商场信息") @ApiOperation("商场信息")
@GetMapping("/mallInfo") @GetMapping("/mallInfo")
public ResultData getMallInfo() { public ResultData getMallInfo() {
//TODO 缓存优化
WxMall mall = wxMallService.getByTenantId(getTenantId()); WxMall mall = wxMallService.getByTenantId(getTenantId());
if (mall == null) { if (mall == null) {
return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND); return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND);


+ 4
- 28
mallinkService/src/main/resources/mapper/WxShopMapper.xml Просмотреть файл

@@ -158,7 +158,8 @@
m.link_person linkPerson,m.link_phone linkPhone,s.manager,s.manager_phone managerPhone, m.link_person linkPerson,m.link_phone linkPhone,s.manager,s.manager_phone managerPhone,
s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,rent,rent_unit,s.business_id as s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,rent,rent_unit,s.business_id as
businessId,s.create_date create_date businessId,s.create_date create_date
from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id and ms.is_del=0
from wx_shop s
left join wx_merchant_shop ms on ms.shop_id=s.id and ms.is_del=0
left join wx_merchant m on ms.merchant_id=m.id left join wx_merchant m on ms.merchant_id=m.id
left join wx_mall_building b on s.building=b.id left join wx_mall_building b on s.building=b.id
left join wx_mall_floor f on s.floor=f.id left join wx_mall_floor f on s.floor=f.id
@@ -186,52 +187,42 @@


<if test=" null != shopNumber and ''!=shopNumber"> <if test=" null != shopNumber and ''!=shopNumber">
and s.`shop_number` like concat('%', #{shopNumber},'%') and s.`shop_number` like concat('%', #{shopNumber},'%')

</if> </if>


<if test=" null != buildArea "> <if test=" null != buildArea ">
and s.`build_area` like concat('%', #{buildArea},'%') and s.`build_area` like concat('%', #{buildArea},'%')

</if> </if>


<if test=" null != operationArea "> <if test=" null != operationArea ">
and s.`operation_area` like concat('%', #{operationArea},'%') and s.`operation_area` like concat('%', #{operationArea},'%')

</if> </if>


<if test=" null != x "> <if test=" null != x ">
and s.`x` = #{x} and s.`x` = #{x}

</if> </if>


<if test=" null != y "> <if test=" null != y ">
and s.`y` = #{y} and s.`y` = #{y}

</if> </if>


<if test=" null != addr "> <if test=" null != addr ">
and s.`addr` like concat('%', #{addr},'%') and s.`addr` like concat('%', #{addr},'%')

</if> </if>


<if test=" null != baiduPoi "> <if test=" null != baiduPoi ">
and s.`baidu_poi` like concat('%', #{baiduPoi},'%') and s.`baidu_poi` like concat('%', #{baiduPoi},'%')

</if> </if>


<if test=" null != longitude "> <if test=" null != longitude ">
and s.`longitude` = #{longitude} and s.`longitude` = #{longitude}

</if> </if>


<if test=" null != latitude "> <if test=" null != latitude ">
and s.`latitude` = #{latitude} and s.`latitude` = #{latitude}

</if> </if>


<if test=" null != createDate "> <if test=" null != createDate ">
and s.`create_date` = #{createDate} and s.`create_date` = #{createDate}

</if> </if>


<if test=" null != updateDate "> <if test=" null != updateDate ">
@@ -260,8 +251,8 @@
</select> </select>


<select id="notRentListMapAsPage" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap"> <select id="notRentListMapAsPage" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap">
select s.id as id,s.shop_number shopNumber,CONVERT(s.build_area,SIGNED)buildArea,
s.img_url imgUrl,CONVERT(s.operation_area,SIGNED) operationArea,
select s.id as id,s.shop_number shopNumber, CONVERT(s.build_area,DECIMAL(10,2)) buildArea,
s.img_url imgUrl,CONVERT(s.operation_area,DECIMAL(10,2)) operationArea,
s.status,b.building_name building,f.floor_name floor,s.manager,s.manager_phone managerPhone, s.status,b.building_name building,f.floor_name floor,s.manager,s.manager_phone managerPhone,
s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,s.create_date as create_date s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,s.create_date as create_date
from wx_shop s from wx_shop s
@@ -355,77 +346,62 @@


<if test=" null != id "> <if test=" null != id ">
and s.`id` = #{id} and s.`id` = #{id}

</if> </if>


<if test=" null != tenantId "> <if test=" null != tenantId ">
and s.`tenant_id`= #{tenantId} and s.`tenant_id`= #{tenantId}

</if> </if>


<if test=" null != shopNumber and ''!=shopNumber"> <if test=" null != shopNumber and ''!=shopNumber">
and s.`shop_number` like concat('%', #{shopNumber},'%') and s.`shop_number` like concat('%', #{shopNumber},'%')

</if> </if>


<if test=" null != buildArea "> <if test=" null != buildArea ">
and s.`build_area` like concat('%', #{buildArea},'%') and s.`build_area` like concat('%', #{buildArea},'%')

</if> </if>


<if test=" null != operationArea "> <if test=" null != operationArea ">
and s.`operation_area` like concat('%', #{operationArea},'%') and s.`operation_area` like concat('%', #{operationArea},'%')

</if> </if>


<if test=" null != building "> <if test=" null != building ">
and s.`building`= #{building} and s.`building`= #{building}

</if> </if>


<if test=" null != floor "> <if test=" null != floor ">
and s.`floor` = #{floor} and s.`floor` = #{floor}

</if> </if>


<if test=" null != status"> <if test=" null != status">
and s.`status` = #{status} and s.`status` = #{status}

</if> </if>


<if test=" null != x "> <if test=" null != x ">
and s.`x` = #{x} and s.`x` = #{x}

</if> </if>


<if test=" null != y "> <if test=" null != y ">
and s.`y` = #{y} and s.`y` = #{y}

</if> </if>


<if test=" null != addr "> <if test=" null != addr ">
and s.`addr` like concat('%', #{addr},'%') and s.`addr` like concat('%', #{addr},'%')

</if> </if>


<if test=" null != baiduPoi "> <if test=" null != baiduPoi ">
and s.`baidu_poi` like concat('%', #{baiduPoi},'%') and s.`baidu_poi` like concat('%', #{baiduPoi},'%')

</if> </if>


<if test=" null != longitude "> <if test=" null != longitude ">
and s.`longitude` = #{longitude} and s.`longitude` = #{longitude}

</if> </if>


<if test=" null != latitude "> <if test=" null != latitude ">
and s.`latitude` = #{latitude} and s.`latitude` = #{latitude}

</if> </if>


<if test=" null != createDate "> <if test=" null != createDate ">
and s.`create_date` = #{createDate} and s.`create_date` = #{createDate}

</if> </if>


<if test=" null != updateDate "> <if test=" null != updateDate ">


Загрузка…
Отмена
Сохранить