补正
This commit is contained in:
parent
45c7558e4b
commit
ec43afe316
@ -113,13 +113,14 @@ public class ShopInspectionGoodsController extends BaseController
|
||||
*/
|
||||
@GetMapping("/partnerGoodsDetail")
|
||||
public CommonResult partnerGoodsDetail(Long goodsId) throws Exception {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ShopMallPartners::getUserId,loginUser.getId()).eq(ShopMallPartners::getType,"jc").last("limit 1");
|
||||
ShopMallPartners one = appInspectionPartnerService.getOne(queryWrapper);
|
||||
if (ObjectUtils.isEmpty(one)){
|
||||
throw new Exception("您不是商户");
|
||||
}
|
||||
// 暂时注掉
|
||||
// LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
// LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||
// queryWrapper.eq(ShopMallPartners::getUserId,loginUser.getId()).eq(ShopMallPartners::getType,"jc").last("limit 1");
|
||||
// ShopMallPartners one = appInspectionPartnerService.getOne(queryWrapper);
|
||||
// if (ObjectUtils.isEmpty(one)){
|
||||
// throw new Exception("您不是商户");
|
||||
// }
|
||||
|
||||
return success(appInspectionPartnerService.goodsDetail(goodsId));
|
||||
}
|
||||
|
@ -1083,11 +1083,12 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
@Override
|
||||
public ShopInspectionGoods goodsDetail(Long goodsId) {
|
||||
ShopInspectionGoods goods = goodsService.getById(goodsId);
|
||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
ShopMallPartners partners = baseMapper.selectById(goods.getPartnerId());
|
||||
if (!partners.getUserId().equals(user.getId())){
|
||||
return null;
|
||||
}
|
||||
// 暂时注掉
|
||||
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
// ShopMallPartners partners = baseMapper.selectById(goods.getPartnerId());
|
||||
// if (!partners.getUserId().equals(user.getId())){
|
||||
// return null;
|
||||
// }
|
||||
LambdaQueryWrapper<InspectionGoodsSku> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(InspectionGoodsSku::getGoodsId,goodsId);
|
||||
List<InspectionGoodsSku> list = skuService.list(queryWrapper);
|
||||
|
@ -345,8 +345,10 @@ FROM
|
||||
FROM
|
||||
shop_inspection_category cate
|
||||
INNER JOIN inspection_category_template template on template.category_id = cate.id
|
||||
left JOIN shop_inspection_goods goods ON goods.goods_category_id = cate.id and goods.partner_id = #{partnerId}
|
||||
where goods.id is null
|
||||
<if test="partnerId == null">
|
||||
left JOIN shop_inspection_goods goods ON goods.goods_category_id = cate.id and goods.partner_id = #{partnerId}
|
||||
where goods.id is null
|
||||
</if>
|
||||
group by cate.id
|
||||
ORDER BY cate.order_num
|
||||
|
||||
|
@ -51,13 +51,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
INNER JOIN shop_mall_partners smp ON smp.partner_id = sig.partner_id AND smp.is_banned = '0'
|
||||
INNER JOIN shop_inspection_category sic ON sic.id = sig.goods_category_id
|
||||
<where>
|
||||
|
||||
and sig.deleted = '0' and smp.deleted = '0' and sic.deleted = '0'
|
||||
<if test="vo.id != null "> and sig.id = #{vo.id}</if>
|
||||
<if test="vo.title != null and title != ''"> and sig.title like concat('%', #{vo.title}, '%')</if>
|
||||
<if test="vo.title != null and vo.title != ''"> and sig.title like concat('%', #{vo.title}, '%')</if>
|
||||
<if test="vo.goodsCategoryId!= null "> and sig.goods_category_id = #{vo.goodsCategoryId}</if>
|
||||
<if test="vo.partnerName!= null "> and smp.partner_name like concat('%',#{vo.partnerName},'%')</if>
|
||||
<if test="vo.partnerId!= null "> and sig.partner_id = #{vo.partnerId}</if>
|
||||
<if test="vo.isListing != null and vo.isListing != ''">and sig.is_listing = #{vo.isListing}</if>
|
||||
</where>
|
||||
ORDER BY FIELD(sig.listing_status,1,2,3,0), create_time desc
|
||||
ORDER BY sig.is_listing, sig.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user