| | |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_jinhui_community.entity.JinhuiConvenientMerchant"> |
| | | <id column="id" property="id" /> |
| | | <id column="name" property="name" /> |
| | | <id column="community_id" property="communityId" /> |
| | | <id column="community_name" property="communityName" /> |
| | | <id column="logo" property="logo" /> |
| | | <id column="contacts" property="contacts" /> |
| | | <id column="phone" property="phone" /> |
| | | <id column="address" property="address" /> |
| | | <id column="address" property="address" /> |
| | | <id column="detailed_address" property="detailedAddress" /> |
| | | <id column="lat" property="lat" /> |
| | | <id column="lon" property="lon" /> |
| | | <id column="begin_at" property="beginAt" /> |
| | | <id column="end_at" property="endAt" /> |
| | | <id column="period" property="period" /> |
| | | <id column="introduction" property="introduction" /> |
| | | <id column="business_status" property="businessStatus" /> |
| | | <id column="user_id" property="userId" /> |
| | | <id column="is_del" property="isDel" /> |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="created_by" property="createdBy" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | <id column="updated_by" property="updatedBy" /> |
| | | <id column="convenient_type" property="convenientType" /> |
| | | <id column="audit_type" property="auditType" /> |
| | | <id column="audit_opinion" property="auditOpinion" /> |
| | | <id column="img_url" property="imgUrl" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,community_id,community_name,logo,contacts,phone,address,lat,lon,begin_at,end_at, |
| | | period,introduction,business_status,user_id,is_del,created_at,created_by,updated_at, |
| | | updated_by,detailed_address |
| | | id, |
| | | name, |
| | | logo, |
| | | contacts, |
| | | phone, |
| | | address, |
| | | detailed_address, |
| | | lat, |
| | | lon, |
| | | introduction, |
| | | is_del, |
| | | created_at, |
| | | created_by, |
| | | updated_at, |
| | | convenient_type, |
| | | audit_type, |
| | | audit_opinion, |
| | | img_url |
| | | </sql> |
| | | <select id="pageMerchant" resultType="com.panzhihua.common.model.vos.community.convenient.JinhuiConvenientMerchantVO"> |
| | | SELECT ccm.*, su.account, su.status AS accountStatus |
| | | SELECT |
| | | id, |
| | | name, |
| | | logo, |
| | | contacts, |
| | | phone, |
| | | address, |
| | | detailed_address, |
| | | lat, |
| | | lon, |
| | | introduction, |
| | | is_del, |
| | | created_at, |
| | | created_by, |
| | | updated_at, |
| | | convenient_type, |
| | | audit_type, |
| | | audit_opinion, |
| | | img_url |
| | | FROM jinhui_com_convenient_merchants ccm |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | WHERE ccm.is_del = 0 |
| | | <if test="item.accountStatus != null"> |
| | | AND su.status = #{item.accountStatus} |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != 0"> |
| | | AND ccm.community_id = ${item.communityId} |
| | | </if> |
| | | <if test="item.businessStatus != null"> |
| | | AND ccm.business_status = #{item.businessStatus} |
| | | </if> |
| | | <if test="item.auditType != null and item.auditType != ''"> |
| | | AND ccm.audit_type = #{item.auditType} |
| | | </if> |
| | |
| | | OR ccm.phone LIKE CONCAT('%', #{item.keyword}, '%') |
| | | ) |
| | | </if> |
| | | GROUP BY ccm.id ORDER BY ccm.created_at DESC |
| | | GROUP BY created_at DESC |
| | | </select> |
| | | <select id="selectMerchantById" resultType="com.panzhihua.common.model.vos.community.convenient.JinhuiConvenientMerchantVO"> |
| | | SELECT ccm.*, su.account, su.status AS accountStatus |
| | | SELECT |
| | | id, |
| | | name, |
| | | logo, |
| | | contacts, |
| | | phone, |
| | | address, |
| | | detailed_address, |
| | | lat, |
| | | lon, |
| | | introduction, |
| | | is_del, |
| | | created_at, |
| | | created_by, |
| | | updated_at, |
| | | convenient_type, |
| | | audit_type, |
| | | audit_opinion, |
| | | img_url |
| | | FROM jinhui_com_convenient_merchants ccm |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | WHERE ccm.id = #{merchantId} |
| | | </select> |
| | | |
| | | <update id="deleteMerchantById"> |
| | | UPDATE jinhui_com_convenient_merchants SET is_del = 1, updated_by = #{operator} WHERE id = #{merchantId} |
| | | UPDATE jinhui_com_convenient_merchants |
| | | SET is_del = 1 |
| | | WHERE id = #{merchantId} |
| | | </update> |
| | | |
| | | |
| | |
| | | </if> |
| | | <if test="item.name != null and item.name != '' "> |
| | | `name`, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id, |
| | | </if> |
| | | <if test="item.logo != null and item.logo != '' "> |
| | | logo, |
| | |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | lon, |
| | | </if> |
| | | <if test="item.beginAt != null and item.beginAt != '' "> |
| | | begin_at, |
| | | </if> |
| | | <if test="item.endAt != null and item.endAt != '' "> |
| | | end_at, |
| | | </if> |
| | | <if test="item.period != null and item.period != '' "> |
| | | `period`, |
| | | </if> |
| | | <if test="item.introduction != null and item.introduction != '' "> |
| | | introduction, |
| | | </if> |
| | | <if test="item.businessStatus != null and item.businessStatus != '' "> |
| | | business_status, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id, |
| | | </if> |
| | | <if test="item.isDel != null and item.isDel != '' "> |
| | | is_del, |
| | | </if> |
| | | <if test="item.createdBy != null and item.createdBy != '' "> |
| | | created_by, |
| | | </if> |
| | | <if test="item.updatedBy != null and item.updatedBy != '' "> |
| | | updated_by, |
| | | </if> |
| | | <if test="item.convenientType != null and item.convenientType != '' "> |
| | | convenient_type, |
| | |
| | | <if test="item.auditOpinion != null and item.auditOpinion != '' "> |
| | | audit_opinion, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | img_url, |
| | | </if> |
| | | created_at |
| | | </trim> |
| | | values |
| | |
| | | </if> |
| | | <if test="item.name != null and item.name != '' "> |
| | | #{item.name}, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.logo != null and item.logo != '' "> |
| | | #{item.logo}, |
| | |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | #{item.lon}, |
| | | </if> |
| | | <if test="item.beginAt != null and item.beginAt != '' "> |
| | | #{item.beginAt}, |
| | | </if> |
| | | <if test="item.endAt != null and item.endAt != '' "> |
| | | #{item.endAt}, |
| | | </if> |
| | | <if test="item.period != null and item.period != '' "> |
| | | #{item.period}, |
| | | </if> |
| | | <if test="item.introduction != null and item.introduction != '' "> |
| | | #{item.introduction}, |
| | | </if> |
| | | <if test="item.businessStatus != null and item.businessStatus != '' "> |
| | | #{item.businessStatus}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.isDel != null and item.isDel != '' "> |
| | | #{item.isDel}, |
| | | </if> |
| | | <if test="item.createdBy != null and item.createdBy != '' "> |
| | | #{item.createdBy}, |
| | | </if> |
| | | <if test="item.updatedBy != null and item.updatedBy != '' "> |
| | | #{item.updatedBy}, |
| | | </if> |
| | | <if test="item.convenientType != null and item.convenientType != '' "> |
| | | #{item.convenientType}, |
| | |
| | | </if> |
| | | <if test="item.auditOpinion != null and item.auditOpinion != '' "> |
| | | #{item.auditOpinion}, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | #{item.imgUrl}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | |
| | | </if> |
| | | <if test="item.name != null and item.name != '' "> |
| | | `name`=#{item.name}, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id=#{item.communityId}, |
| | | </if> |
| | | <if test="item.logo != null and item.logo != '' "> |
| | | logo=#{item.logo}, |
| | |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | lon=#{item.lon}, |
| | | </if> |
| | | <if test="item.beginAt != null and item.beginAt != '' "> |
| | | begin_at=#{item.beginAt}, |
| | | </if> |
| | | <if test="item.endAt != null and item.endAt != '' "> |
| | | end_at=#{item.endAt}, |
| | | </if> |
| | | <if test="item.period != null and item.period != '' "> |
| | | `period`=#{item.period}, |
| | | </if> |
| | | <if test="item.introduction != null and item.introduction != '' "> |
| | | introduction=#{item.introduction}, |
| | | </if> |
| | | <if test="item.businessStatus != null and item.businessStatus != '' "> |
| | | business_status=#{item.businessStatus}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.isDel != null and item.isDel != '' "> |
| | | is_del=#{item.isDel}, |
| | | </if> |
| | | <if test="item.createdBy != null and item.createdBy != '' "> |
| | | created_by=#{item.createdBy}, |
| | | </if> |
| | | <if test="item.updatedBy != null and item.updatedBy != '' "> |
| | | updated_by=#{item.updatedBy}, |
| | | </if> |
| | | <if test="item.convenientType != null and item.convenientType != '' "> |
| | | convenient_type=#{item.convenientType}, |
| | |
| | | <if test="item.auditOpinion != null and item.auditOpinion != '' "> |
| | | audit_opinion=#{item.auditOpinion}, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | img_url=#{item.imgUrl}, |
| | | </if> |
| | | updated_at=sysdate() |
| | | </set> |
| | | where id = #{item.id} |