| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.shop.domain.dto.MerShopCertificateEditDto; |
| | | import com.ruoyi.shop.domain.dto.MerShopCertificateListDto; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopCertificate; |
| | | import com.ruoyi.shop.domain.vo.MerShopCertificateListVo; |
| | | import com.ruoyi.shop.mapper.shop.ShopCertificateMapper; |
| | | import com.ruoyi.shop.service.shop.ShopCertificateService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class ShopCertificateServiceImpl extends ServiceImpl<ShopCertificateMapper, ShopCertificate> implements ShopCertificateService { |
| | | |
| | | @Resource |
| | | private ShopCertificateMapper shopCertificateMapper; |
| | | |
| | | /** |
| | | * 通过商户id获取商户证书 |
| | | * @param shopId |
| | |
| | | return this.list(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param merShopCertificateListDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MerShopCertificateListVo> listShopCertificateVo(MerShopCertificateListDto merShopCertificateListDto){ |
| | | List<MerShopCertificateListVo> merShopCertificateListVoList = shopCertificateMapper.listShopCertificateVo(merShopCertificateListDto); |
| | | return merShopCertificateListVoList; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param merShopCertificateEditDto |
| | | */ |
| | | @Override |
| | | public void editShopCertificate(MerShopCertificateEditDto merShopCertificateEditDto){ |
| | | ShopCertificate shopCertificate = this.getById(merShopCertificateEditDto.getCerId()); |
| | | if(shopCertificate==null){ |
| | | shopCertificate = new ShopCertificate(); |
| | | } |
| | | BeanUtils.copyProperties(merShopCertificateEditDto,shopCertificate); |
| | | shopCertificate.setCerStatus(0); |
| | | shopCertificate.setDelFlag(0); |
| | | this.saveOrUpdate(shopCertificate); |
| | | } |
| | | } |