You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.8 KiB
Java
48 lines
1.8 KiB
Java
|
6 years ago
|
package com.kiisoo.ic.customer.service;
|
||
|
|
|
||
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||
|
|
import com.kiisoo.ic.customer.entity.OpCustomer;
|
||
|
|
import com.kiisoo.ic.customer.entity.OpCustomerEnterpriseWechat;
|
||
|
|
import com.kiisoo.ic.customer.entity.OpSellerCustomerRelation;
|
||
|
|
import com.kiisoo.ic.customer.entity.OpVip;
|
||
|
|
import com.kiisoo.ic.customer.mapper.OpCustomerDOMapper;
|
||
|
|
import com.kiisoo.ic.customer.mapper.OpCustomerEnterpriseWechatDOMapper;
|
||
|
|
import com.kiisoo.ic.customer.mapper.OpSellerCustomerRelationDOMapper;
|
||
|
|
import com.kiisoo.ic.customer.mapper.OpVipDOMapper;
|
||
|
|
import com.kiisoo.ic.store.entity.PoiStoreStaff;
|
||
|
|
import com.kiisoo.ic.store.mapper.PoiStoreStaffDOMapper;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
import org.springframework.transaction.annotation.Transactional;
|
||
|
|
|
||
|
|
import java.util.Date;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @ClassName: CustomerEnterpriseService
|
||
|
|
* @Description: 店铺企业微信信息
|
||
|
|
* @Auther: yinliujing
|
||
|
|
* @Date: 2020/4/8
|
||
|
|
* @Version: v1
|
||
|
|
*/
|
||
|
|
@Service
|
||
|
|
public class CustomerEnterpriseService {
|
||
|
|
|
||
|
|
private OpCustomerEnterpriseWechatDOMapper opCustomerDOMapper;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 新增店铺企业微信信息
|
||
|
|
* @param oCusEnterprise
|
||
|
|
*/
|
||
|
|
@Transactional(rollbackFor = Exception.class)
|
||
|
|
public void addCustomerEnterprise(OpCustomerEnterpriseWechat oCusEnterprise){
|
||
|
|
QueryWrapper<OpCustomerEnterpriseWechat> customerWrapper = new QueryWrapper<>();
|
||
|
|
customerWrapper.eq("unionid",oCusEnterprise.getUnionid()).last("limit 1");
|
||
|
|
OpCustomerEnterpriseWechat opCustomerEnterpriseWechat = opCustomerDOMapper.selectOne(customerWrapper);
|
||
|
|
if(null == opCustomerEnterpriseWechat){
|
||
|
|
//不存在
|
||
|
|
opCustomerDOMapper.insert(oCusEnterprise);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|