company服务

This commit is contained in:
syruan 2023-12-02 12:31:10 +08:00 committed by syruan
parent 742a02926e
commit 1a2fa87e16
15 changed files with 1118 additions and 0 deletions

View File

@ -112,6 +112,10 @@
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

View File

@ -0,0 +1,55 @@
package com.bonus.sgzb.common.core.domain;
import java.io.Serializable;
import lombok.Data;
/*
Description: 企业开户行信息
@Author 阮世耀
* @Create 2023/12/1 17:58
* @Version 1.0
*/
@Data
public class BmCoBank implements Serializable {
private static final long serialVersionUID = -8453578341238722709L;
private Integer id;
/**
* 企业id
*/
private Integer coId;
/**
* 开户行名称
*/
private String bankName;
/**
* 账户名称
*/
private String accountName;
/**
* 银行账号
*/
private String bankAccount;
/**
* 开户行所在地
*/
private String bankAddress;
/**
* 开户许可证核准号
*/
private String permitNumber;
/**
* 开户许可证
*/
private String permitUrl;
}

View File

@ -0,0 +1,150 @@
package com.bonus.sgzb.common.core.domain;
/*
Description: 企业信息表
@Author 阮世耀
* @Create 2023/12/1 17:45
* @Version 1.0
*/
import lombok.Data;
import java.io.Serializable;
@Data
public class BmCompanyInfo implements Serializable {
private static final long serialVersionUID = -446346351397191451L;
/**
* 企业id
*/
private Integer coId;
/**
* 企业名称
*/
private String coName;
/**
* 企业类型(社会企业南网集团企业南网控股企业)
*/
private String coType;
/**
* 企业所属广东电网广西电网贵州电网云南电网海南电网储能公司深圳供电局超高压公司
* 从字典表获取
*/
private String coLtd;
/**
* 统一社会信用代码
*/
private String creditCode;
/**
* 注册地址
*/
private String registerAddress;
/**
* 经营地址
*/
private String operateAddress;
/**
* 证件类型
*/
private String type;
/**
* 法人证件号码
*/
private String idNumber;
/**
* 营业执照
*/
private String businessLicense;
/**
* 法人姓名
*/
private String legalPerson;
/**
* 邀请码
*/
private String invitationCode;
/**
* 邀请企业名称
*/
private String invitationCoName;
/**
* 经营范围
*/
private String businessScope;
/**
* 被授权人姓名
*/
private String authPersom;
/**
* 被授权人身份证
*/
private String authIdNumber;
/**
* 被授权人手机号
*/
private String authPhone;
/**
* 法人授权书
*/
private String authLetter;
/**
* 被授权人身份证头像面
*/
private String idFaceUrl;
/**
* 被授权人身份证国徽面
*/
private String idNationUrl;
/**
* 创建时间
*/
private String createTime;
/**
* 创建人
*/
private String creator;
/**
* 审核人
*/
private Integer auditor;
/**
* 审核时间
*/
private String auditTime;
/**
* 审核备注
*/
private String auditRemark;
/**
* 状态0待审核1通过2驳回
*/
private String status;
}

View File

