mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 12:18:42 +08:00 
			
		
		
		
	feat 新建LambdaQueryWrapperX,改成使用lambda的方式选择字段
This commit is contained in:
		@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
 | 
			
		||||
public interface InfFileCoreMapper extends BaseMapperX<InfFileDO> {
 | 
			
		||||
 | 
			
		||||
    default Integer selectCountById(String id) {
 | 
			
		||||
        return selectCount("id", id);
 | 
			
		||||
        return selectCount(InfFileDO::getId, id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ import java.util.Date;
 | 
			
		||||
public interface PayChannelCoreMapper extends BaseMapperX<PayChannelDO> {
 | 
			
		||||
 | 
			
		||||
    default PayChannelDO selectByAppIdAndCode(Long appId, String code) {
 | 
			
		||||
        return selectOne("app_id", appId, "code", code);
 | 
			
		||||
        return selectOne(PayChannelDO::getAppId, appId, PayChannelDO::getCode, code);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Select("SELECT id FROM pay_channel WHERE update_time > #{maxUpdateTime} LIMIT 1")
 | 
			
		||||
 
 | 
			
		||||
@@ -2,19 +2,19 @@ package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order;
 | 
			
		||||
 | 
			
		||||
import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO;
 | 
			
		||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		||||
import org.apache.ibatis.annotations.Mapper;
 | 
			
		||||
 | 
			
		||||
@Mapper
 | 
			
		||||
public interface PayOrderExtensionCoreMapper extends BaseMapperX<PayOrderExtensionDO> {
 | 
			
		||||
 | 
			
		||||
    default PayOrderExtensionDO selectByNo(String no) {
 | 
			
		||||
        return selectOne("no", no);
 | 
			
		||||
        return selectOne(PayOrderExtensionDO::getNo, no);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    default int updateByIdAndStatus(Long id, Integer status, PayOrderExtensionDO update) {
 | 
			
		||||
        return update(update, new QueryWrapper<PayOrderExtensionDO>()
 | 
			
		||||
                .eq("id", id).eq("status", status));
 | 
			
		||||
        return update(update, new LambdaQueryWrapper<PayOrderExtensionDO>()
 | 
			
		||||
                .eq(PayOrderExtensionDO::getId, id).eq(PayOrderExtensionDO::getStatus, status));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user