Browse Source

客户提交信息

guarantee-lsq 2 năm trước cách đây
mục cha
commit
b2143d38e0

+ 96 - 0
platform-dao/src/main/resources/mapper/operate/CustomerInfoMapper.xml

@@ -0,0 +1,96 @@
+<?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.platform.dao.mapper.operate.CustomerInfoMapper">
+    <sql id="Base_Column_List">
+                             customer.id,
+                                     customer.company_name,
+                                     customer.phone,
+                                     customer.email,
+                                     customer.content,
+                                     customer.city,
+                                     customer.remark,
+                                     customer.created_user_id,
+                                     customer.created_user_name,
+                                     customer.update_user_id,
+                                     customer.update_user_name,
+                                     customer.created_time,
+                                     customer.update_time,
+                                     customer.status
+                        </sql>
+    <sql id="Ref_Column_List">
+                                                                         customer.company_name,
+                                     customer.phone,
+                                     customer.email,
+                                     customer.content,
+                                     customer.city,
+                                     customer.remark,
+                                                                                                                                                                                                                                                                                                             customer.status
+                                </sql>
+    <sql id="List_Condition">
+        <if test="id != null and id != ''">
+            and customer.id = #{id}
+        </if>
+        <if test="companyName != null and companyName != ''">
+            and customer.company_name = #{companyName}
+        </if>
+        <if test="phone != null and phone != ''">
+            and customer.phone = #{phone}
+        </if>
+        <if test="email != null and email != ''">
+            and customer.email = #{email}
+        </if>
+        <if test="content != null">
+            and customer.content = #{content}
+        </if>
+        <if test="city != null and city != ''">
+            and customer.city = #{city}
+        </if>
+        <if test="remark != null and remark != ''">
+            and customer.remark = #{remark}
+        </if>
+        <if test="createdUserId != null and createdUserId != ''">
+            and customer.created_user_id = #{createdUserId}
+        </if>
+        <if test="createdUserName != null and createdUserName != ''">
+            and customer.created_user_name = #{createdUserName}
+        </if>
+        <if test="updateUserId != null and updateUserId != ''">
+            and customer.update_user_id = #{updateUserId}
+        </if>
+        <if test="updateUserName != null and updateUserName != ''">
+            and customer.update_user_name = #{updateUserName}
+        </if>
+        <if test="createdTimeStart != null">
+            and customer.created_time <![CDATA[>=]]>; #{createdTimeStart}
+        </if>
+        <if test="createdTimeEnd != null">
+            and customer.created_time <![CDATA[<=]]> #{createdTimeEnd}
+        </if>
+        <if test="createdTime != null">
+            and customer.created_time = #{createdTime}
+        </if>
+        <if test="updateTimeStart != null">
+            and customer.update_time <![CDATA[>=]]>; #{updateTimeStart}
+        </if>
+        <if test="updateTimeEnd != null">
+            and customer.update_time <![CDATA[<=]]> #{updateTimeEnd}
+        </if>
+        <if test="updateTime != null">
+            and customer.update_time = #{updateTime}
+        </if>
+        <if test="status != null">
+            and customer.status = #{status}
+        </if>
+        <if test="keyword != null and keyword != ''">
+            and customer.id like concat(concat('%',#{keyword}),'%')
+        </if>
+    </sql>
+    <select id="selectList" parameterType="com.platform.dao.dto.operate.CustomerInfoDTO"
+            resultType="com.platform.dao.vo.query.operate.CustomerInfoVO">
+        select customer.*
+        from t_customer_info as customer
+        <where>
+            <include refid="List_Condition"/>
+        </where>
+    </select>
+</mapper>

+ 10 - 12
platform-rest/src/main/java/com/platform/rest/controller/operate/CustomerInfoController.java

@@ -1,26 +1,24 @@
 package com.platform.rest.controller.operate;
 
+import com.platform.common.bean.AbstractPageResultBean;
+import com.platform.common.util.BeanConverterUtil;
 import com.platform.common.util.R;
+import com.platform.common.validation.group.AddGroup;
+import com.platform.common.validation.group.UpdateGroup;
 import com.platform.dao.dto.operate.CustomerInfoDTO;
-import com.platform.dao.dto.repair.RepairApplicationFormDTO;
 import com.platform.dao.entity.operate.CustomerInfo;
-import com.platform.dao.enums.RepairApplicationFormTypeEnum;
-import com.platform.service.operate.CustomerInfoService;
 import com.platform.dao.util.ExcelUtil;
 import com.platform.dao.vo.export.operate.ExportCustomerInfoVO;
 import com.platform.dao.vo.query.operate.CustomerInfoVO;
-import com.platform.common.util.BeanConverterUtil;
-import com.platform.common.validation.group.AddGroup;
-import com.platform.common.validation.group.UpdateGroup;
-import com.platform.service.repair.strategy.RepairStrategyFactory;
+import com.platform.rest.log.annotation.SysLog;
+import com.platform.service.operate.CustomerInfoService;
+import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-import lombok.AllArgsConstructor;
-import com.platform.common.bean.AbstractPageResultBean;
-import com.platform.rest.log.annotation.SysLog;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * @Description 客户提交信息表 控制器
@@ -147,7 +145,7 @@ public class CustomerInfoController {
    * @return R
    */
   @SysLog("处理客户信息")
-  @PutMapping("/{id}")
+  @PutMapping("/handle/{id}")
   @PreAuthorize("@pms.hasPermission('operate-customers-edit')")
   public R handle(@PathVariable("id") String id, @Validated({UpdateGroup.class}) @RequestBody CustomerInfoDTO customerInfoDTO) {
     customerInfoDTO.setId(id);