Commit cf2c034c authored by hubaoshan's avatar hubaoshan

BCustomer

parent 69150bb5
package org.rcisoft.bus.bcustomer.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.bus.bcustomer.entity.BCustomer;
import org.rcisoft.bus.bcustomer.service.BCustomerService;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.controller.CyPaginationController;
import org.rcisoft.core.model.CyGridModel;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import org.rcisoft.core.result.CyResult;
import org.rcisoft.core.util.CyResultGenUtil;
import org.rcisoft.util.ExportToExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
@RestController
@RequestMapping("/bcustomer")
public class BCustomerController extends CyPaginationController {
@Autowired
private BCustomerService bCustomerServiceImpl;
//@PreAuthorize("@cyPerm.hasPerm('sys:stomer:add')")
@CyOpeLogAnno(title = "system-BCustomer管理-新增BCustomer", businessType = CyLogTypeEnum.INSERT)
@ApiOperation(value="添加BCustomer", notes="添加BCustomer")
@PostMapping(value = "/add")
public CyResult add(@Valid BCustomer bCustomer, BindingResult bindingResult) {
CyPersistModel data = bCustomerServiceImpl.persist(bCustomer);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
bCustomer);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:stomer:delete')")
@CyOpeLogAnno(title = "system-BCustomer管理-删除BCustomer", businessType = CyLogTypeEnum.DELETE)
@ApiOperation(value="逻辑删除BCustomer", notes="逻辑删除BCustomer")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/deleteLogical/{businessId:\\w+}")
public CyResult deleteLogical(@PathVariable Integer businessId,BCustomer bCustomer) {
bCustomer.setBusinessId(businessId);
CyPersistModel data = bCustomerServiceImpl.removeLogical(bCustomer);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
businessId);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:stomer:delete')")
@CyOpeLogAnno(title = "system-BCustomer管理-删除BCustomer", businessType = CyLogTypeEnum.DELETE)
@ApiOperation(value="删除BCustomer", notes="删除BCustomer")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/delete/{businessId:\\w+}")
public CyResult delete(@PathVariable Integer businessId,BCustomer bCustomer) {
bCustomer.setBusinessId(businessId);
CyPersistModel data = bCustomerServiceImpl.remove(bCustomer);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
businessId);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:stomer:update')")
@CyOpeLogAnno(title = "system-BCustomer管理-修改BCustomer", businessType = CyLogTypeEnum.UPDATE)
@ApiOperation(value="修改BCustomer", notes="修改BCustomer")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PutMapping("/update/{businessId:\\w+}")
public CyResult update(@PathVariable Integer businessId, @Valid BCustomer bCustomer, BindingResult bindingResult) {
bCustomer.setBusinessId(businessId);
CyPersistModel data = bCustomerServiceImpl.merge(bCustomer);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
bCustomer);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:stomer:query')")
@CyOpeLogAnno(title = "system-BCustomer管理-查询BCustomer", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="查询单一BCustomer", notes="查询单一BCustomer")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@GetMapping("/detail/{businessId:\\w+}")
public CyResult detail(@PathVariable String businessId) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
bCustomerServiceImpl.findById(businessId));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:stomer:list')")
@CyOpeLogAnno(title = "system-BCustomer管理-查询BCustomer", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="查询BCustomer集合", notes="查询BCustomer集合")
@GetMapping(value = "/queryBCustomers")
public CyResult queryBCustomers(BCustomer bCustomer) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
bCustomerServiceImpl.findAll(bCustomer));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:stomer:list')")
@CyOpeLogAnno(title = "system-BCustomer管理-查询BCustomer", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="分页查询BCustomer集合", notes="分页查询BCustomer集合")
@GetMapping(value = "/queryBCustomerByPagination")
public CyGridModel listByPagination(BCustomer bCustomer) {
bCustomerServiceImpl.findAllByPagination(getPaginationUtility(), bCustomer);
return getGridModelResponse();
}
@CyOpeLogAnno(title = "system-BCustomer管理-查询BCustomer", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出BCustomer信息", notes = "导出BCustomer信息")
@GetMapping(value = "/export")
public void outBCustomer(HttpServletResponse response, BCustomer bCustomer, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
String excelName="";
switch(excelId){
case "0": excelName="BCustomer信息.xls";break;
case "1": excelName="BCustomer信息.xlsx";break;
case "2": excelName="BCustomer信息.csv";break;
}
List<BCustomer> bCustomerList = bCustomerServiceImpl.export(bCustomer);
ExportToExcelUtil.exportExcel(bCustomerList, "BCustomer信息", "BCustomer信息", BCustomer.class, excelName, response);
}
}
package org.rcisoft.bus.bcustomer.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.rcisoft.bus.bcustomer.entity.BCustomer;
import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.core.model.CyPageInfo;
import org.springframework.data.repository.query.Param;
import java.util.List;
public interface BCustomerRepository extends CyBaseMapper<BCustomer> {
List<BCustomer>queryBCustomers(@Param("entity") BCustomer bCustomer);
IPage<BCustomer> queryBCustomersPaged(CyPageInfo cyPageInfo, @Param("entity") BCustomer bCustomer);
Integer queryNumberSomeCode(BCustomer bCustomer);
}
package org.rcisoft.bus.bcustomer.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.rcisoft.core.entity.CyIdIncreEntity;
@Data
@TableName("b_customer")
public class BCustomer extends CyIdIncreEntity {
@Excel(name = "custCode", orderNum = "0", width = 20)
private String custCode;
@Excel(name = "custName", orderNum = "1", width = 20)
private String custName;
@Excel(name = "custGroup", orderNum = "2", width = 20)
private String custGroup;
@Excel(name = "custGroup2", orderNum = "3", width = 20)
private String custGroup2;
@Excel(name = "custRt1", orderNum = "4", width = 20)
private String custRt1;
@Excel(name = "custIo", orderNum = "5", width = 20)
private String custIo;
@Excel(name = "custNewpic", orderNum = "6", width = 20)
private String custNewpic;
@Excel(name = "custGroup1", orderNum = "7", width = 20)
private String custGroup1;
@Excel(name = "custRt2", orderNum = "8", width = 20)
private String custRt2;
@Excel(name = "custRout", orderNum = "9", width = 20)
private String custRout;
@Excel(name = "custAddr", orderNum = "10", width = 20)
private String custAddr;
@Excel(name = "custG0", orderNum = "11", width = 20)
private String custG0;
@Excel(name = "custG20", orderNum = "12", width = 20)
private String custG20;
@Excel(name = "custG30", orderNum = "13", width = 20)
private String custG30;
@Excel(name = "custG201", orderNum = "14", width = 20)
private String custG201;
@Excel(name = "custSave", orderNum = "15", width = 20)
private String custSave;
@Excel(name = "custStype", orderNum = "16", width = 20)
private String custStype;
@Excel(name = "custG1", orderNum = "17", width = 20)
private String custG1;
@Excel(name = "custYj", orderNum = "18", width = 20)
private String custYj;
@Excel(name = "custYj2", orderNum = "19", width = 20)
private String custYj2;
@Excel(name = "custYj3", orderNum = "20", width = 20)
private String custYj3;
@Excel(name = "custGc", orderNum = "21", width = 20)
private String custGc;
}
package org.rcisoft.bus.bcustomer.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.rcisoft.bus.bcustomer.entity.BCustomer;
import org.rcisoft.core.model.CyPageInfo;
import org.rcisoft.core.model.CyPersistModel;
import java.util.List;
public interface BCustomerService {
//保存
CyPersistModel persist(BCustomer bCustomer);
//删除
CyPersistModel remove(BCustomer bCustomer);
//逻辑删除
CyPersistModel removeLogical(BCustomer bCustomer);
//修改
CyPersistModel merge(BCustomer bCustomer);
//根据id查询
BCustomer findById(String id);
//分页查询
IPage<BCustomer> findAllByPagination(CyPageInfo<BCustomer> paginationUtility,
BCustomer bCustomer);
//查询list
List<BCustomer> findAll(BCustomer bCustomer);
//导出
List<BCustomer> export(BCustomer bCustomer);
}
package org.rcisoft.bus.bcustomer.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.rcisoft.bus.bcustomer.dao.BCustomerRepository;
import org.rcisoft.bus.bcustomer.entity.BCustomer;
import org.rcisoft.bus.bcustomer.service.BCustomerService;
import org.rcisoft.core.exception.CyServiceException;
import org.rcisoft.core.model.CyPageInfo;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.util.CyUserUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class BCustomerServiceImpl extends ServiceImpl<BCustomerRepository, BCustomer> implements BCustomerService{
//保存
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel persist(BCustomer bCustomer) {
// 验重
if (baseMapper.queryNumberSomeCode(bCustomer) > 0) {
throw new CyServiceException(501,"该custcode已存在,请重新输入");
}
//增加操作
int line = baseMapper.insert(bCustomer);
log.debug(CyUserUtil.getAuthenUsername()+"新增了ID为"+
bCustomer.getBusinessId()+"的信息");
return new CyPersistModel(line);
}
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel remove(BCustomer bCustomer) {
//删除
int line = baseMapper.realDelete(bCustomer);
log.debug(CyUserUtil.getAuthenUsername()+"删除了ID为"+
bCustomer.getBusinessId()+"的信息");
return new CyPersistModel(line);
}
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel removeLogical(BCustomer bCustomer) {
//逻辑删除
int line = baseMapper.deleteById(bCustomer);
log.debug(CyUserUtil.getAuthenUsername()+"逻辑删除了ID为"+
bCustomer.getBusinessId()+"的信息");
return new CyPersistModel(line);
}
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel merge(BCustomer bCustomer) {
// 验重
if (baseMapper.queryNumberSomeCode(bCustomer) > 0) {
throw new CyServiceException(501,"该custcode已存在,请重新输入");
}
//修改操作
int line = baseMapper.updateById(bCustomer);
log.debug(CyUserUtil.getAuthenUsername()+"修改了ID为"+
bCustomer.getBusinessId()+"的信息");
return new CyPersistModel(line);
}
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public BCustomer findById(String id) {
//根据id查询操作
return baseMapper.selectById(id);
}
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public IPage<BCustomer> findAllByPagination(CyPageInfo<BCustomer> paginationUtility, BCustomer bCustomer) {
//分页查询
return baseMapper.queryBCustomersPaged(paginationUtility, bCustomer);
}
//查询
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public List<BCustomer> findAll(BCustomer bCustomer) {
return baseMapper.queryBCustomers(bCustomer);
}
//导出
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public List<BCustomer> export(BCustomer bCustomer) {
List<BCustomer> bCustomerList = baseMapper.queryBCustomers(bCustomer);
return bCustomerList;
}
}
package org.rcisoft.bpnsypn.controller;
package org.rcisoft.bus.bpnsypn.controller;
/*固定导入*/
......@@ -6,8 +6,8 @@ package org.rcisoft.bpnsypn.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.bpnsypn.entity.BPnSypn;
import org.rcisoft.bpnsypn.service.BPnSypnService;
import org.rcisoft.bus.bpnsypn.entity.BPnSypn;
import org.rcisoft.bus.bpnsypn.service.BPnSypnService;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.controller.CyPaginationController;
......
......@@ -31,11 +31,11 @@
// **/
// Integer querySomePn( BPnSypn bPnSypn);
//}
package org.rcisoft.bpnsypn.dao;
package org.rcisoft.bus.bpnsypn.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.rcisoft.bpnsypn.entity.BPnSypn;
import org.rcisoft.bus.bpnsypn.entity.BPnSypn;
import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.core.model.CyPageInfo;
......
package org.rcisoft.bpnsypn.entity;
package org.rcisoft.bus.bpnsypn.entity;
//import cn.afterturn.easypoi.excel.annotation.Excel;
//import com.baomidou.mybatisplus.annotation.TableName;
......
......@@ -25,10 +25,10 @@
//
//
//}
package org.rcisoft.bpnsypn.service;
package org.rcisoft.bus.bpnsypn.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.rcisoft.bpnsypn.entity.BPnSypn;
import org.rcisoft.bus.bpnsypn.entity.BPnSypn;
import org.rcisoft.core.model.CyPageInfo;
import org.rcisoft.core.model.CyPersistModel;
......
package org.rcisoft.bpnsypn.service.Impl;
package org.rcisoft.bus.bpnsypn.service.Impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.rcisoft.bpnsypn.dao.BPnSypnRepository;
import org.rcisoft.bpnsypn.entity.BPnSypn;
import org.rcisoft.bpnsypn.service.BPnSypnService;
import org.rcisoft.bus.bpnsypn.dao.BPnSypnRepository;
import org.rcisoft.bus.bpnsypn.entity.BPnSypn;
import org.rcisoft.bus.bpnsypn.service.BPnSypnService;
import org.rcisoft.core.exception.CyServiceException;
import org.rcisoft.core.model.CyPageInfo;
import org.rcisoft.core.model.CyPersistModel;
......
<?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="org.rcisoft.bus.bcustomer.dao.BCustomerRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.bus.bcustomer.entity.BCustomer">
<id column="business_id" jdbcType="BIGINT" property="businessId"/>
<result column="cust_code" jdbcType="VARCHAR" property="custCode"/>
<result column="cust_name" jdbcType="VARCHAR" property="custName"/>
<result column="flag" jdbcType="NCHAR" property="flag"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="del_flag" jdbcType="NCHAR" property="delFlag"/>
<result column="cust_group" jdbcType="VARCHAR" property="custGroup"/>
<result column="cust_group2" jdbcType="VARCHAR" property="custGroup2"/>
<result column="cust_rt1" jdbcType="VARCHAR" property="custRt1"/>
<result column="cust_io" jdbcType="VARCHAR" property="custIo"/>
<result column="cust_newpic" jdbcType="VARCHAR" property="custNewpic"/>
<result column="cust_group1" jdbcType="VARCHAR" property="custGroup1"/>
<result column="cust_rt2" jdbcType="VARCHAR" property="custRt2"/>
<result column="cust_rout" jdbcType="VARCHAR" property="custRout"/>
<result column="cust_addr" jdbcType="VARCHAR" property="custAddr"/>
<result column="cust_g0" jdbcType="VARCHAR" property="custG0"/>
<result column="cust_g20" jdbcType="VARCHAR" property="custG20"/>
<result column="cust_g30" jdbcType="VARCHAR" property="custG30"/>
<result column="cust_g201" jdbcType="VARCHAR" property="custG201"/>
<result column="cust_save" jdbcType="VARCHAR" property="custSave"/>
<result column="cust_stype" jdbcType="VARCHAR" property="custStype"/>
<result column="cust_g1" jdbcType="VARCHAR" property="custG1"/>
<result column="cust_yj" jdbcType="VARCHAR" property="custYj"/>
<result column="cust_yj2" jdbcType="VARCHAR" property="custYj2"/>
<result column="cust_yj3" jdbcType="VARCHAR" property="custYj3"/>
<result column="cust_gc" jdbcType="VARCHAR" property="custGc"/>
</resultMap>
<select id="queryBCustomers" resultMap="BaseResultMap">
select *from b_customer where 1=1
and del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
</if>
<if test="entity.custCode != null and entity.custCode != ''">
and cust_code like concat('%',#{entity.custCode},'%')
</if>
<if test="entity.custName != null and entity.custName != ''">
and cust_name like concat('%',#{entity.custName },'%')
</if>
<if test="entity.custGroup != null and entity.custGroup != ''">
and cust_group like concat('%',#{entity.custGroup},'%')
</if>
<if test="entity.custGroup2 != null and entity.custGroup2 != ''">
and cust_group2 like concat('%',#{entity.custGroup2 },'%')
</if>
<if test="entity.custRt1 != null and entity.custRt1 != ''">
and cust_rt1 like concat('%',#{entity.custRt1},'%')
</if>
<if test="entity.custIo != null and entity.custIo != ''">
and cust_io = #{entity.custIo}
</if>
<if test="entity.custNewpic != null and entity.custNewpic != ''">
and cust_newpic like concat('%',#{entity.custNewpic},'%')
</if>
<if test="entity.custGroup1 != null and entity.custGroup1 != ''">
and cust_group1 like concat('%',#{entity.custGroup1},'%')
</if>
<if test="entity.custRt2 != null and entity.custRt2 != ''">
and cust_rt2 like concat('%',#{ entity.custRt2 },'%')
</if>
<if test="entity.custRout != null and entity.custRout != ''">
and cust_rout like concat('%',#{entity.custRout},'%')
</if>
<if test="entity.custAddr != null and entity.custAddr != ''">
and cust_addr like concat('%',#{entity.custAddr},'%')
</if>
<if test="entity.custG0 != null and entity.custG0 != ''">
and cust_g0 like concat('%',#{entity.custG0 },'%')
</if>
<if test="entity.custG20 != null and entity.custG20 != ''">
and cust_g20 like concat('%',#{entity.custG20},'%')
</if>
<if test="entity.custG30 != null and entity.custG30 != ''">
and cust_g30 like concat('%', #{entity.custG30},'%')
</if>
<if test="entity.custG201 != null and entity.custG201 != ''">
and cust_g201 like concat('%', #{entity.custG201 },'%')
</if>
<if test="entity.custSave != null and entity.custSave != '' ">
and cust_save like concat('%',#{entity.custSave},'%')
</if>
<if test="entity.custStype != null and entity.custStype != '' ">
and cust_stype like concat('%',#{entity.custStype},'%')
</if>
<if test="entity.custG1 != null and entity.custG1 != ''">
and cust_g1 like concat('%',#{entity.custG1},'%')
</if>
<if test="entity.custYj != null and entity.custYj != ''">
and cust_yj like concat('%',#{entity.custYj},'%')
</if>
<if test="entity.custYj2 != null and entity.custYj2 != ''">
and cust_yj2 like concat('%',#{entity.custYj2},'%')
</if>
<if test="entity.custYj3 !=null and entity.custYj3 !=''">
and cust_yj3 like concat('%',#{entity.custYj3},'%')
</if>
<if test="entity.custGc !=null and entity.custGc != ''">
and cust_gc like concat('%',#{entity.custGc},'%')
</if>
</select>
<select id="queryBCustomersPaged" resultMap="BaseResultMap">
select *from b_customer where 1=1
and del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
</if>
<if test="entity.custCode != null and entity.custCode != ''">
and cust_code like concat('%',#{entity.custCode},'%')
</if>
<if test="entity.custName != null and entity.custName != ''">
and cust_name like concat('%',#{entity.custName },'%')
</if>
<if test="entity.custGroup != null and entity.custGroup != ''">
and cust_group like concat('%',#{entity.custGroup},'%')
</if>
<if test="entity.custGroup2 != null and entity.custGroup2 != ''">
and cust_group2 like concat('%',#{entity.custGroup2 },'%')
</if>
<if test="entity.custRt1 != null and entity.custRt1 != ''">
and cust_rt1 like concat('%',#{entity.custRt1},'%')
</if>
<if test="entity.custIo != null and entity.custIo != ''">
and cust_io = #{entity.custIo}
</if>
<if test="entity.custNewpic != null and entity.custNewpic != ''">
and cust_newpic like concat('%',#{entity.custNewpic},'%')
</if>
<if test="entity.custGroup1 != null and entity.custGroup1 != ''">
and cust_group1 like concat('%',#{entity.custGroup1},'%')
</if>
<if test="entity.custRt2 != null and entity.custRt2 != ''">
and cust_rt2 like concat('%',#{ entity.custRt2 },'%')
</if>
<if test="entity.custRout != null and entity.custRout != ''">
and cust_rout like concat('%',#{entity.custRout},'%')
</if>
<if test="entity.custAddr != null and entity.custAddr != ''">
and cust_addr like concat('%',#{entity.custAddr},'%')
</if>
<if test="entity.custG0 != null and entity.custG0 != ''">
and cust_g0 like concat('%',#{entity.custG0 },'%')
</if>
<if test="entity.custG20 != null and entity.custG20 != ''">
and cust_g20 like concat('%',#{entity.custG20},'%')
</if>
<if test="entity.custG30 != null and entity.custG30 != ''">
and cust_g30 like concat('%', #{entity.custG30},'%')
</if>
<if test="entity.custG201 != null and entity.custG201 != ''">
and cust_g201 like concat('%', #{entity.custG201 },'%')
</if>
<if test="entity.custSave != null and entity.custSave != '' ">
and cust_save like concat('%',#{entity.custSave},'%')
</if>
<if test="entity.custStype != null and entity.custStype != '' ">
and cust_stype like concat('%',#{entity.custStype},'%')
</if>
<if test="entity.custG1 != null and entity.custG1 != ''">
and cust_g1 like concat('%',#{entity.custG1},'%')
</if>
<if test="entity.custYj != null and entity.custYj != ''">
and cust_yj like concat('%',#{entity.custYj},'%')
</if>
<if test="entity.custYj2 != null and entity.custYj2 != ''">
and cust_yj2 like concat('%',#{entity.custYj2},'%')
</if>
<if test="entity.custYj3 !=null and entity.custYj3 !=''">
and cust_yj3 like concat('%',#{entity.custYj3},'%')
</if>
<if test="entity.custGc !=null and entity.custGc != ''">
and cust_gc like concat('%',#{entity.custGc},'%')
</if>
</select>
<select id="queryNumberSomeCode" resultType="java.lang.Integer">
select
count(*)
from
b_customer cust
where
del_flag = '0'
and cust.cust_code = #{custCode}
<if test="businessId != null and businessId != ''">
and cust.business_id != #{businessId}
</if>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment