Przeglądaj źródła

Merge branch 'release_toaliyun_real_2022_02' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real_2022_02

release_toaliyun_real
winter 4 lat temu
rodzic
commit
db0a3da5a9
4 zmienionych plików z 13 dodań i 11 usunięć
  1. +7
    -2
      mallinkCApi/src/main/java/com/iformall/controller/WxCampaignController.java
  2. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  3. +2
    -2
      mallinkService/src/main/resources/mapper/WxBusinessMapper.xml
  4. +1
    -4
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml

+ 7
- 2
mallinkCApi/src/main/java/com/iformall/controller/WxCampaignController.java Wyświetl plik

@@ -59,8 +59,13 @@ public class WxCampaignController extends BaseController {
wxCampaign.updateTenantInfo(getTenantInfo()); wxCampaign.updateTenantInfo(getTenantInfo());
wxCampaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); wxCampaign.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode());
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);

String key = getTenantInfo().getTenantId();
PageInfo<WxCampaign> page = RedisCacheUtils.getCacheObject(redisTemplate, "wxCampaignList:"+key, PageInfo.class);
if (null == page ) {
page = wxCampaignService.clistAsPage(wxCampaign, pageNum, pageSize);
RedisCacheUtils.cache(redisTemplate, "wxCampaignList:"+key, page, 100);
}
return new ResultData(page); return new ResultData(page);
} }




+ 3
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Wyświetl plik

@@ -353,7 +353,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
@Override @Override
public List<WxCouponChannelVo> newfindListVo(WxCouponChannel wxCouponChannel) { public List<WxCouponChannelVo> newfindListVo(WxCouponChannel wxCouponChannel) {
handleCouponIds(wxCouponChannel); handleCouponIds(wxCouponChannel);
if(-999L == wxCouponChannel.getId()){
if(wxCouponChannel.getId() != null && wxCouponChannel.getId().equals(-999L)){
return new ArrayList<>(); return new ArrayList<>();
} }
List<WxCouponChannelVo> list = wxCouponChannelMapper.newfindCList(wxCouponChannel); List<WxCouponChannelVo> list = wxCouponChannelMapper.newfindCList(wxCouponChannel);
@@ -387,7 +387,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
logger.info("listPageCVo.chache.get:{}", pageInfo.getList()==null?0:pageInfo.getList().size()); logger.info("listPageCVo.chache.get:{}", pageInfo.getList()==null?0:pageInfo.getList().size());
}else{ }else{
handleCouponIds(record); handleCouponIds(record);
if(-999L == record.getId()){
if(record.getId() != null && record.getId().equals(-999L)){
return new PageInfo<WxCouponChannelVo>(); return new PageInfo<WxCouponChannelVo>();
} }
pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponChannelMapper.newfindCList(record)); pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponChannelMapper.newfindCList(record));
@@ -397,7 +397,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
} }
}else{ }else{
handleCouponIds(record); handleCouponIds(record);
if(-999L == record.getId()){
if(record.getId() != null && record.getId().equals(-999L)){
return new PageInfo<WxCouponChannelVo>(); return new PageInfo<WxCouponChannelVo>();
} }
pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponChannelMapper.newfindCList(record)); pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponChannelMapper.newfindCList(record));


+ 2
- 2
mallinkService/src/main/resources/mapper/WxBusinessMapper.xml Wyświetl plik

@@ -90,10 +90,10 @@
<if test=" null != parentTenantId and '' != parentTenantId"> <if test=" null != parentTenantId and '' != parentTenantId">
and cc.`parent_tenant_id` = #{parentTenantId} and cc.`parent_tenant_id` = #{parentTenantId}
</if> </if>
<if test=" null != platCode and platCode = 1">
<if test=" null != platCode and platCode == 1">
and cc.target_ad = 1 and cc.target_ad = 1
</if> </if>
<if test=" null != platCode and platCode = 3">
<if test=" null != platCode and platCode == 3">
and cc.target_ad = 101 and cc.target_ad = 101
</if> </if>
) > 0 ) > 0


+ 1
- 4
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Wyświetl plik

@@ -427,7 +427,7 @@
</update> </update>




<select id="newfindCList" parameterType="com.iformall.domain.po.WxCouponChannel" resultMap="BaseResultMap">
<select id="newfindCList" parameterType="com.iformall.domain.po.WxCouponChannel" resultMap="CouponChannelVoMap">
select cc.`id`,cc.`tenant_id`,cc.`parent_tenant_id`,cc.`coupon_id`,cc.`coupon_status`,cc.`type`,cc.`title`, select cc.`id`,cc.`tenant_id`,cc.`parent_tenant_id`,cc.`coupon_id`,cc.`coupon_status`,cc.`type`,cc.`title`,
cc.`target_ad`,cc.`business`,cc.`sub_business`,cc.`show_begin_time`,cc.`begin_time`,cc.`end_time`,cc.`status`, cc.`target_ad`,cc.`business`,cc.`sub_business`,cc.`show_begin_time`,cc.`begin_time`,cc.`end_time`,cc.`status`,
cc.`create_date`,cc.`update_date`,cc.`sub_target_id`,cc.qr_code cc.`create_date`,cc.`update_date`,cc.`sub_target_id`,cc.qr_code
@@ -492,9 +492,6 @@
<if test=" null != subTargetId "> <if test=" null != subTargetId ">
and cc.`sub_target_id` = #{subTargetId} and cc.`sub_target_id` = #{subTargetId}
</if> </if>
<if test=" null != merchantId ">
and cm.`merchant_id` = #{merchantId}
</if>


<if test=" null != ids "> <if test=" null != ids ">
and cc.id in and cc.id in


Ładowanie…
Anuluj
Zapisz