lidongdong
2023-10-20 f2c0fcaca1830f168d26fbffc0a5a44f3d029794
修改商家服务表结构
3个文件已修改
338 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/convenient/JinhuiConvenientMerchantVO.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/entity/JinhuiConvenientMerchant.java 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiComConvenientMerchantsMapper.xml 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/convenient/JinhuiConvenientMerchantVO.java
@@ -47,40 +47,38 @@
    @ApiModelProperty("经度")
    private String lon;
    @ApiModelProperty("营业开始时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private Date beginAt;
    @ApiModelProperty("商家详细地址")
    private String detailedAddress;
    @ApiModelProperty("营业截止时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private Date endAt;
    @ApiModelProperty("营业周期")
    private MerchantBusinessPeriod period;
    @ApiModelProperty("商家介绍")
    private String introduction;
    @ApiModelProperty("营业状态")
    private Integer businessStatus;
    @ApiModelProperty("商家绑定账户")
    private String account;
    @ApiModelProperty("是否删除")
    private String isDel;
    @ApiModelProperty("商家账户状态(1.启用 2.禁用)")
    private Integer accountStatus;
    @ApiModelProperty("所属社区id")
    private String communityId;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    @ApiModelProperty("所属社区名称")
    private String communityName;
    @ApiModelProperty("详细地址")
    private String detailedAddress;
    @ApiModelProperty("创建人")
    private String createdBy;
    @ApiModelProperty("商家评分")
    private String score;
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;
    @ApiModelProperty("商家类型id")
    private String convenientType;
    @ApiModelProperty("商家图片")
    private String imgUrl;
    @ApiModelProperty("审核状态 (1待审核    2已通过   3未通过   )")
    private String auditType;
@@ -88,4 +86,7 @@
    @ApiModelProperty("审核意见")
    private String auditOpinion;
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/entity/JinhuiConvenientMerchant.java
@@ -1,6 +1,8 @@
package com.panzhihua.service_jinhui_community.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -24,97 +26,71 @@
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("商家ID")
    private String id;
    /**
     * 商家名称
     */
    @ApiModelProperty("商家名称")
    private String name;
    /**
     * 社区id
     */
    private Long communityId;
    /**
     * 社区名称
     */
    private String communityName;
    /**
     * 商家logo
     */
    @ApiModelProperty("商家logo")
    private String logo;
    /**
     * 联系人
     */
    @ApiModelProperty("联系人")
    private String contacts;
    /**
     * 咨询电话
     */
    @ApiModelProperty("咨询电话")
    private String phone;
    /**
     * 商家地址
     */
    @ApiModelProperty("商家地址")
    private String address;
    /**
     * 详细地址
     */
    private String detailedAddress;
    /**
     * 纬度
     */
    @ApiModelProperty("纬度")
    private String lat;
    /**
     * 经度
     */
    @ApiModelProperty("经度")
    private String lon;
    /**
     * 营业开始时间
     */
    private Date beginAt;
    /**
     * 营业截止时间
     */
    private Date endAt;
    /**
     * 营业周期
     */
    private String period;
    /**
     * 商家介绍
     */
    @ApiModelProperty("商家详细地址")
    private String detailedAddress;
    @ApiModelProperty("商家介绍")
    private String introduction;
    /**
     * 营业状态
     */
    private Boolean businessStatus;
    /**
     * 商家绑定用户id
     */
    private Long userId;
    /**
     * 是否删除
     */
    private Boolean isDel;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("是否删除")
    private String isDel;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updatedAt;
    /**
     * 更新人
     */
    private Long updatedBy;
    @ApiModelProperty("创建人")
    private String createdBy;
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;
    @ApiModelProperty("商家类型id")
    private String convenientType;
    @ApiModelProperty("商家图片")
    private String imgUrl;
    @ApiModelProperty("审核状态 (1待审核    2已通过   3未通过   )")
    private String auditType;
    @ApiModelProperty("审核意见")
    private String auditOpinion;
}
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiComConvenientMerchantsMapper.xml
@@ -6,51 +6,67 @@
    <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>
@@ -61,17 +77,36 @@
            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>
@@ -84,9 +119,6 @@
            </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,
@@ -109,32 +141,14 @@
            <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,
@@ -145,6 +159,9 @@
            <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
@@ -154,9 +171,6 @@
            </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},
@@ -179,32 +193,14 @@
            <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},
@@ -214,6 +210,9 @@
            </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>
@@ -227,9 +226,6 @@
            </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},
@@ -252,32 +248,14 @@
            <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},
@@ -288,6 +266,9 @@
            <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}