crms项目初始化

master
shijie 4 years ago
parent cecb8b14f7
commit 787959841b
  1. 5
      dq-financial-crms/pom.xml
  2. 83
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CompanyCustomerController.java
  3. 84
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java
  4. 82
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/PersonalCustomerController.java
  5. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/TestFeignController.java
  6. 17
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CompanyCustomerDao.java
  7. 17
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java
  8. 17
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/PersonalCustomerDao.java
  9. 20
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CompanyCustomerService.java
  10. 20
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java
  11. 20
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/PersonalCustomerService.java
  12. 29
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CompanyCustomerServiceImpl.java
  13. 29
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  14. 29
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/PersonalCustomerServiceImpl.java
  15. 22
      dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml
  16. 22
      dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml
  17. 28
      dq-financial-crms/src/main/resources/mapper/crms/PersonalCustomerDao.xml
  18. 68
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java
  19. 68
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CustomerEntity.java
  20. 92
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/PersonalCustomerEntity.java

@ -30,6 +30,11 @@
<artifactId>dq-framework-model</artifactId> <artifactId>dq-framework-model</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-utils</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>

@ -0,0 +1,83 @@
package com.daqing.financial.crms.controller;
import java.util.Arrays;
import java.util.Map;
import com.daqing.framework.model.response.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.financial.crms.service.CompanyCustomerService;
import com.daqing.framework.utils.PageUtils;
/**
* 企业类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@RestController
@RequestMapping("crms/companycustomer")
public class CompanyCustomerController {
@Autowired
private CompanyCustomerService companyCustomerService;
/**
* 列表
*/
@GetMapping("/list")
//@RequiresPermissions("crms:companycustomer:list")
public ResponseResult list(@RequestParam Map<String, Object> params){
PageUtils page = companyCustomerService.queryPage(params);
return ResponseResult.SUCCESS();
}
/**
* 信息
*/
@GetMapping("/info/{id}")
//@RequiresPermissions("crms:companycustomer:info")
public ResponseResult info(@PathVariable("id") Long id){
CompanyCustomerEntity companyCustomer = companyCustomerService.getById(id);
return ResponseResult.SUCCESS();
}
/**
* 保存
*/
@PostMapping("/save")
//@RequiresPermissions("crms:companycustomer:save")
public ResponseResult save(@RequestBody CompanyCustomerEntity companyCustomer){
companyCustomerService.save(companyCustomer);
return ResponseResult.SUCCESS();
}
/**
* 修改
*/
@PutMapping("/update")
//@RequiresPermissions("crms:companycustomer:update")
public ResponseResult update(@RequestBody CompanyCustomerEntity companyCustomer){
companyCustomerService.updateById(companyCustomer);
return ResponseResult.SUCCESS();
}
/**
* 删除
*/
@DeleteMapping("/delete")
//@RequiresPermissions("crms:companycustomer:delete")
public ResponseResult delete(@RequestBody Long[] ids){
companyCustomerService.removeByIds(Arrays.asList(ids));
return ResponseResult.SUCCESS();
}
}

@ -0,0 +1,84 @@
package com.daqing.financial.crms.controller;
import com.daqing.financial.crms.service.CustomerService;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.Map;
/**
* 记录客户基本信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@RestController
@RequestMapping("crms/customer")
public class CustomerController {
@Autowired
private CustomerService customerService;
/**
* 列表
*/
@GetMapping("/list")
//@RequiresPermissions("crms:customer:list")
public ResponseResult list(@RequestParam Map<String, Object> params) {
PageUtils page = customerService.queryPage(params);
return ResponseResult.SUCCESS();
}
/**
* 信息
*/
@GetMapping("/info/{id}")
//@RequiresPermissions("crms:customer:info")
public ResponseResult info(@PathVariable("id") Long id) {
CustomerEntity customer = customerService.getById(id);
return ResponseResult.SUCCESS();
}
/**
* 保存
*/
@PostMapping("/save")
//@RequiresPermissions("crms:customer:save")
public ResponseResult save(@RequestBody CustomerEntity customer) {
customerService.save(customer);
return ResponseResult.SUCCESS();
}
/**
* 修改
*/
@PutMapping("/update")
//@RequiresPermissions("crms:customer:update")
public ResponseResult update(@RequestBody CustomerEntity customer) {
customerService.updateById(customer);
return ResponseResult.SUCCESS();
}
/**
* 删除
*/
@DeleteMapping("/delete")
//@RequiresPermissions("crms:customer:delete")
public ResponseResult delete(@RequestBody Long[] ids) {
customerService.removeByIds(Arrays.asList(ids));
return ResponseResult.SUCCESS();
}
}

