|
|
@ -1,38 +1,40 @@
|
|
|
|
package jnpf.customer.service.impl;
|
|
|
|
package jnpf.customer.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import jnpf.customer.entity.*;
|
|
|
|
|
|
|
|
import jnpf.customer.mapper.CustomerJGMobileMapper;
|
|
|
|
|
|
|
|
import jnpf.customer.service.*;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import jnpf.permission.model.authorize.AuthorizeConditionModel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import jnpf.customer.model.customer.CustomerPagination;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import jnpf.permission.service.AuthorizeService;
|
|
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import jnpf.util.*;
|
|
|
|
import jnpf.customer.entity.CustomerEntity;
|
|
|
|
import java.util.*;
|
|
|
|
import jnpf.customer.entity.CustomerMobileEntity;
|
|
|
|
|
|
|
|
import jnpf.customer.mapper.CustomerVMapper;
|
|
|
|
|
|
|
|
import jnpf.customer.model.customer.CustomerPagination;
|
|
|
|
|
|
|
|
import jnpf.customer.service.CustomerService;
|
|
|
|
|
|
|
|
import jnpf.permission.model.authorize.AuthorizeConditionModel;
|
|
|
|
|
|
|
|
import jnpf.permission.service.AuthorizeService;
|
|
|
|
|
|
|
|
import jnpf.util.ServletUtil;
|
|
|
|
|
|
|
|
import jnpf.util.StringUtil;
|
|
|
|
|
|
|
|
import jnpf.util.UserProvider;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* customer
|
|
|
|
* 客户档案
|
|
|
|
* 版本: V3.2.0
|
|
|
|
* 版本: V3.2.0
|
|
|
|
* 版权: LINKAGE-BOOT
|
|
|
|
* 版权: LINKAGE-BOOT
|
|
|
|
* 作者: LINKAGE-BOOT研发团队
|
|
|
|
* 作者: LINKAGE-BOOT研发团队
|
|
|
|
* 日期: 2023-02-13
|
|
|
|
* 日期: 2023-02-15
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMapper, CustomerJGMobileEntity> implements CustomerJGMobileService {
|
|
|
|
public class CustomerVOServiceImpl extends ServiceImpl<CustomerVMapper, CustomerEntity> implements CustomerService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
@ -41,17 +43,18 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private AuthorizeService authorizeService;
|
|
|
|
private AuthorizeService authorizeService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private CustomerVMapper customerVMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<CustomerJGMobileEntity> getList(CustomerPagination customerPagination){
|
|
|
|
public List<CustomerMobileEntity> getList(CustomerPagination customerPagination){
|
|
|
|
String userId=userProvider.get().getUserId();
|
|
|
|
String userId=userProvider.get().getUserId();
|
|
|
|
List<String> AllIdList =new ArrayList();
|
|
|
|
List<String> AllIdList =new ArrayList();
|
|
|
|
int total=0;
|
|
|
|
int total=0;
|
|
|
|
int customerNum =0;
|
|
|
|
int customerNum =0;
|
|
|
|
QueryWrapper<CustomerJGMobileEntity> customerQueryWrapper=new QueryWrapper<>();
|
|
|
|
QueryWrapper<CustomerEntity> customerQueryWrapper=new QueryWrapper<>();
|
|
|
|
boolean pcPermission = false;
|
|
|
|
boolean pcPermission = false;
|
|
|
|
boolean appPermission = false;
|
|
|
|
boolean appPermission = false;
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
@ -61,7 +64,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
return new ArrayList<>();
|
|
|
|
return new ArrayList<>();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -72,7 +75,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
return new ArrayList<>();
|
|
|
|
return new ArrayList<>();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -81,25 +84,35 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd());
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getSupplierCd,customerPagination.getSupplierCd());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm());
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getSupplierNm,customerPagination.getSupplierNm());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getVatRegistrationNum())){
|
|
|
|
|
|
|
|
customerNum++;
|
|
|
|
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getVatRegistrationNum,customerPagination.getVatRegistrationNum());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getContactName())){
|
|
|
|
|
|
|
|
customerNum++;
|
|
|
|
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getContactName,customerPagination.getContactName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(AllIdList.size()>0){
|
|
|
|
if(AllIdList.size()>0){
|
|
|
|
customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList);
|
|
|
|
customerQueryWrapper.lambda().in(CustomerEntity::getId, AllIdList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//排序
|
|
|
|
//排序
|
|
|
|
if(StringUtil.isEmpty(customerPagination.getSidx())){
|
|
|
|
if(StringUtil.isEmpty(customerPagination.getSidx())){
|
|
|
|
customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd);
|
|
|
|
customerQueryWrapper.lambda().orderByDesc(CustomerEntity::getCreatorTime);
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String sidx = customerPagination.getSidx();
|
|
|
|
String sidx = customerPagination.getSidx();
|
|
|
|
CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity();
|
|
|
|
CustomerEntity customerEntity = new CustomerEntity();
|
|
|
|
Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx);
|
|
|
|
Field declaredField = customerEntity.getClass().getDeclaredField(sidx);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
|
|
|
|
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
|
|
|
@ -108,21 +121,21 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
Page<CustomerJGMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
|
|
|
|
Page<CustomerMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
|
|
|
|
IPage<CustomerJGMobileEntity> userIPage=this.page(page, customerQueryWrapper);
|
|
|
|
IPage<CustomerMobileEntity> userIPage=this.page(page, customerQueryWrapper);
|
|
|
|
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
List<CustomerJGMobileEntity> list = new ArrayList();
|
|
|
|
List<CustomerMobileEntity> list = new ArrayList();
|
|
|
|
return customerPagination.setData(list, list.size());
|
|
|
|
return customerPagination.setData(list, list.size());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<CustomerJGMobileEntity> getTypeList(CustomerPagination customerPagination, String dataType){
|
|
|
|
public List<CustomerEntity> getTypeList(CustomerPagination customerPagination,String dataType){
|
|
|
|
String userId=userProvider.get().getUserId();
|
|
|
|
String userId=userProvider.get().getUserId();
|
|
|
|
List<String> AllIdList =new ArrayList();
|
|
|
|
List<String> AllIdList =new ArrayList();
|
|
|
|
int total=0;
|
|
|
|
int total=0;
|
|
|
|
int customerNum =0;
|
|
|
|
int customerNum =0;
|
|
|
|
QueryWrapper<CustomerJGMobileEntity> customerQueryWrapper=new QueryWrapper<>();
|
|
|
|
QueryWrapper<CustomerEntity> customerQueryWrapper=new QueryWrapper<>();
|
|
|
|
boolean pcPermission = false;
|
|
|
|
boolean pcPermission = false;
|
|
|
|
boolean appPermission = false;
|
|
|
|
boolean appPermission = false;
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
|
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
|
|
|
@ -132,7 +145,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
return new ArrayList<>();
|
|
|
|
return new ArrayList<>();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -143,7 +156,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
if (ObjectUtil.isEmpty(customerObj)){
|
|
|
|
return new ArrayList<>();
|
|
|
|
return new ArrayList<>();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
|
|
|
|
customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -152,25 +165,35 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd());
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getSupplierCd,customerPagination.getSupplierCd());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
|
|
|
|
customerNum++;
|
|
|
|
customerNum++;
|
|
|
|
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm());
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getSupplierNm,customerPagination.getSupplierNm());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getVatRegistrationNum())){
|
|
|
|
|
|
|
|
customerNum++;
|
|
|
|
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getVatRegistrationNum,customerPagination.getVatRegistrationNum());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotEmpty(customerPagination.getContactName())){
|
|
|
|
|
|
|
|
customerNum++;
|
|
|
|
|
|
|
|
customerQueryWrapper.lambda().like(CustomerEntity::getContactName,customerPagination.getContactName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(AllIdList.size()>0){
|
|
|
|
if(AllIdList.size()>0){
|
|
|
|
customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList);
|
|
|
|
customerQueryWrapper.lambda().in(CustomerEntity::getId, AllIdList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//排序
|
|
|
|
//排序
|
|
|
|
if(StringUtil.isEmpty(customerPagination.getSidx())){
|
|
|
|
if(StringUtil.isEmpty(customerPagination.getSidx())){
|
|
|
|
customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd);
|
|
|
|
customerQueryWrapper.lambda().orderByDesc(CustomerEntity::getCreatorTime);
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String sidx = customerPagination.getSidx();
|
|
|
|
String sidx = customerPagination.getSidx();
|
|
|
|
CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity();
|
|
|
|
CustomerEntity customerEntity = new CustomerEntity();
|
|
|
|
Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx);
|
|
|
|
Field declaredField = customerEntity.getClass().getDeclaredField(sidx);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
|
|
|
|
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
|
|
|
@ -180,11 +203,11 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if("0".equals(dataType)){
|
|
|
|
if("0".equals(dataType)){
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
Page<CustomerJGMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
|
|
|
|
Page<CustomerEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
|
|
|
|
IPage<CustomerJGMobileEntity> userIPage=this.page(page, customerQueryWrapper);
|
|
|
|
IPage<CustomerEntity> userIPage=this.page(page, customerQueryWrapper);
|
|
|
|
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
List<CustomerJGMobileEntity> list = new ArrayList();
|
|
|
|
List<CustomerEntity> list = new ArrayList();
|
|
|
|
return customerPagination.setData(list, list.size());
|
|
|
|
return customerPagination.setData(list, list.size());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
@ -193,24 +216,29 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public CustomerJGMobileEntity getInfo(String id){
|
|
|
|
public CustomerEntity getInfo(String id){
|
|
|
|
QueryWrapper<CustomerJGMobileEntity> queryWrapper=new QueryWrapper<>();
|
|
|
|
QueryWrapper<CustomerEntity> queryWrapper=new QueryWrapper<>();
|
|
|
|
queryWrapper.lambda().eq(CustomerJGMobileEntity::getId,id);
|
|
|
|
queryWrapper.lambda().eq(CustomerEntity::getId,id);
|
|
|
|
return this.getOne(queryWrapper);
|
|
|
|
return this.getOne(queryWrapper);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void create(CustomerJGMobileEntity entity){
|
|
|
|
public IPage<CustomerMobileEntity> page(Page<CustomerMobileEntity> page, Wrapper<CustomerEntity> queryWrapper) {
|
|
|
|
|
|
|
|
return customerVMapper.getMobileList(page,queryWrapper);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void create(CustomerEntity entity){
|
|
|
|
this.save(entity);
|
|
|
|
this.save(entity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean update(String id, CustomerJGMobileEntity entity){
|
|
|
|
public boolean update(String id, CustomerEntity entity){
|
|
|
|
entity.setId(id);
|
|
|
|
entity.setId(id);
|
|
|
|
return this.updateById(entity);
|
|
|
|
return this.updateById(entity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void delete(CustomerJGMobileEntity entity){
|
|
|
|
public void delete(CustomerEntity entity){
|
|
|
|
if(entity!=null){
|
|
|
|
if(entity!=null){
|
|
|
|
this.removeById(entity.getId());
|
|
|
|
this.removeById(entity.getId());
|
|
|
|
}
|
|
|
|
}
|