## Opt - 分享商品列表 增加查询条件(商品名/商品类别)
This commit is contained in:
parent
11458e86fe
commit
d41a53ff57
|
@ -415,7 +415,7 @@ public class ApiRetailWaresController extends BaseController {
|
|||
List<CuWaresParams> waresParamsList = new ArrayList<>();
|
||||
|
||||
// 查询商品列表
|
||||
List<BdWaresExt> bdWaresExtList = iBdWaresService.listWaresShare(param.getSpecialArea(), param.getIsMakerGift(), param.getPkCountry());
|
||||
List<BdWaresExt> bdWaresExtList = iBdWaresService.listWaresShare(param);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(bdWaresExtList)) {
|
||||
// 商品主键列表
|
||||
|
|
|
@ -28,4 +28,12 @@ public class WaresShareParam {
|
|||
*/
|
||||
private Integer pkCountry;
|
||||
|
||||
/**
|
||||
* 分类ID
|
||||
*/
|
||||
private Integer pkAreaClassify;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String waresName;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public class ApiBdWaresController extends BaseController {
|
|||
List<CuWaresParams> waresParamsList = new ArrayList<>();
|
||||
|
||||
// 查询商品列表
|
||||
List<BdWaresExt> bdWaresExtList = iBdWaresService.listWaresShare(param.getSpecialArea(), param.getIsMakerGift(), param.getPkCountry());
|
||||
List<BdWaresExt> bdWaresExtList = iBdWaresService.listWaresShare(param);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(bdWaresExtList)) {
|
||||
// 商品主键列表
|
||||
|
@ -214,7 +214,7 @@ public class ApiBdWaresController extends BaseController {
|
|||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(waresParamsList);
|
||||
return AjaxResult.success((waresParamsList));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -785,5 +785,4 @@ public class ApiBdWaresController extends BaseController {
|
|||
waresInfoVo.setWaresSpecsSkuInfoList(waresItemWaresInfos);
|
||||
return AjaxResult.success(waresInfoVo);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.hzs.common.domain.sale.ext.BdWaresExt;
|
|||
import com.hzs.common.domain.sale.wares.BdWares;
|
||||
import com.hzs.common.domain.system.config.BdAgreement;
|
||||
import com.hzs.retail.wares.param.RetailWaresParam;
|
||||
import com.hzs.retail.wares.param.WaresShareParam;
|
||||
import com.hzs.sale.wares.param.WaresNoSaleParam;
|
||||
import com.hzs.sale.wares.param.WaresParams;
|
||||
import com.hzs.sale.wares.vo.WaresAuthorityVo;
|
||||
|
@ -147,7 +148,5 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
|
|||
* @param pkCountry 所属国家
|
||||
* @return: List<BdWaresExt>
|
||||
*/
|
||||
List<BdWaresExt> listWaresShare(@Param("specialArea") Integer specialArea,
|
||||
@Param("isMakerGift") Integer isMakerGift,
|
||||
@Param("pkCountry") Integer pkCountry);
|
||||
List<BdWaresExt> listWaresShare(@Param("param") WaresShareParam param);
|
||||
}
|
||||
|
|
|
@ -293,4 +293,8 @@ public class CuWaresParams implements Serializable {
|
|||
* 消费配置主键
|
||||
*/
|
||||
private Integer pkSpecialCurrency;
|
||||
|
||||
private Integer pkAreaClassifyParent;
|
||||
|
||||
private String areaClassifyName;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.hzs.common.domain.sale.wares.BdWaresAuthority;
|
|||
import com.hzs.common.domain.system.config.BdAgreement;
|
||||
import com.hzs.common.domain.system.config.ext.BdRangeExt;
|
||||
import com.hzs.retail.wares.param.RetailWaresParam;
|
||||
import com.hzs.retail.wares.param.WaresShareParam;
|
||||
import com.hzs.sale.wares.param.ComputeWaresPrice;
|
||||
import com.hzs.sale.wares.param.WaresNoSaleParam;
|
||||
import com.hzs.sale.wares.param.WaresParams;
|
||||
|
@ -212,5 +213,5 @@ public interface IBdWaresService extends IService<BdWares> {
|
|||
* @param pkCountry 所属国家
|
||||
* @return: List<BdWaresExt>
|
||||
*/
|
||||
List<BdWaresExt> listWaresShare(Integer specialArea, Integer isMakerGift, Integer pkCountry);
|
||||
List<BdWaresExt> listWaresShare(WaresShareParam param);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import com.hzs.common.domain.system.config.ext.BdRangeExt;
|
|||
import com.hzs.member.base.IMemberServiceApi;
|
||||
|
||||
import com.hzs.retail.wares.param.RetailWaresParam;
|
||||
import com.hzs.retail.wares.param.WaresShareParam;
|
||||
import com.hzs.sale.product.service.IBdSpecsService;
|
||||
import com.hzs.sale.wares.param.*;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
|
@ -1149,6 +1150,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
|||
bdWares.setSortStatus(-1);
|
||||
bdWares.setPkId(waresId);
|
||||
this.updateById(bdWares);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1163,7 +1165,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
|||
|
||||
|
||||
@Override
|
||||
public List<BdWaresExt> listWaresShare(Integer specialArea, Integer isMakerGift, Integer pkCountry) {
|
||||
return baseMapper.listWaresShare(specialArea, isMakerGift, pkCountry);
|
||||
public List<BdWaresExt> listWaresShare(WaresShareParam param) {
|
||||
return baseMapper.listWaresShare(param);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -473,32 +473,57 @@
|
|||
|
||||
|
||||
<!-- 分享商品列表 -->
|
||||
<select id="listWaresShare" resultMap="BaseResultMap">
|
||||
select bw.PK_COUNTRY, bw.PK_ID, be.pk_id PK_WARES_EXTEND,
|
||||
be.IS_MAKER_GIFT, bw.WARES_CODE, bw.WARES_NAME,
|
||||
PK_AREA_CLASSIFY, COVER, COVER1, COVER2,
|
||||
bw.WARES_PRICE, bw.WARES_ACHIEVE,
|
||||
SORT, SPECIAL_AREA,
|
||||
IS_PUT_ON, PRE_SALE_STATUS,
|
||||
PREFIX_LABEL, COOL_LABEL, S_LABEL,
|
||||
SALES, IS_SALE, ARRIVAL_TIME, WARN_MESSAGE,
|
||||
be.PK_SPECIAL_CURRENCY
|
||||
<select id="listWaresShare" resultType="com.hzs.common.domain.sale.ext.BdWaresExt">
|
||||
select
|
||||
bac.PK_PARENT as pkAreaClassifyParent,
|
||||
bw.PK_AREA_CLASSIFY as pkAreaClassify,
|
||||
bac.CLASSIFY_NAME as areaClassifyName,
|
||||
bw.PK_COUNTRY,
|
||||
bw.PK_ID,
|
||||
be.pk_id PK_WARES_EXTEND,
|
||||
be.IS_MAKER_GIFT,
|
||||
bw.WARES_CODE,
|
||||
bw.WARES_NAME,
|
||||
bw.COVER,
|
||||
bw.COVER1,
|
||||
bw.COVER2,
|
||||
bw.WARES_PRICE,
|
||||
bw.WARES_ACHIEVE,
|
||||
bw.SORT,
|
||||
SPECIAL_AREA,
|
||||
IS_PUT_ON,
|
||||
PRE_SALE_STATUS,
|
||||
PREFIX_LABEL,
|
||||
COOL_LABEL,
|
||||
S_LABEL,
|
||||
SALES,
|
||||
IS_SALE,
|
||||
ARRIVAL_TIME,
|
||||
WARN_MESSAGE,
|
||||
be.PK_SPECIAL_CURRENCY
|
||||
from bd_wares bw
|
||||
inner join bd_wares_extend be
|
||||
on bw.pk_id = be.pk_wares
|
||||
left join BD_AREA_CLASSIFY bac on bac.pk_id = bw.PK_AREA_CLASSIFY
|
||||
where bw.del_flag = 0
|
||||
and be.del_flag = 0
|
||||
and be.is_put_on = 0
|
||||
<!-- 商品必须通过审核后才能显示 -->
|
||||
and bw.wares_status = 5
|
||||
<if test="specialArea != null">
|
||||
and bw.special_area = #{specialArea}
|
||||
<if test="param.specialArea != null">
|
||||
and bw.special_area = #{param.specialArea}
|
||||
</if>
|
||||
<if test="isMakerGift != null">
|
||||
and be.is_maker_gift = #{isMakerGift}
|
||||
<if test="param.isMakerGift != null">
|
||||
and be.is_maker_gift = #{param.isMakerGift}
|
||||
</if>
|
||||
<if test="pkCountry != null">
|
||||
and bw.pk_country = #{pkCountry}
|
||||
<if test="param.pkCountry != null">
|
||||
and bw.pk_country = #{param.pkCountry}
|
||||
</if>
|
||||
<if test="param.pkAreaClassify != null">
|
||||
and bw.PK_AREA_CLASSIFY = #{param.pkAreaClassify} or bac.pk_parent =
|
||||
</if>
|
||||
<if test="param.waresName != null and param.waresName != ''">
|
||||
and bw.WARES_NAME = '%' || #{param.waresName} || '%'
|
||||
</if>
|
||||
order by bw.SORT_STATUS desc , bw.sort desc, bw.WARES_PRICE ,bw.CREATION_TIME desc
|
||||
</select>
|
||||
|
|
|
@ -175,4 +175,8 @@ public class BdWaresExt extends BdWares {
|
|||
*/
|
||||
private Integer pkSpecialCurrency;
|
||||
|
||||
|
||||
private Integer pkAreaClassifyParent;
|
||||
|
||||
private String areaClassifyName;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue