MiniWechatCodeServiceImpl.java
1.02 KB
package com.viontech.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.viontech.mapper.MiniWechatCodeMapper;
import com.viontech.model.MiniWeChatCode;
import com.viontech.service.MiniWechatCodeService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* Created with IntelliJ IDEA.
*
* @author: zhuhai
* Date: 2023-04-04
* Time: 15:48
*/
@Service
public class MiniWechatCodeServiceImpl implements MiniWechatCodeService {
@Resource
private MiniWechatCodeMapper miniWechatCodeMapper;
/**
* 根据code获取url
* @param code
* @return
*/
@Override
public MiniWeChatCode getByCode(String code) {
LambdaQueryWrapper<MiniWeChatCode> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.eq(MiniWeChatCode::getCode, code);
MiniWeChatCode miniWeChatCode = miniWechatCodeMapper.selectOne(queryWrapper);
return miniWeChatCode;
}
}