Parcourir la source

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 il y a 4 ans
Parent
révision
db0a3da5a9
4 fichiers modifiés avec 13 ajouts et 11 suppressions
  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 Voir le fichier

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



+ 3
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Voir le fichier

@@ -353,7 +353,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
@Override
public List<WxCouponChannelVo> newfindListVo(WxCouponChannel wxCouponChannel) {
handleCouponIds(wxCouponChannel);
if(-999L == wxCouponChannel.getId()){
if(wxCouponChannel.getId() != null && wxCouponChannel.getId().equals(-999L)){
return new ArrayList<>();
}
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());
}else{
handleCouponIds(record);
if(-999L == record.getId()){
if(record.getId() != null && record.getId().equals(-999L)){
return new PageInfo<WxCouponChannelVo>();
}
pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponChannelMapper.newfindCList(record));
@@ -397,7 +397,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
}
}else{
handleCouponIds(record);
if(-999L == record.getId()){
if(record.getId() != null && record.getId().equals(-999L)){
return new PageInfo<WxCouponChannelVo>();
}
pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponChannelMapper.newfindCList(record));


+ 2
- 2
mallinkService/src/main/resources/mapper/WxBusinessMapper.xml Voir le fichier

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


+ 1
- 4
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Voir le fichier

@@ -427,7 +427,7 @@
</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`,
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
@@ -492,9 +492,6 @@
<if test=" null != subTargetId ">
and cc.`sub_target_id` = #{subTargetId}
</if>
<if test=" null != merchantId ">
and cm.`merchant_id` = #{merchantId}
</if>

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


Chargement…
Annuler
Enregistrer