@ -13,6 +13,7 @@
<module>sgzb-gen</module>
<module>sgzb-job</module>
<module>sgzb-file</module>
<module>sgzb-company</module>
<module>zlpt-order</module>
</modules>

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.bonus.sgzb</groupId>
<artifactId>sgzb-modules</artifactId>
<version>3.6.3</version>
</parent>
<groupId>com.bonus</groupId>
<artifactId>sgzb-modules-company</artifactId>
<description>
sgzb-modules-company企业模块
</description>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.13</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.bonus.sgzb</groupId>
<artifactId>sgzb-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.bonus.sgzb</groupId>
<artifactId>sgzb-common-security</artifactId>
</dependency>
<dependency>
<groupId>com.bonus.sgzb</groupId>
<artifactId>sgzb-common-log</artifactId>
</dependency>
<dependency>
<groupId>com.bonus.sgzb</groupId>
<artifactId>sgzb-common-swagger</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,26 @@
package com.bonus.sgzb.company;
import com.bonus.sgzb.common.security.annotation.EnableCustomConfig;
import com.bonus.sgzb.common.security.annotation.EnableRyFeignClients;
import com.bonus.sgzb.common.swagger.annotation.EnableCustomSwagger2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* Description: 企业模块启动类
*
* @Author 阮世耀
* @Create 2023/12/2 12:20
* @Version 1.0
*/
@EnableCustomConfig
@EnableCustomSwagger2
@EnableRyFeignClients
@SpringBootApplication
public class ZlptCompanyApplication {
public static void main(String[] args) {
SpringApplication.run(ZlptCompanyApplication.class, args);
System.out.println("company---企业模块启动成功!!");
}
}

View File

@ -0,0 +1,82 @@
package com.bonus.sgzb.company.controller;
import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.common.security.annotation.RequiresPermissions;
import com.bonus.sgzb.company.domain.BmCompanyInfo;
import com.bonus.sgzb.company.mapper.BmCompanyInfoDao;
import com.bonus.sgzb.company.service.BmCompanyInfoService;
import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.system.api.domain.SysDept;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 企业信息表(bm_company_info)表控制层
* @author 阮世耀
*/
@RestController
@RequestMapping("/company")
public class BmCompanyInfoController extends BaseController {
@Resource
private BmCompanyInfoService bmCompanyInfoService;
@Resource
private BmCompanyInfoDao bmCompanyInfoDao;
/**
* 通过主键查询单条数据
* @param id 主键
* @return 单条数据
*/
@GetMapping("selectById")
public BmCompanyInfo selectById(Integer id) { return bmCompanyInfoService.selectByPrimaryKey(id); }
/**
* 获取公司列表
*/
@RequiresPermissions("system:company:list")
@GetMapping("/list")
public AjaxResult list(BmCompanyInfo obj) {
List<BmCompanyInfo> list = bmCompanyInfoDao.selectCompanyList(obj);
return success(list);
}
/**
* 新增 -- 录入企业信息
*/
@RequiresPermissions("system:company:add")
@Log(title = "企业管理", businessType = BusinessType.INSERT)
@PostMapping("addCompanyInfo")
public AjaxResult add(@RequestBody BmCompanyInfo obj) {
return toAjax(bmCompanyInfoService.insertSelective(obj));
}
/**
* 修改 -- 企业信息变更
*/
@RequiresPermissions("system:company:edit")
@Log(title = "企业管理", businessType = BusinessType.UPDATE)
@PostMapping("updateCompanyInfo")
public AjaxResult edit(@RequestBody BmCompanyInfo obj) {
Integer deptId = obj.getCompanyId();
return toAjax(bmCompanyInfoService.updateByPrimaryKeySelective(obj));
}
/**
* 删除 -- 企业注销
*/
@RequiresPermissions("system:company:remove")
@Log(title = "企业管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{deptId}")
public AjaxResult remove(@PathVariable Integer deptId) {
return toAjax(bmCompanyInfoService.deleteByPrimaryKey(deptId));
}
}

View File

@ -0,0 +1,151 @@
package com.bonus.sgzb.company.domain;
import java.io.Serializable;
import lombok.Data;
/**
* Description:
* @Author 阮世耀
* @Create 2023/12/1 19:40
* @Version 1.0
*/
/**
* 企业信息表
*/
@Data
public class BmCompanyInfo implements Serializable {
/**
* 企业id
*/
private Integer companyId;
/**
* 企业名称
*/
private String companyName;
/**
* 企业类型(社会企业南网集团企业南网控股企业)
*/
private String companyType;
/**
* 企业所属广东电网广西电网贵州电网云南电网海南电网储能公司深圳供电局超高压公司
*/
private String companyLtd;
/**
* 统一社会信用代码
*/
private String creditCode;
/**
* 注册地址
*/
private String registerAddress;
/**
* 经营地址
*/
private String operateAddress;
/**
* 证件类型
*/
private String certificatetype;
/**
* 法人证件号码
*/
private String idNumber;
/**
* 营业执照
*/
private String businessLicense;
/**
* 法人姓名
*/
private String legalPerson;
/**
* 邀请码
*/
private String invitationCode;
/**
* 邀请企业名称
*/
private String invitationCoName;
/**
* 经营范围
*/
private String businessScope;
/**
* 被授权人姓名
*/
private String authPerson;
/**
* 被授权人身份证
*/
private String authIdNumber;
/**
* 被授权人手机号
*/
private String authPhone;
/**
* 法人授权书
*/
private String authDocument;
/**
* 被授权人身份证头像面
*/
private String idFaceUrl;
/**
* 被授权人身份证国徽面
*/
private String idNationUrl;
/**
* 创建时间
*/
private String createTime;
/**
* 创建人
*/
private String creator;
/**
* 审核人
*/
private Integer auditor;
/**
* 审核时间
*/
private String auditTime;
/**
* 审核备注
*/
private String auditRemark;
/**
* 状态0待审核1通过2驳回
*/
private String status;
private String updateTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,30 @@
package com.bonus.sgzb.company.mapper;
import com.bonus.sgzb.company.domain.BmCompanyInfo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Description:
* @Author 阮世耀
* @Create 2023/12/1 19:40
* @Version 1.0
*/
@Mapper
public interface BmCompanyInfoDao {
int deleteByPrimaryKey(Integer companyId);
int insert(BmCompanyInfo record);
int insertSelective(BmCompanyInfo record);
BmCompanyInfo selectByPrimaryKey(Integer companyId);
List<BmCompanyInfo> selectCompanyList(BmCompanyInfo record);
int updateByPrimaryKeySelective(BmCompanyInfo record);
int updateByPrimaryKey(BmCompanyInfo record);
}

View File

@ -0,0 +1,25 @@
package com.bonus.sgzb.company.service;
import com.bonus.sgzb.company.domain.BmCompanyInfo;
/**
* Description:
* @Author 阮世耀
* @Create 2023/12/1 19:40
* @Version 1.0
*/
public interface BmCompanyInfoService{
int deleteByPrimaryKey(Integer companyId);
int insert(BmCompanyInfo record);
int insertSelective(BmCompanyInfo record);
BmCompanyInfo selectByPrimaryKey(Integer companyId);
int updateByPrimaryKeySelective(BmCompanyInfo record);
int updateByPrimaryKey(BmCompanyInfo record);
}

View File

@ -0,0 +1,52 @@
package com.bonus.sgzb.company.service.impl;
import com.bonus.sgzb.company.service.BmCompanyInfoService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.bonus.sgzb.company.domain.BmCompanyInfo;
import com.bonus.sgzb.company.mapper.BmCompanyInfoDao;
/**
* Description:
* @Author 阮世耀
* @Create 2023/12/1 19:40
* @Version 1.0
*/
@Service
public class BmCompanyInfoServiceImpl implements BmCompanyInfoService {
@Resource
private BmCompanyInfoDao bmCompanyInfoMapper;
@Override
public int deleteByPrimaryKey(Integer companyId) {
return bmCompanyInfoMapper.deleteByPrimaryKey(companyId);
}
@Override
public int insert(BmCompanyInfo record) {
return bmCompanyInfoMapper.insert(record);
}
@Override
public int insertSelective(BmCompanyInfo record) {
return bmCompanyInfoMapper.insertSelective(record);
}
@Override
public BmCompanyInfo selectByPrimaryKey(Integer companyId) {
return bmCompanyInfoMapper.selectByPrimaryKey(companyId);
}
@Override
public int updateByPrimaryKeySelective(BmCompanyInfo record) {
return bmCompanyInfoMapper.updateByPrimaryKeySelective(record);
}
@Override
public int updateByPrimaryKey(BmCompanyInfo record) {
return bmCompanyInfoMapper.updateByPrimaryKey(record);
}
}

View File

@ -0,0 +1,10 @@
Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name}
_ _
(_) | |
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
__/ | __/ |
|___/ |___/

