From d93356927d8a0a5a91963c28d461d9107562d759 Mon Sep 17 00:00:00 2001 From: xin <1099200748@qq.com> Date: Fri, 30 May 2025 17:38:26 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/xin' --- oying-system/src/main/resources/mapper/system/MerchantsMapper.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/oying-system/src/main/resources/mapper/system/MerchantsMapper.xml b/oying-system/src/main/resources/mapper/system/MerchantsMapper.xml new file mode 100644 index 0000000..526dea8 --- /dev/null +++ b/oying-system/src/main/resources/mapper/system/MerchantsMapper.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > +<mapper namespace="com.oying.modules.system.mapper.MerchantsMapper"> + <resultMap id="BaseResultMap" type="com.oying.modules.system.domain.Merchants"> + <id column="merchants_id" property="merchantsId"/> + <result column="merchant_name" property="merchantName"/> + <result column="merchant_code" property="merchantCode"/> + <result column="business_license" property="businessLicense"/> + <result column="business_license_path" property="businessLicensePath"/> + <result column="contact_mobile" property="contactMobile"/> + <result column="merchants_sort" property="merchantsSort"/> + <result column="enabled" property="enabled"/> + <result column="create_by" property="createBy"/> + <result column="update_by" property="updateBy"/> + <result column="create_time" property="createTime"/> + <result column="update_time" property="updateTime"/> + <result column="auth_user" property="authUser"/> + <result column="auth_time" property="authTime"/> + <result column="auth_message" property="authMessage"/> + </resultMap> + + <sql id="Base_Column_List"> + merchants_id, merchant_name, merchant_code, business_license, business_license_path, contact_mobile, merchants_sort, enabled, create_by, update_by, create_time, update_time, auth_user, auth_time, auth_message + </sql> + + <select id="findAll" resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"/> + from sys_merchants + <where> + <if test="criteria.blurry != null and criteria.blurry != ''"> + and ( + merchant_name like concat('%', #{criteria.blurry}, '%') + or merchant_code like concat('%', #{criteria.blurry}, '%') + or business_license like concat('%', #{criteria.blurry}, '%') + or contact_mobile like concat('%', #{criteria.blurry}, '%') + ) + </if> + <if test="criteria.enabled != null"> + and enabled = #{criteria.enabled} + </if> + <if test="criteria.createTime != null and criteria.createTime.size() > 0"> + AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} + </if> + </where> + order by merchants_sort desc + </select> +</mapper> -- Gitblit v1.9.3