@ -0,0 +1,82 @@
package com.daqing.financial.crms.controller;
import com.daqing.financial.crms.service.PersonalCustomerService;
import com.daqing.framework.domain.crms.PersonalCustomerEntity;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.Map;
/**
* 个人类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@RestController
@RequestMapping("crms/personalcustomer")
public class PersonalCustomerController {
@Autowired
private PersonalCustomerService personalCustomerService;
/**
* 列表
*/
@GetMapping("/list")
//@RequiresPermissions("crms:personalcustomer:list")
public ResponseResult list(@RequestParam Map<String, Object> params) {
PageUtils page = personalCustomerService.queryPage(params);
return ResponseResult.SUCCESS();
}
/**
* 信息
*/
@GetMapping("/info/{id}")
//@RequiresPermissions("crms:personalcustomer:info")
public ResponseResult info(@PathVariable("id") Long id) {
PersonalCustomerEntity personalCustomer = personalCustomerService.getById(id);
return ResponseResult.SUCCESS();
}
/**
* 保存
*/
@PostMapping("/save")
//@RequiresPermissions("crms:personalcustomer:save")
public ResponseResult save(@RequestBody PersonalCustomerEntity personalCustomer) {
personalCustomerService.save(personalCustomer);
return ResponseResult.SUCCESS();
}
/**
* 修改
*/
@PutMapping("/update")
//@RequiresPermissions("crms:personalcustomer:update")
public ResponseResult update(@RequestBody PersonalCustomerEntity personalCustomer) {
personalCustomerService.updateById(personalCustomer);
return ResponseResult.SUCCESS();
}
/**
* 删除
*/
@DeleteMapping("/delete")
//@RequiresPermissions("crms:personalcustomer:delete")
public ResponseResult delete(@RequestBody Long[] ids) {
personalCustomerService.removeByIds(Arrays.asList(ids));
return ResponseResult.SUCCESS();
}
}

@ -1,4 +1,4 @@
package com.daqing.financial.crms.contoller; package com.daqing.financial.crms.controller;
import com.daqing.financial.crms.feign.HrmsFeignService; import com.daqing.financial.crms.feign.HrmsFeignService;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;

@ -0,0 +1,17 @@
package com.daqing.financial.crms.dao;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 企业类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@Mapper
public interface CompanyCustomerDao extends BaseMapper<CompanyCustomerEntity> {
}

@ -0,0 +1,17 @@
package com.daqing.financial.crms.dao;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 记录客户基本信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@Mapper
public interface CustomerDao extends BaseMapper<CustomerEntity> {
}

@ -0,0 +1,17 @@
package com.daqing.financial.crms.dao;
import com.daqing.framework.domain.crms.PersonalCustomerEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 个人类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@Mapper
public interface PersonalCustomerDao extends BaseMapper<PersonalCustomerEntity> {
}

