浏览代码

商户管理、优惠活动、招聘服务

lchao 9 月之前
父节点
当前提交
c8a6f57060

+ 143 - 109
zhsq_qk-system/src/main/java/zhsq_qk/system/domain/QkJczlDiscount.java

@@ -11,113 +11,147 @@ import zhsq_qk.common.core.domain.BaseEntity;
  * @author lc
  * @date 2024-09-03
  */
-public class QkJczlDiscount extends BaseEntity
-        {
-private static final long serialVersionUID = 1L;
-
-        /** 主键id */
-        private Long id;
-
-        /** 活动类型 */
-                @Excel(name = "活动类型")
-        private String activityType;
-
-        /** 产品类型 */
-                @Excel(name = "产品类型")
-        private String productType;
-
-        /** 标题 */
-                @Excel(name = "标题")
-        private String activityTitle;
-
-        /** 商家 */
-                @Excel(name = "商家")
-        private String business;
-
-        /** 详情 */
-                @Excel(name = "详情")
-        private String details;
-
-        /** 地址 */
-                @Excel(name = "地址")
-        private String address;
-
-        /** 商户id */
-                @Excel(name = "商户id")
-        private String merchantId;
-
-        public void setId(Long id) {
-            this.id = id;
-        }
-
-        public Long getId() {
-            return id;
-        }
-        public void setActivityType(String activityType) {
-            this.activityType = activityType;
-        }
-
-        public String getActivityType() {
-            return activityType;
-        }
-        public void setProductType(String productType) {
-            this.productType = productType;
-        }
-
-        public String getProductType() {
-            return productType;
-        }
-        public void setactivityTitle(String activityTitle) {
-            this.activityTitle = activityTitle;
-        }
-
-        public String getactivityTitle() {
-            return activityTitle;
-        }
-        public void setBusiness(String business) {
-            this.business = business;
-        }
-
-        public String getBusiness() {
-            return business;
-        }
-        public void setDetails(String details) {
-            this.details = details;
-        }
-
-        public String getDetails() {
-            return details;
-        }
-        public void setAddress(String address) {
-            this.address = address;
-        }
-
-        public String getAddress() {
-            return address;
-        }
-        public void setMerchantId(String merchantId) {
-            this.merchantId = merchantId;
-        }
-
-        public String getMerchantId() {
-            return merchantId;
-        }
-
-@Override
-public String toString() {
-    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-        .append("id", getId())
-        .append("activityType", getActivityType())
-        .append("productType", getProductType())
-        .append("activityTitle", getactivityTitle())
-        .append("business", getBusiness())
-        .append("details", getDetails())
-        .append("address", getAddress())
-        .append("createBy", getCreateBy())
-        .append("createTime", getCreateTime())
-        .append("updateBy", getUpdateBy())
-        .append("updateTime", getUpdateTime())
-        .append("merchantId", getMerchantId())
-            .toString();
-}
+public class QkJczlDiscount extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private Long id;
+
+    /**
+     * 活动类型
+     */
+    @Excel(name = "活动类型")
+    private String activityType;
+
+    /**
+     * 产品类型
+     */
+    @Excel(name = "产品类型")
+    private String productType;
+
+    /**
+     * 标题
+     */
+    @Excel(name = "标题")
+    private String activityTitle;
+
+    /**
+     * 商家
+     */
+    @Excel(name = "商家")
+    private String business;
+
+    /**
+     * 详情
+     */
+    @Excel(name = "详情")
+    private String details;
+
+    /**
+     * 地址
+     */
+    @Excel(name = "地址")
+    private String address;
+
+    /**
+     * 商户id
+     */
+    @Excel(name = "商户id")
+    private String merchantId;
+
+    private String merchantName;
+
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setActivityType(String activityType) {
+        this.activityType = activityType;
+    }
+
+    public String getActivityType() {
+        return activityType;
+    }
+
+    public void setProductType(String productType) {
+        this.productType = productType;
+    }
+
+    public String getProductType() {
+        return productType;
+    }
+
+    public void setBusiness(String business) {
+        this.business = business;
+    }
+
+    public String getBusiness() {
+        return business;
+    }
+
+    public void setDetails(String details) {
+        this.details = details;
+    }
+
+    public String getDetails() {
+        return details;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setMerchantId(String merchantId) {
+        this.merchantId = merchantId;
+    }
+
+    public String getMerchantId() {
+        return merchantId;
+    }
+
+    public String getActivityTitle() {
+        return activityTitle;
+    }
+
+    public void setActivityTitle(String activityTitle) {
+        this.activityTitle = activityTitle;
+    }
+
+    public String getMerchantName() {
+        return merchantName;
+    }
+
+    public void setMerchantName(String merchantName) {
+        this.merchantName = merchantName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("activityType", getActivityType())
+                .append("productType", getProductType())
+                .append("activityTitle", getActivityTitle())
+                .append("business", getBusiness())
+                .append("details", getDetails())
+                .append("address", getAddress())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("merchantId", getMerchantId())
+                .append("merchantName", getMerchantName())
+                .toString();
+    }
 }

+ 28 - 22
zhsq_qk-system/src/main/resources/mapper/system/QkJczlDiscountMapper.xml

@@ -17,37 +17,43 @@
             <result property="updateBy" column="update_by"/>
             <result property="updateTime" column="update_time"/>
             <result property="merchantId" column="merchant_id"/>
+        <result property="merchantName" column="merchant_name"/>
     </resultMap>
 
+
     <sql id="selectQkJczlDiscountVo">
         select id, activity_type, product_type, activity_title, business, details, address, create_by, create_time, update_by, update_time, merchant_id
         from qk_jczl_discount
     </sql>
 
     <select id="selectQkJczlDiscountList" parameterType="QkJczlDiscount" resultMap="QkJczlDiscountResult">
-        <include refid="selectQkJczlDiscountVo"/>
+        SELECT
+        a.id,
+        a.activity_type,
+        b.merchant_name,
+        a.product_type,
+        a.activity_title,
+        a.business,
+        a.details,
+        a.address,
+        a.create_by,
+        a.create_time,
+        a.update_by,
+        a.update_time,
+        a.merchant_id
+        FROM
+        qk_jczl_discount a
+        left join qk_jczl_merchant b on a.merchant_id = b.id
         <where>
-                        <if test="activityType != null  and activityType != ''">
-                            and activity_type = #{activityType}
-                        </if>
-                        <if test="productType != null  and productType != ''">
-                            and product_type = #{productType}
-                        </if>
-                        <if test="activityTitle != null  and activityTitle != ''">
-                            and activity_title = #{activityTitle}
-                        </if>
-                        <if test="business != null  and business != ''">
-                            and business = #{business}
-                        </if>
-                        <if test="details != null  and details != ''">
-                            and details = #{details}
-                        </if>
-                        <if test="address != null  and address != ''">
-                            and address = #{address}
-                        </if>
-                        <if test="merchantId != null  and merchantId != ''">
-                            and merchant_id = #{merchantId}
-                        </if>
+            <if test="activityType != null  and activityType != ''">
+                and activity_type = #{activityType}
+            </if>
+            <if test="activityTitle != null  and activityTitle != ''">
+                and activity_title like concat('%', #{activityTitle}, '%')
+            </if>
+            <if test="business != null  and business != ''">
+                and merchant_name = #{merchantName}
+            </if>
         </where>
     </select>
 

+ 7 - 8
zhsq_qk-ui/src/views/system/discount/index.vue

@@ -78,6 +78,7 @@
 
     <el-table v-loading="loading" :data="discountList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="标题" align="center" prop="activityTitle"/>
       <el-table-column label="活动类型" align="center" prop="activityType">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_activity_type" :value="scope.row.activityType"/>
@@ -88,9 +89,7 @@
           <dict-tag :options="dict.type.sys_product_type" :value="scope.row.productType"/>
         </template>
       </el-table-column>
-      <el-table-column label="标题" align="center" prop="activityTitle"/>
       <el-table-column label="商家" align="center" prop="merchantName"/>
-      <el-table-column label="详情" align="center" prop="details"/>
       <el-table-column label="地址" align="center" prop="address"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -125,6 +124,9 @@
     <!-- 添加或修改优惠活动对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="标题" prop="activityTitle">
+          <el-input v-model="form.activityTitle" placeholder="请输入标题"/>
+        </el-form-item>
         <el-form-item label="活动类型" prop="activityType">
           <el-select v-model="form.activityType" placeholder="请选择活动类型">
             <el-option
@@ -145,9 +147,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="标题" prop="activityTitle">
-          <el-input v-model="form.activityTitle" placeholder="请输入标题"/>
-        </el-form-item>
         <el-form-item label="商家" prop="merchantName">
           <el-select v-model="form.merchantName" filterable placeholder="请选择项目名称" @change="onChange">
             <el-option
@@ -158,12 +157,12 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="详情" prop="details">
-          <el-input v-model="form.details" placeholder="请输入详情"/>
-        </el-form-item>
         <el-form-item label="地址" prop="address">
           <el-input v-model="form.address" placeholder="请输入地址"/>
         </el-form-item>
+        <el-form-item label="详情" prop="details">
+          <el-input v-model="form.details" type="textarea"  :rows="4" placeholder="请输入详情"/>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>

+ 2 - 2
zhsq_qk-ui/src/views/system/recruit/index.vue

@@ -86,7 +86,7 @@
       <el-table-column label="标题" align="center" prop="recruitmentTitle"/>
       <el-table-column label="招聘人数" align="center" prop="recruitmentNum"/>
       <el-table-column label="地址" align="center" prop="address"/>
-      <el-table-column label="详情" align="center" prop="details"/>
+<!--      <el-table-column label="详情" align="center" prop="details"/>-->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -140,7 +140,7 @@
           <el-input v-model="form.address" placeholder="请输入地址"/>
         </el-form-item>
         <el-form-item label="详情" prop="details">
-          <el-input v-model="form.details" placeholder="请输入详情"/>
+          <el-input v-model="form.details" type="textarea" :rows="4" placeholder="请输入详情"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">