View File

@ -0,0 +1,27 @@
# Tomcat
server:
port: 9201
# Spring
spring:
application:
# 应用名称
name: zlpt-company
profiles:
# 环境配置
active: zlpt_cloud_dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.14:8848
namespace: zlpt_cloud_dev
config:
# 配置中心地址
server-addr: 192.168.0.14:8848
namespace: zlpt_cloud_dev
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/sgzb-system" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.bonus.sgzb" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info" />
<appender-ref ref="file_error" />
</root>
</configuration>

View File

@ -0,0 +1,374 @@
<?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="com.bonus.sgzb.company.mapper.BmCompanyInfoDao">
<resultMap id="BaseResultMap" type="com.bonus.sgzb.company.domain.BmCompanyInfo">
<!--@mbg.generated-->
<!--@Table ma_zlpt.bm_company_info-->
<id column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="company_type" jdbcType="VARCHAR" property="companyType" />
<result column="company_ltd" jdbcType="VARCHAR" property="companyLtd" />
<result column="credit_code" jdbcType="VARCHAR" property="creditCode" />
<result column="register_address" jdbcType="VARCHAR" property="registerAddress" />
<result column="operate_address" jdbcType="VARCHAR" property="operateAddress" />
<result column="certificateType" jdbcType="VARCHAR" property="certificatetype" />
<result column="id_number" jdbcType="VARCHAR" property="idNumber" />
<result column="business_license" jdbcType="VARCHAR" property="businessLicense" />
<result column="legal_person" jdbcType="VARCHAR" property="legalPerson" />
<result column="invitation_code" jdbcType="VARCHAR" property="invitationCode" />
<result column="invitation_co_name" jdbcType="VARCHAR" property="invitationCoName" />
<result column="business_scope" jdbcType="VARCHAR" property="businessScope" />
<result column="auth_person" jdbcType="VARCHAR" property="authPerson" />
<result column="auth_id_number" jdbcType="VARCHAR" property="authIdNumber" />
<result column="auth_phone" jdbcType="VARCHAR" property="authPhone" />
<result column="auth_document" jdbcType="VARCHAR" property="authDocument" />
<result column="id_face_url" jdbcType="VARCHAR" property="idFaceUrl" />
<result column="id_nation_url" jdbcType="VARCHAR" property="idNationUrl" />
<result column="create_time" jdbcType="VARCHAR" property="createTime" />
<result column="creator" jdbcType="VARCHAR" property="creator" />
<result column="auditor" jdbcType="INTEGER" property="auditor" />
<result column="audit_time" jdbcType="VARCHAR" property="auditTime" />
<result column="audit_remark" jdbcType="VARCHAR" property="auditRemark" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="update_time" jdbcType="VARCHAR" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
company_id, company_name, company_type, company_ltd, credit_code, register_address,
operate_address, certificateType, id_number, business_license, legal_person, invitation_code,
invitation_co_name, business_scope, auth_person, auth_id_number, auth_phone, auth_document,
id_face_url, id_nation_url, create_time, creator, auditor, audit_time, audit_remark,
`status`, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from bm_company_info
where company_id = #{companyId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
update bm_company_info set status = '2'
where company_id = #{companyId,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="company_id" keyProperty="companyId" parameterType="com.bonus.sgzb.company.domain.BmCompanyInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ma_zlpt.bm_company_info (company_name, company_type, company_ltd,
credit_code, register_address, operate_address,
certificateType, id_number, business_license,
legal_person, invitation_code, invitation_co_name,
business_scope, auth_person, auth_id_number,
auth_phone, auth_document, id_face_url,
id_nation_url, create_time, creator,
auditor, audit_time, audit_remark,
`status`, update_time)
values (#{companyName,jdbcType=VARCHAR}, #{companyType,jdbcType=VARCHAR}, #{companyLtd,jdbcType=VARCHAR},
#{creditCode,jdbcType=VARCHAR}, #{registerAddress,jdbcType=VARCHAR}, #{operateAddress,jdbcType=VARCHAR},
#{certificatetype,jdbcType=VARCHAR}, #{idNumber,jdbcType=VARCHAR}, #{businessLicense,jdbcType=VARCHAR},
#{legalPerson,jdbcType=VARCHAR}, #{invitationCode,jdbcType=VARCHAR}, #{invitationCoName,jdbcType=VARCHAR},
#{businessScope,jdbcType=VARCHAR}, #{authPerson,jdbcType=VARCHAR}, #{authIdNumber,jdbcType=VARCHAR},
#{authPhone,jdbcType=VARCHAR}, #{authDocument,jdbcType=VARCHAR}, #{idFaceUrl,jdbcType=VARCHAR},
#{idNationUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{auditor,jdbcType=INTEGER}, #{auditTime,jdbcType=VARCHAR}, #{auditRemark,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="company_id" keyProperty="companyId" parameterType="com.bonus.sgzb.company.domain.BmCompanyInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ma_zlpt.bm_company_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="companyName != null and companyName != ''">
company_name,
</if>
<if test="companyType != null and companyType != ''">
company_type,
</if>
<if test="companyLtd != null and companyLtd != ''">
company_ltd,
</if>
<if test="creditCode != null and creditCode != ''">
credit_code,
</if>
<if test="registerAddress != null and registerAddress != ''">
register_address,
</if>
<if test="operateAddress != null and operateAddress != ''">
operate_address,
</if>
<if test="certificatetype != null and certificatetype != ''">
certificateType,
</if>
<if test="idNumber != null and idNumber != ''">
id_number,
</if>
<if test="businessLicense != null and businessLicense != ''">
business_license,
</if>
<if test="legalPerson != null and legalPerson != ''">
legal_person,
</if>
<if test="invitationCode != null and invitationCode != ''">
invitation_code,
</if>
<if test="invitationCoName != null and invitationCoName != ''">
invitation_co_name,
</if>
<if test="businessScope != null and businessScope != ''">
business_scope,
</if>
<if test="authPerson != null and authPerson != ''">
auth_person,
</if>
<if test="authIdNumber != null and authIdNumber != ''">
auth_id_number,
</if>
<if test="authPhone != null and authPhone != ''">
auth_phone,
</if>
<if test="authDocument != null and authDocument != ''">
auth_document,
</if>
<if test="idFaceUrl != null and idFaceUrl != ''">
id_face_url,
</if>
<if test="idNationUrl != null and idNationUrl != ''">
id_nation_url,
</if>
<if test="createTime != null and createTime != ''">
create_time,
</if>
<if test="creator != null and creator != ''">
creator,
</if>
<if test="auditor != null">
auditor,
</if>
<if test="auditTime != null and auditTime != ''">
audit_time,
</if>
<if test="auditRemark != null and auditRemark != ''">
audit_remark,
</if>
<if test="status != null and status != ''">
`status`,
</if>
<if test="updateTime != null and updateTime != ''">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="companyName != null and companyName != ''">
#{companyName,jdbcType=VARCHAR},
</if>
<if test="companyType != null and companyType != ''">
#{companyType,jdbcType=VARCHAR},
</if>
<if test="companyLtd != null and companyLtd != ''">
#{companyLtd,jdbcType=VARCHAR},
</if>
<if test="creditCode != null and creditCode != ''">
#{creditCode,jdbcType=VARCHAR},
</if>
<if test="registerAddress != null and registerAddress != ''">
#{registerAddress,jdbcType=VARCHAR},
</if>
<if test="operateAddress != null and operateAddress != ''">
#{operateAddress,jdbcType=VARCHAR},
</if>
<if test="certificatetype != null and certificatetype != ''">
#{certificatetype,jdbcType=VARCHAR},
</if>
<if test="idNumber != null and idNumber != ''">
#{idNumber,jdbcType=VARCHAR},
</if>
<if test="businessLicense != null and businessLicense != ''">
#{businessLicense,jdbcType=VARCHAR},
</if>
<if test="legalPerson != null and legalPerson != ''">
#{legalPerson,jdbcType=VARCHAR},
</if>
<if test="invitationCode != null and invitationCode != ''">
#{invitationCode,jdbcType=VARCHAR},
</if>
<if test="invitationCoName != null and invitationCoName != ''">
#{invitationCoName,jdbcType=VARCHAR},
</if>
<if test="businessScope != null and businessScope != ''">
#{businessScope,jdbcType=VARCHAR},
</if>
<if test="authPerson != null and authPerson != ''">
#{authPerson,jdbcType=VARCHAR},
</if>
<if test="authIdNumber != null and authIdNumber != ''">
#{authIdNumber,jdbcType=VARCHAR},
</if>
<if test="authPhone != null and authPhone != ''">
#{authPhone,jdbcType=VARCHAR},
</if>
<if test="authDocument != null and authDocument != ''">
#{authDocument,jdbcType=VARCHAR},
</if>
<if test="idFaceUrl != null and idFaceUrl != ''">
#{idFaceUrl,jdbcType=VARCHAR},
</if>
<if test="idNationUrl != null and idNationUrl != ''">
#{idNationUrl,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
#{createTime,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
#{creator,jdbcType=VARCHAR},
</if>
<if test="auditor != null">
#{auditor,jdbcType=INTEGER},
</if>
<if test="auditTime != null and auditTime != ''">
#{auditTime,jdbcType=VARCHAR},
</if>
<if test="auditRemark != null and auditRemark != ''">
#{auditRemark,jdbcType=VARCHAR},
</if>
<if test="status != null and status != ''">
#{status,jdbcType=VARCHAR},
</if>
<if test="updateTime != null and updateTime != ''">
#{updateTime,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.sgzb.company.domain.BmCompanyInfo">
<!--@mbg.generated-->
update ma_zlpt.bm_company_info
<set>
<if test="companyName != null and companyName != ''">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="companyType != null and companyType != ''">
company_type = #{companyType,jdbcType=VARCHAR},
</if>
<if test="companyLtd != null and companyLtd != ''">
company_ltd = #{companyLtd,jdbcType=VARCHAR},
</if>
<if test="creditCode != null and creditCode != ''">
credit_code = #{creditCode,jdbcType=VARCHAR},
</if>
<if test="registerAddress != null and registerAddress != ''">
register_address = #{registerAddress,jdbcType=VARCHAR},
</if>
<if test="operateAddress != null and operateAddress != ''">
operate_address = #{operateAddress,jdbcType=VARCHAR},
</if>
<if test="certificatetype != null and certificatetype != ''">
certificateType = #{certificatetype,jdbcType=VARCHAR},
</if>
<if test="idNumber != null and idNumber != ''">
id_number = #{idNumber,jdbcType=VARCHAR},
</if>
<if test="businessLicense != null and businessLicense != ''">
business_license = #{businessLicense,jdbcType=VARCHAR},
</if>
<if test="legalPerson != null and legalPerson != ''">
legal_person = #{legalPerson,jdbcType=VARCHAR},
</if>
<if test="invitationCode != null and invitationCode != ''">
invitation_code = #{invitationCode,jdbcType=VARCHAR},
</if>
<if test="invitationCoName != null and invitationCoName != ''">
invitation_co_name = #{invitationCoName,jdbcType=VARCHAR},
</if>
<if test="businessScope != null and businessScope != ''">
business_scope = #{businessScope,jdbcType=VARCHAR},
</if>
<if test="authPerson != null and authPerson != ''">
auth_person = #{authPerson,jdbcType=VARCHAR},
</if>
<if test="authIdNumber != null and authIdNumber != ''">
auth_id_number = #{authIdNumber,jdbcType=VARCHAR},
</if>
<if test="authPhone != null and authPhone != ''">
auth_phone = #{authPhone,jdbcType=VARCHAR},
</if>
<if test="authDocument != null and authDocument != ''">
auth_document = #{authDocument,jdbcType=VARCHAR},
</if>
<if test="idFaceUrl != null and idFaceUrl != ''">
id_face_url = #{idFaceUrl,jdbcType=VARCHAR},
</if>
<if test="idNationUrl != null and idNationUrl != ''">
id_nation_url = #{idNationUrl,jdbcType=VARCHAR},
</if>
<if test="createTime != null and createTime != ''">
create_time = #{createTime,jdbcType=VARCHAR},
</if>
<if test="creator != null and creator != ''">
creator = #{creator,jdbcType=VARCHAR},
</if>
<if test="auditor != null">
auditor = #{auditor,jdbcType=INTEGER},
</if>
<if test="auditTime != null and auditTime != ''">
audit_time = #{auditTime,jdbcType=VARCHAR},
</if>
<if test="auditRemark != null and auditRemark != ''">
audit_remark = #{auditRemark,jdbcType=VARCHAR},
</if>
<if test="status != null and status != ''">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="updateTime != null and updateTime != ''">
update_time = #{updateTime,jdbcType=VARCHAR},
</if>
</set>
where company_id = #{companyId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.bonus.sgzb.company.domain.BmCompanyInfo">
<!--@mbg.generated-->
update ma_zlpt.bm_company_info
set company_name = #{companyName,jdbcType=VARCHAR},
company_type = #{companyType,jdbcType=VARCHAR},
company_ltd = #{companyLtd,jdbcType=VARCHAR},
credit_code = #{creditCode,jdbcType=VARCHAR},
register_address = #{registerAddress,jdbcType=VARCHAR},
operate_address = #{operateAddress,jdbcType=VARCHAR},
certificateType = #{certificatetype,jdbcType=VARCHAR},
id_number = #{idNumber,jdbcType=VARCHAR},
business_license = #{businessLicense,jdbcType=VARCHAR},
legal_person = #{legalPerson,jdbcType=VARCHAR},
invitation_code = #{invitationCode,jdbcType=VARCHAR},
invitation_co_name = #{invitationCoName,jdbcType=VARCHAR},
business_scope = #{businessScope,jdbcType=VARCHAR},
auth_person = #{authPerson,jdbcType=VARCHAR},
auth_id_number = #{authIdNumber,jdbcType=VARCHAR},
auth_phone = #{authPhone,jdbcType=VARCHAR},
auth_document = #{authDocument,jdbcType=VARCHAR},
id_face_url = #{idFaceUrl,jdbcType=VARCHAR},
id_nation_url = #{idNationUrl,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=VARCHAR},
creator = #{creator,jdbcType=VARCHAR},
auditor = #{auditor,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=VARCHAR},
audit_remark = #{auditRemark,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=VARCHAR}
where company_id = #{companyId,jdbcType=INTEGER}
</update>
<select id="selectCompanyList" resultMap="BaseResultMap">
select * from bm_company_info
<where>
status = '1'
<if test="companyName!= null and companyName!= ''">
and company_name like concat('%', #{companyName}, '%')
</if>
<if test="companyType!= null and companyType!= ''">
and company_type like concat('%', #{companyType}, '%')
</if>
</where>
</select>
</mapper>