Просмотр исходного кода

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

release_toaliyun_real
lin 2 лет назад
Родитель
Сommit
0926141a3a
3 измененных файлов: 21 добавлений и 1 удалений
  1. +7
    -0
      mallinkService/src/main/java/com/iformall/domain/dto/WxMerchantDto.java
  2. +4
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  3. +10
    -0
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 7
- 0
mallinkService/src/main/java/com/iformall/domain/dto/WxMerchantDto.java Просмотреть файл

@@ -1,9 +1,12 @@
package com.iformall.domain.dto; package com.iformall.domain.dto;


import com.baomidou.mybatisplus.annotation.TableField;
import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.po.base.TenantEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;


import java.util.List;

@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class WxMerchantDto extends TenantEntity { public class WxMerchantDto extends TenantEntity {
@@ -40,6 +43,10 @@ public class WxMerchantDto extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "是否显示在广场", name = "isPrivate") @io.swagger.annotations.ApiModelProperty(value = "是否显示在广场", name = "isPrivate")
private Integer isPrivate; private Integer isPrivate;


@io.swagger.annotations.ApiModelProperty(value="EnumMerchantAdmin",name="isAdmin")
private Integer isAdmin;
private List<Integer> adminTypes;

@io.swagger.annotations.ApiModelProperty(value = "品牌名称", name = "brandName") @io.swagger.annotations.ApiModelProperty(value = "品牌名称", name = "brandName")
private String brandName; private String brandName;




+ 4
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Просмотреть файл

@@ -206,6 +206,9 @@ public class WxMerchantServiceImpl implements WxMerchantService {
List<Long> merchantIds = getFloorBuildMerchantIds(wxMerchantDto, null, wxMerchantDto.getBuilding(), wxMerchantDto.getFloor(), null, null); List<Long> merchantIds = getFloorBuildMerchantIds(wxMerchantDto, null, wxMerchantDto.getBuilding(), wxMerchantDto.getFloor(), null, null);
wxMerchantDto.setIds(merchantIds); wxMerchantDto.setIds(merchantIds);
} }
if(wxMerchantDto.getIsAdmin() == null){
wxMerchantDto.setAdminTypes(EnumMerchantAdmin.getOrdinaryTypes());
}
PageInfo<WxMerchant> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findListCVo(wxMerchantDto)); PageInfo<WxMerchant> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findListCVo(wxMerchantDto));
PageInfo<WxMerchantVo> retPageInfo = new PageInfo<WxMerchantVo>(); PageInfo<WxMerchantVo> retPageInfo = new PageInfo<WxMerchantVo>();
retPageInfo.setPageNum(pageInfo.getPageNum()); retPageInfo.setPageNum(pageInfo.getPageNum());
@@ -291,7 +294,7 @@ public class WxMerchantServiceImpl implements WxMerchantService {
@Override @Override
public List<Long> findIdList(WxMerchant record) { public List<Long> findIdList(WxMerchant record) {
if(record == null){
if(record.getIsAdmin() == null){
record.setAdminTypes(EnumMerchantAdmin.getOrdinaryTypes()); record.setAdminTypes(EnumMerchantAdmin.getOrdinaryTypes());
} }
return wxMerchantMapper.findIdList(record); return wxMerchantMapper.findIdList(record);


+ 10
- 0
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Просмотреть файл

@@ -284,10 +284,20 @@
<if test=" null != isPrivate"> <if test=" null != isPrivate">
and m.`is_private` = #{isPrivate} and m.`is_private` = #{isPrivate}
</if> </if>
<if test=" null != isAdmin ">
and m.`is_admin` = #{isAdmin}
</if>
<if test=" null != id"> <if test=" null != id">
and m.`id` = #{id} and m.`id` = #{id}
</if> </if>

<if test=" null != adminTypes and adminTypes.size > 0">
and m.`is_admin` in
<foreach collection="adminTypes" index="index" item="typeItem" open="(" separator="," close=")">
#{typeItem}
</foreach>
</if>
<if test=" null != ids "> <if test=" null != ids ">
and m.id in and m.id in


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