@ -0,0 +1,20 @@
package com.daqing.financial.crms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.framework.utils.PageUtils;
import java.util.Map;
/**
* 企业类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
public interface CompanyCustomerService extends IService<CompanyCustomerEntity> {
PageUtils queryPage(Map<String, Object> params);
}

@ -0,0 +1,20 @@
package com.daqing.financial.crms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.domain.crms.CustomerEntity;
import java.util.Map;
/**
* 记录客户基本信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
public interface CustomerService extends IService<CustomerEntity> {
PageUtils queryPage(Map<String, Object> params);
}

@ -0,0 +1,20 @@
package com.daqing.financial.crms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.domain.crms.PersonalCustomerEntity;
import java.util.Map;
/**
* 个人类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
public interface PersonalCustomerService extends IService<PersonalCustomerEntity> {
PageUtils queryPage(Map<String, Object> params);
}

@ -0,0 +1,29 @@
package com.daqing.financial.crms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.crms.dao.CompanyCustomerDao;
import com.daqing.financial.crms.service.CompanyCustomerService;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.Query;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service("companyCustomerService")
public class CompanyCustomerServiceImpl extends ServiceImpl<CompanyCustomerDao, CompanyCustomerEntity> implements CompanyCustomerService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<CompanyCustomerEntity> page = this.page(
new Query<CompanyCustomerEntity>().getPage(params),
new QueryWrapper<CompanyCustomerEntity>()
);
return new PageUtils(page);
}
}

@ -0,0 +1,29 @@
package com.daqing.financial.crms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.crms.dao.CustomerDao;
import com.daqing.financial.crms.service.CustomerService;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.Query;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service("customerService")
public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity> implements CustomerService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<CustomerEntity> page = this.page(
new Query<CustomerEntity>().getPage(params),
new QueryWrapper<CustomerEntity>()
);
return new PageUtils(page);
}
}

@ -0,0 +1,29 @@
package com.daqing.financial.crms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.crms.dao.PersonalCustomerDao;
import com.daqing.financial.crms.service.PersonalCustomerService;
import com.daqing.framework.domain.crms.PersonalCustomerEntity;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.Query;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service("personalCustomerService")
public class PersonalCustomerServiceImpl extends ServiceImpl<PersonalCustomerDao, PersonalCustomerEntity> implements PersonalCustomerService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<PersonalCustomerEntity> page = this.page(
new Query<PersonalCustomerEntity>().getPage(params),
new QueryWrapper<PersonalCustomerEntity>()
);
return new PageUtils(page);
}
}

@ -0,0 +1,22 @@
<?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.daqing.financial.crms.dao.CompanyCustomerDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.daqing.framework.domain.crms.CompanyCustomerEntity" id="companyCustomerMap">
<result property="id" column="id"/>
<result property="registeredCapital" column="registered_capital"/>
<result property="industry" column="industry"/>
<result property="years" column="years"/>
<result property="region" column="region"/>
<result property="shareholder" column="shareholder"/>
<result property="affiliatedCompany" column="affiliated_company"/>
<result property="empNum" column="emp_num"/>
<result property="linkman" column="linkman"/>
<result property="businessSource" column="business_source"/>
<result property="customerId" column="customer_id"/>
</resultMap>
</mapper>

@ -0,0 +1,22 @@
<?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.daqing.financial.crms.dao.CustomerDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.daqing.framework.domain.crms.CustomerEntity" id="customerMap">
<result property="id" column="id"/>
<result property="code" column="code"/>
<result property="type" column="type"/>
<result property="manager" column="manager"/>
<result property="name" column="name"/>
<result property="addr" column="addr"/>
<result property="phone" column="phone"/>
<result property="password" column="password"/>
<result property="wechatId" column="wechat_id"/>
<result property="createTime" column="create_time"/>
<result property="motifyTime" column="motify_time"/>
</resultMap>
</mapper>

@ -0,0 +1,28 @@
<?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.daqing.financial.crms.dao.PersonalCustomerDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.daqing.framework.domain.crms.PersonalCustomerEntity" id="personalCustomerMap">
<result property="id" column="id"/>
<result property="customerId" column="customer_id"/>
<result property="idCard" column="id_card"/>
<result property="age" column="age"/>
<result property="gender" column="gender"/>
<result property="maritalStatus" column="marital_status"/>
<result property="education" column="education"/>
<result property="employer" column="employer"/>
<result property="position" column="position"/>
<result property="workingYears" column="working_years"/>
<result property="socialSecurityNum" column="social_security_num"/>
<result property="livingSituation" column="living_situation"/>
<result property="residenceAddr" column="residence_addr"/>
<result property="businessSource" column="business_source"/>
<result property="emergencyLinkman" column="emergency_linkman"/>
<result property="emergencyLinkmanRelationship" column="emergency_linkman_relationship"/>
<result property="emergencyLinkmanPhone" column="emergency_linkman_phone"/>
</resultMap>
</mapper>

@ -0,0 +1,68 @@
package com.daqing.framework.domain.crms;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 企业类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@Data
@TableName("crms_company_customer")
public class CompanyCustomerEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId
private Long id;
/**
* 注册资金
*/
private String registeredCapital;
/**
* 所属行业
*/
private String industry;
/**
* 成立年限
*/
private Integer years;
/**
* 所在区域
*/
private String region;
/**
* 股东名称
*/
private String shareholder;
/**
* 关联企业
*/
private String affiliatedCompany;
/**
* 员工个数
*/
private String empNum;
/**
* 联系人
*/
private String linkman;
/**
* 业务来源
*/
private String businessSource;
/**
* 客户基本信息表id
*/
private Long customerId;
}

@ -0,0 +1,68 @@
package com.daqing.framework.domain.crms;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 记录客户基本信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@Data
@TableName("crms_customer")
public class CustomerEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId
private Long id;
/**
* 客户编号
*/
private String code;
/**
* 客户类型
*/
private Integer type;
/**
* 客户的经理人id
*/
private Long manager;
/**
* 客户名称
*/
private String name;
/**
* 联系地址
*/
private String addr;
/**
* 联系电话
*/
private String phone;
/**
* 密码
*/
private String password;
/**
* 微信唯一标识
*/
private String wechatId;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date motifyTime;
}

@ -0,0 +1,92 @@
package com.daqing.framework.domain.crms;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 个人类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@Data
@TableName("crms_personal_customer")
public class PersonalCustomerEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId
private Long id;
/**
* 客户基本信息表id
*/
private Long customerId;
/**
* 身份证号
*/
private String idCard;
/**
* 年龄
*/
private Integer age;
/**
* 性别10
*/
private Integer gender;
/**
* 婚姻状况1已婚0未婚
*/
private Integer maritalStatus;
/**
*
*/
private String education;
/**
*
*/
private String employer;
/**
*
*/
private String position;
/**
*
*/
private Integer workingYears;
/**
*
*/
private String socialSecurityNum;
/**
*
*/
private String livingSituation;
/**
*
*/
private String residenceAddr;
/**
*
*/
private String businessSource;
/**
*
*/
private String emergencyLinkman;
/**
*
*/
private String emergencyLinkmanRelationship;
/**
*
*/
private String emergencyLinkmanPhone;
}
Loading…
Cancel
Save