소스 검색

customerPerson

胡轶钦 5 년 전
부모
커밋
46915b17ff

+ 1
- 4
src/main/java/com/huiju/estateagents/controller/MiniAppController.java 파일 보기

@@ -208,10 +208,7 @@ public class MiniAppController {
208 208
             customerPersonQueryWrapper.eq("customer_id",customers.getCustomerId());
209 209
             List<TaCustomerPerson> list = taCustomerPersonService.list(customerPersonQueryWrapper);
210 210
             if(list.size()<=0){
211
-                TaCustomerPerson customerPerson = new TaCustomerPerson();
212
-                customerPerson.setCustomerId(customers.getCustomerId());
213
-                customerPerson.setPersonId(person.getPersonId());
214
-                taCustomerPersonService.save(customerPerson);
211
+                taCustomerPersonService.insertBean(person.getPersonId(),customers.getCustomerId());
215 212
             }
216 213
         }
217 214
 

+ 3
- 0
src/main/java/com/huiju/estateagents/mapper/TaCustomerPersonMapper.java 파일 보기

@@ -3,7 +3,9 @@ package com.huiju.estateagents.mapper;
3 3
 
4 4
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 5
 import com.huiju.estateagents.entity.TaCustomerPerson;
6
+import org.apache.ibatis.annotations.Insert;
6 7
 import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
7 9
 
8 10
 /**
9 11
  * <p>
@@ -15,5 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
15 17
  */
16 18
 @Mapper
17 19
 public interface TaCustomerPersonMapper extends BaseMapper<TaCustomerPerson> {
20
+    void insertBean(@Param("personId") String personId, @Param("customerId") String customerId);
18 21
 
19 22
 }

+ 1
- 0
src/main/java/com/huiju/estateagents/service/ITaCustomerPersonService.java 파일 보기

@@ -13,5 +13,6 @@ import com.huiju.estateagents.entity.TaCustomerPerson;
13 13
  * @since 2019-08-08
14 14
  */
15 15
 public interface ITaCustomerPersonService extends IService<TaCustomerPerson> {
16
+    void insertBean(String personId,String customerId);
16 17
 
17 18
 }

+ 3
- 0
src/main/java/com/huiju/estateagents/service/impl/TaCustomerPersonServiceImpl.java 파일 보기

@@ -18,4 +18,7 @@ import org.springframework.stereotype.Service;
18 18
 @Service
19 19
 public class TaCustomerPersonServiceImpl extends ServiceImpl<TaCustomerPersonMapper, TaCustomerPerson> implements ITaCustomerPersonService {
20 20
 
21
+    public void insertBean(String personId,String customerId){
22
+
23
+    }
21 24
 }

+ 5
- 0
src/main/resources/mapper/TaCustomerPersonMapper.xml 파일 보기

@@ -1,5 +1,10 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.huiju.estateagents.mapper.TaCustomerPersonMapper">
4
+    <insert id="insertBean">
5
+        insert into ta_customer_person (person_id,customer_id)
6
+        values
7
+        (#{personId},#{customerId})
8
+    </insert>
4 9
 
5 10
 </mapper>