客户回调接口

master
Caps 6 years ago
parent 1c4b8b49d4
commit ec5b508738

@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.util.*;
import java.util.stream.Collectors;
@ -59,6 +60,16 @@ public class CustomerService {
this.poiStoreStaffDOMapper = poiStoreStaffDOMapper;
}
@PostConstruct
public void test(){
CustomerDTO customerDTO = new CustomerDTO();
customerDTO.setUniId("insduneubg-1234");
customerDTO.setName("何永东");
customerDTO.setStaffCode("001");
customerDTO.setShopCode("002");
customerRelation(customerDTO);
}
/**
*
* @param customerDTO
@ -74,10 +85,14 @@ public class CustomerService {
QueryWrapper<PoiStore> poiWrapper = new QueryWrapper<>();
poiWrapper.eq("code",customerDTO.getShopCode()).last("limit 1");
PoiStore poiStore = poiStoreDOMapper.selectOne(poiWrapper);
//导购信息
QueryWrapper<PoiStoreStaff> wrapper = new QueryWrapper<>();
wrapper.eq("staff_code",customerDTO.getStaffCode()).eq("store_code",customerDTO.getShopCode()).last("limit 1");
PoiStoreStaff poiStoreStaff = poiStoreStaffDOMapper.selectOne(wrapper);
if(poiStoreStaff == null || poiStore == null){
return null;
}
//做插入使用
OpCustomer insertCustomer = new OpCustomer();

@ -1,6 +1,7 @@
package com.kiisoo.ic.customer.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -64,6 +65,7 @@ public class OpCustomer {
/**
*
*/
@TableField("`desc`")
private String desc;
/**

Loading…
Cancel
Save