Browse Source

sql脚本 接口修改

master
wangpengfei 2 years ago
parent
commit
503c11acb2
  1. 72
      docs/databases/supervise_crm.sql
  2. 1
      yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/industrydictionary/IndustryDictionaryDto.java
  3. 1
      yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/industrydictionary/IndustryDictionaryVo.java
  4. 1
      yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/projecttypedictionary/ProjectTypeDictionaryDto.java
  5. 1
      yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/projecttypedictionary/ProjectTypeDictionaryVo.java
  6. 2
      yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/industrydictionary/IndustryDictionaryMapper.xml
  7. 17
      yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/industrydictionary/IndustryDictionaryService.java
  8. 2
      yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/projecttypedictionary/ProjectTypeDictionaryMapper.xml
  9. 17
      yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/projecttypedictionary/ProjectTypeDictionaryService.java

72
docs/databases/supervise_crm.sql

@ -278,3 +278,75 @@ INSERT INTO `supplier_index` VALUES (64, '6151501', '河北君帅商贸有限公
INSERT INTO `supplier_index` VALUES (65, '5154001', '河北荣耀品牌营销策划有限公司', '6103901', NULL, NULL, '4709b6a1-79d4-11ed-ad1d-525401028fe6'); INSERT INTO `supplier_index` VALUES (65, '5154001', '河北荣耀品牌营销策划有限公司', '6103901', NULL, NULL, '4709b6a1-79d4-11ed-ad1d-525401028fe6');
SET FOREIGN_KEY_CHECKS = 1; SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `industry_dictionary`;
CREATE TABLE `industry_dictionary` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`sid` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL,
`industryName` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '行业名称',
`lockVersion` int(0) NOT NULL DEFAULT 0 COMMENT '版本锁',
`isEnable` int(0) NOT NULL DEFAULT 1 COMMENT '记录是否可用,1:可用,0:不可用',
`isDelete` int(0) NOT NULL DEFAULT 0 COMMENT '记录是否被删除,0:未删除,1:已经删除',
`state` int(0) NOT NULL DEFAULT 1 COMMENT '记录状态值',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录最后修改时间',
`createBySid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者',
`updateBysid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_croatian_ci COMMENT = '行业字典表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `project_type_dictionary`;
CREATE TABLE `project_type_dictionary` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`sid` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL,
`projectType` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '项目类型',
`lockVersion` int(0) NOT NULL DEFAULT 0 COMMENT '版本锁',
`isEnable` int(0) NOT NULL DEFAULT 1 COMMENT '记录是否可用,1:可用,0:不可用',
`isDelete` int(0) NOT NULL DEFAULT 0 COMMENT '记录是否被删除,0:未删除,1:已经删除',
`state` int(0) NOT NULL DEFAULT 1 COMMENT '记录状态值',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录最后修改时间',
`createBySid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者',
`updateBysid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_croatian_ci COMMENT = '项目类字典表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `project_information`;
CREATE TABLE `project_information` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用:1可用,0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目说明',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`entryName` varchar(255) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '项目名称',
`engaDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '接洽日期',
`creditLimit` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '授信额度',
`signingDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '签约日期',
`endDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '结束日期',
`regulatoryLeader` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '监管负责人',
`generalManager` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '事业部总经理',
`fillInDate` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '填表日期',
`bankSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '银行sid',
`managerSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '银行负责人sid',
`enterpriseSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '企业sid',
`industrySid` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '行业sid',
`typeSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '项目类型sid',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_croatian_ci COMMENT = '项目信息表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

1
yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/industrydictionary/IndustryDictionaryDto.java

@ -14,4 +14,5 @@ public class IndustryDictionaryDto implements Dto {
private String industryName; private String industryName;
private String id; private String id;
private String sid; private String sid;
private String remarks;
} }

1
yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/industrydictionary/IndustryDictionaryVo.java

@ -14,4 +14,5 @@ public class IndustryDictionaryVo implements Vo {
private String industryName; private String industryName;
private String id; private String id;
private String sid; private String sid;
private String remarks;
} }

1
yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/projecttypedictionary/ProjectTypeDictionaryDto.java

@ -14,4 +14,5 @@ public class ProjectTypeDictionaryDto implements Dto {
private String typeName; private String typeName;
private String id; private String id;
private String sid; private String sid;
private String remarks;
} }

1
yxt_supervise/supervise-crm/supervise-crm-api/src/main/java/com/yxt/supervise/crm/api/projecttypedictionary/ProjectTypeDictionaryVo.java

@ -14,4 +14,5 @@ public class ProjectTypeDictionaryVo implements Vo {
private String typeName; private String typeName;
private String id; private String id;
private String sid; private String sid;
private String remarks;
} }

2
yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/industrydictionary/IndustryDictionaryMapper.xml

@ -7,7 +7,7 @@
SELECT SELECT
* *
FROM FROM
project_type_dictionary industry_dictionary
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>

17
yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/industrydictionary/IndustryDictionaryService.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
@ -26,13 +27,9 @@ public class IndustryDictionaryService extends MybatisBaseService<IndustryDictio
public PagerVo<IndustryDictionaryVo> listPageVo(PagerQuery<IndustryDictionaryQuery> pq) { public PagerVo<IndustryDictionaryVo> listPageVo(PagerQuery<IndustryDictionaryQuery> pq) {
IndustryDictionaryQuery query = pq.getParams(); IndustryDictionaryQuery query = pq.getParams();
QueryWrapper<IndustryDictionary> qw = new QueryWrapper<>(); QueryWrapper<IndustryDictionary> qw = new QueryWrapper<>();
// if(StringUtils.isNotBlank(query.getEnterpriseName())){ if(StringUtils.isNotBlank(query.getIndustryName())){
// qw.like("enterpriseName",query.getEnterpriseName()); qw.like("industryName",query.getIndustryName());
// } }
// if(StringUtils.isNotBlank(query.getTelephone())){
// qw.like("telephone",query.getTelephone());
// }
IPage<IndustryDictionary> page = PagerUtil.queryToPage(pq); IPage<IndustryDictionary> page = PagerUtil.queryToPage(pq);
IPage<IndustryDictionaryVo> pagging = baseMapper.selectPageVo(page, qw); IPage<IndustryDictionaryVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<IndustryDictionaryVo> p = PagerUtil.pageToVo(pagging, null); PagerVo<IndustryDictionaryVo> p = PagerUtil.pageToVo(pagging, null);
@ -47,7 +44,7 @@ public class IndustryDictionaryService extends MybatisBaseService<IndustryDictio
IndustryDictionary entity=new IndustryDictionary(); IndustryDictionary entity=new IndustryDictionary();
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity); baseMapper.insert(entity);
return rb.success().setMsg("保存仓库信息成功"); return rb.success().setMsg("保存项目所属行业成功");
} }
public ResultBean update(IndustryDictionaryDto dto) { public ResultBean update(IndustryDictionaryDto dto) {
ResultBean rb=new ResultBean(); ResultBean rb=new ResultBean();
@ -55,7 +52,7 @@ public class IndustryDictionaryService extends MybatisBaseService<IndustryDictio
IndustryDictionary entity=fetchBySid(dtoSid); IndustryDictionary entity=fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity); baseMapper.updateById(entity);
return rb.success().setMsg("修改仓库信息成功"); return rb.success().setMsg("修改项目所属行业成功");
} }
public IndustryDictionaryVo getIndustryBySid(String sid){ public IndustryDictionaryVo getIndustryBySid(String sid){
IndustryDictionaryVo bank=baseMapper.getIndustryBySid(sid); IndustryDictionaryVo bank=baseMapper.getIndustryBySid(sid);
@ -64,6 +61,6 @@ public class IndustryDictionaryService extends MybatisBaseService<IndustryDictio
public ResultBean delete(String sid) { public ResultBean delete(String sid) {
ResultBean rb=new ResultBean(); ResultBean rb=new ResultBean();
baseMapper.delete(new QueryWrapper<IndustryDictionary>().eq("sid",sid)); baseMapper.delete(new QueryWrapper<IndustryDictionary>().eq("sid",sid));
return rb.success().setMsg("删除仓库信息成功"); return rb.success().setMsg("删除项目所属行业成功");
} }
} }

2
yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/projecttypedictionary/ProjectTypeDictionaryMapper.xml

@ -5,7 +5,7 @@
<!-- ${ew.customSqlSegment} --> <!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo"> <select id="selectPageVo" resultType="com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo">
SELECT SELECT
* *,projectType as typeName
FROM FROM
project_type_dictionary project_type_dictionary
<where> <where>

17
yxt_supervise/supervise-crm/supervise-crm-biz/src/main/java/com/yxt/supervise/crm/biz/projecttypedictionary/ProjectTypeDictionaryService.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
@ -25,13 +26,9 @@ public class ProjectTypeDictionaryService extends MybatisBaseService<ProjectType
public PagerVo<ProjectTypeDictionaryVo> listPageVo(PagerQuery<ProjectTypeDictionaryQuery> pq) { public PagerVo<ProjectTypeDictionaryVo> listPageVo(PagerQuery<ProjectTypeDictionaryQuery> pq) {
ProjectTypeDictionaryQuery query = pq.getParams(); ProjectTypeDictionaryQuery query = pq.getParams();
QueryWrapper<ProjectTypeDictionary> qw = new QueryWrapper<>(); QueryWrapper<ProjectTypeDictionary> qw = new QueryWrapper<>();
// if(StringUtils.isNotBlank(query.getEnterpriseName())){ if(StringUtils.isNotBlank(query.getTypeName())){
// qw.like("enterpriseName",query.getEnterpriseName()); qw.like("projectType",query.getTypeName());
// } }
// if(StringUtils.isNotBlank(query.getTelephone())){
// qw.like("telephone",query.getTelephone());
// }
IPage<ProjectTypeDictionary> page = PagerUtil.queryToPage(pq); IPage<ProjectTypeDictionary> page = PagerUtil.queryToPage(pq);
IPage<ProjectTypeDictionaryVo> pagging = baseMapper.selectPageVo(page, qw); IPage<ProjectTypeDictionaryVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ProjectTypeDictionaryVo> p = PagerUtil.pageToVo(pagging, null); PagerVo<ProjectTypeDictionaryVo> p = PagerUtil.pageToVo(pagging, null);
@ -46,7 +43,7 @@ public class ProjectTypeDictionaryService extends MybatisBaseService<ProjectType
ProjectTypeDictionary entity=new ProjectTypeDictionary(); ProjectTypeDictionary entity=new ProjectTypeDictionary();
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity); baseMapper.insert(entity);
return rb.success().setMsg("保存仓库信息成功"); return rb.success().setMsg("保存项目类型成功");
} }
public ResultBean update(ProjectTypeDictionaryDto dto) { public ResultBean update(ProjectTypeDictionaryDto dto) {
ResultBean rb=new ResultBean(); ResultBean rb=new ResultBean();
@ -54,7 +51,7 @@ public class ProjectTypeDictionaryService extends MybatisBaseService<ProjectType
ProjectTypeDictionary entity=fetchBySid(dtoSid); ProjectTypeDictionary entity=fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity); baseMapper.updateById(entity);
return rb.success().setMsg("修改仓库信息成功"); return rb.success().setMsg("修改项目类型成功");
} }
public ProjectTypeDictionaryVo getProjectTypeBySid(String sid){ public ProjectTypeDictionaryVo getProjectTypeBySid(String sid){
ProjectTypeDictionaryVo bank=baseMapper.getProjectTypeBySid(sid); ProjectTypeDictionaryVo bank=baseMapper.getProjectTypeBySid(sid);
@ -63,6 +60,6 @@ public class ProjectTypeDictionaryService extends MybatisBaseService<ProjectType
public ResultBean delete(String sid) { public ResultBean delete(String sid) {
ResultBean rb=new ResultBean(); ResultBean rb=new ResultBean();
baseMapper.delete(new QueryWrapper<ProjectTypeDictionary>().eq("sid",sid)); baseMapper.delete(new QueryWrapper<ProjectTypeDictionary>().eq("sid",sid));
return rb.success().setMsg("删除仓库信息成功"); return rb.success().setMsg("删除项目类型成功");
} }
} }

Loading…
Cancel
Save