diff --git a/crm/src/main/java/com/kakarote/crm/controller/CrmOpenApiController.java b/crm/src/main/java/com/kakarote/crm/controller/CrmOpenApiController.java new file mode 100644 index 0000000..084c65a --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/controller/CrmOpenApiController.java @@ -0,0 +1,23 @@ +package com.kakarote.crm.controller; + +import com.kakarote.core.common.ParamAspect; +import com.kakarote.core.common.R; +import com.kakarote.core.common.Result; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/openApi") +@Api(tags = "crm对外接口") +public class CrmOpenApiController { + + @PostMapping("/crm/addCorporateSeas") + @ApiOperation("接口新增公海数据") + @ParamAspect + public Result addCorporateSeas(){ + return R.ok(); + } +} diff --git a/crm/src/main/java/com/kakarote/crm/controller/CrmQyjbxxController.java b/crm/src/main/java/com/kakarote/crm/controller/CrmQyjbxxController.java new file mode 100644 index 0000000..8255edb --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/controller/CrmQyjbxxController.java @@ -0,0 +1,55 @@ +package com.kakarote.crm.controller; + +import com.kakarote.core.common.ParamAspect; +import com.kakarote.core.common.R; +import com.kakarote.core.common.Result; +import com.kakarote.core.common.SubModelType; +import com.kakarote.core.common.log.SysLog; +import com.kakarote.crm.common.CrmModel; +import com.kakarote.crm.common.log.CrmProductLog; +import com.kakarote.crm.entity.BO.QyjbxxBo; +import com.kakarote.crm.entity.PO.CrmQyjbxx; +import com.kakarote.crm.service.ICrmQyjbxxService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@RestController +@RequestMapping("/qyjbxx") +@Api(tags = "企业基本信息") +public class CrmQyjbxxController { + @Autowired + private ICrmQyjbxxService crmQyjbxxService; + + + @PostMapping("/queryById/{qyId}") + @ApiOperation("根据ID查询") + @ParamAspect + public Result queryById(@PathVariable("qyId") @ApiParam(name = "id", value = "id") Integer qyId) { + CrmQyjbxx qyjbxx = crmQyjbxxService.getQyjbxx(qyId); + return R.ok(qyjbxx); + } + + @PostMapping("/add") + @ApiOperation("保存数据") + public Result add(@RequestBody CrmQyjbxx crmQyjbxx) { + return R.ok(crmQyjbxxService.insertQyjbxx(crmQyjbxx)); + } + + @PostMapping("/queryByNsrxx") + @ApiOperation("根据纳税人识别号查询企业基本信息") + public Result queryByNsrsbh(@RequestBody QyjbxxBo qyjbxxBo) { + CrmQyjbxx qyjbxxByNsrsbh = crmQyjbxxService.getQyjbxxByNsxx(qyjbxxBo); + return R.ok(qyjbxxByNsrsbh); + } + +// @PostMapping("/queryByNsrmc/{nsrmc}") +// @ApiOperation("根据纳税人名称查询企业基本信息") +// public Result queryByNsrmc(@PathVariable("nsrmc") @ApiParam(name = "nsrmc", value = "nsrmc") String nsrmc){ +// CrmQyjbxx qyjbxxByNsrsbh = crmQyjbxxService.getQyjbxxByNsrmc(nsrmc); +// return R.ok(qyjbxxByNsrsbh); +// } + +} diff --git a/crm/src/main/java/com/kakarote/crm/entity/BO/QyjbxxBo.java b/crm/src/main/java/com/kakarote/crm/entity/BO/QyjbxxBo.java new file mode 100644 index 0000000..365cb16 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/entity/BO/QyjbxxBo.java @@ -0,0 +1,17 @@ +package com.kakarote.crm.entity.BO; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +@Data +@ApiModel("企业信息") +public class QyjbxxBo { + /** + * 纳税人识别号 + */ + private String nsrsbh; + /** + * 纳税人名称 + */ + private String nsrmc; +} diff --git a/crm/src/main/java/com/kakarote/crm/entity/PO/CrmQyjbxx.java b/crm/src/main/java/com/kakarote/crm/entity/PO/CrmQyjbxx.java new file mode 100644 index 0000000..68a94fb --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/entity/PO/CrmQyjbxx.java @@ -0,0 +1,434 @@ +package com.kakarote.crm.entity.PO; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + * @description wk_crm_qyjbxx + * @author https://www.json.cn/ + * @date 2025-06-05 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("wk_crm_qyjbxx") +@ApiModel(value="CrmQyjbxx对象", description="企业基本信息") +public class CrmQyjbxx implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "qy_id", type = IdType.AUTO) + /** + * 企业Id primary key + */ + private Integer qyId; + + /** + * 企业登记序号 + */ + private String djxh; + + /** + * 纳税人识别号 + */ + private String nsrsbh; + + /** + * 纳税人名称 + */ + private String nsrmc; + + /** + * 课征主体登记类型代码 + */ + private String kzztdjlxDm; + + /** + * 登记注册类型代码 + */ + private String djzclxDm; + + /** + * 生产经营地址 + */ + private String scjydz; + + /** + * 生产经营地址行政区划数字代码 + */ + private String scjydzxzqhszDm; + + /** + * 纳税人状态代码 + */ + private String nsrztDm; + + /** + * 行业代码 + */ + private String hyDm; + + /** + * 注册地址 + */ + private String zcdz; + + /** + * 注册地址行政区划数字代码 + */ + private String zcdzxzqhszDm; + + /** + * 街道乡镇代码 + */ + private String jdxzDm; + + /** + * 单位隶属关系代码 + */ + private String dwlsgxDm; + + /** + * 登记日期 + */ + private String djrq; + + /** + * 跨区财产税主体登记标志 + */ + private String kqccsztdjbz; + + /** + * 主管税务局代码 + */ + private String zgswjDm; + + /** + * 主管税务所(科、分局)代码 + */ + private String zgswskfjDm; + + /** + * 税收管理员代码 + */ + private String ssglyDm; + + /** + * 非居民企业标志 + */ + private String fjmqybz; + + /** + * 有效标志 + */ + private String yxbz; + + /** + * 工商注销日期 + */ + private String gszxrq; + + /** + * 企业划型类别 + */ + private String qyhxlbDm; + + /** + * 企业划型来源 + */ + private String qyhxly; + + /** + * 经营范围 + */ + private String jyfw; + + /** + * 注册地联系电话 + */ + private String zcdlxdh; + + /** + * 注册地邮政编码 + */ + private String zcdyzbm; + + /** + * 生产经营地联系电话 + */ + private String scjydlxdh; + + /** + * 生产经营地邮政编码生产经营地邮政编码 + */ + private String scjydyzbm; + + /** + * 核算方式代码 + */ + private String hsfsDm; + + /** + * 从业人数 + */ + private String cyrs; + + /** + * 外籍从业人数 + */ + private String wjcyrs; + + /** + * 合伙人数 + */ + private String hhrs; + + /** + * 雇工人数 + */ + private String ggrs; + + /** + * 固定工人数 + */ + private String gdgrs; + + /** + * 组织机构类型代码 + */ + private String zzjglxDm; + + /** + * 会计制度(准则)代码 + */ + private String kjzdzzDm; + + /** + * 税务代理人联系电话 + */ + private String swdlrlxdh; + + /** + * 税务代理人电子信箱 + */ + private String swdlrdzxx; + + /** + * 注册资本 + */ + private String zczb; + + /** + * 投资总额 + */ + private String tzze; + + /** + * 自然人投资比例 + */ + private String zrrtzbl; + + /** + * 外资投资比例 + */ + private String wztzbl; + + /** + * 国有投资比例 + */ + private String gytzbl; + + /** + * 国有控股类型代码 + */ + private String gykglxDm; + + /** + * 总分机构类型代码 + */ + private String zfjglxDm; + + /** + * 法定代表人姓名 + */ + private String fddbrxm; + + /** + * 法定代表人身份证件类型代码 + */ + private String fddbrsfzjlxDm; + + /** + * 法定代表人身份证号码 + */ + private String fddbrsfzjhm; + + /** + * 法定代表人固定电话 + */ + private String fddbrgddh; + + /** + * 法定代表人移动电话 + */ + private String fddbryddh; + + /** + * 法定代表人电子信箱 + */ + private String fddbrdzxx; + + /** + * 财务负责人姓名 + */ + private String cwfzrxm; + + /** + * 财务负责人身份证件种类代码 + */ + private String cwfzrsfzjzlDm; + + /** + * 财务负责人身份证件号码 + */ + private String cwfzrsfzjhm; + + /** + * 财务负责人固定电话 + */ + private String cwfzrgddh; + + /** + * 财务负责人移动电话 + */ + private String cwfzryddh; + + /** + * 财务负责人电子信箱 + */ + private String cwfzrdzxx; + + /** + * 办税人姓名 + */ + private String bsrxm; + + /** + * 办税人身份证件种类代码 + */ + private String bsrsfzjzlDm; + + /** + * 办税人身份证件号码 + */ + private String bsrsfzjhm; + + /** + * 办税人固定电话 + */ + private String bsrgddh; + + /** + * 办税人移动电话 + */ + private String bsryddh; + + /** + * 办税人电子信箱 + */ + private String bsrdzxx; + + /** + * 临时税务登记有效期起 + */ + private String lsswdjyxqq; + + /** + * 临时税务登记有效期止 + */ + private String lsswdjyxqz; + + /** + * 税务代理人纳税人识别号 + */ + private String swdlrnsrsbh; + + /** + * 税务代理人名称 + */ + private String swdlrmc; + + /** + * 文化事业建设费缴费信息登记标志 + */ + private String whsyjsfjfxxdjbz; + + /** + * 增值税经营类别 + */ + private String zzsjylb; + + /** + * 印花税缴纳方式代码 + */ + private String yhsjnfsDm; + + /** + * 征收项目城乡标志代码 + */ + private String zsxmcxbzDm; + + /** + * 增值税企业类型代码 + */ + private String zzsqylxDm; + + /** + * 国家或地区数字代码 + */ + private String gjhdqszDm; + + /** + * 企业管理层级编号 + */ + private String qyglcjbh; + + /** + * 企业所属集团代码 + */ + private String qyssjtDm; + + /** + * 受托方社会信用代码 + */ + private String stfshxydm; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建人 + */ + private String createBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 更新人 + */ + private String updateBy; + +} \ No newline at end of file diff --git a/crm/src/main/java/com/kakarote/crm/mapper/CrmQyjbxxMapper.java b/crm/src/main/java/com/kakarote/crm/mapper/CrmQyjbxxMapper.java new file mode 100644 index 0000000..96c07d7 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/mapper/CrmQyjbxxMapper.java @@ -0,0 +1,12 @@ +package com.kakarote.crm.mapper; + +import com.kakarote.core.servlet.BaseMapper; +import com.kakarote.crm.entity.PO.CrmQyjbxx; +import feign.Param; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +@Mapper +public interface CrmQyjbxxMapper extends BaseMapper { + List selectByExample(CrmQyjbxx example); +} \ No newline at end of file diff --git a/crm/src/main/java/com/kakarote/crm/mapper/xml/CrmQyjbxxMapper.xml b/crm/src/main/java/com/kakarote/crm/mapper/xml/CrmQyjbxxMapper.xml new file mode 100644 index 0000000..d7165b0 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/mapper/xml/CrmQyjbxxMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/crm/src/main/java/com/kakarote/crm/service/ICrmCustomerService.java b/crm/src/main/java/com/kakarote/crm/service/ICrmCustomerService.java index 76bd41d..d1b357e 100644 --- a/crm/src/main/java/com/kakarote/crm/service/ICrmCustomerService.java +++ b/crm/src/main/java/com/kakarote/crm/service/ICrmCustomerService.java @@ -65,6 +65,7 @@ public interface ICrmCustomerService extends BaseService { */ public Map addOrUpdate(CrmModelSaveBO crmModel,boolean isExcel,Integer poolId); + CrmCustomer addOrUpdateByOpenApi(CrmModelSaveBO crmModel); /** * 删除客户数据 * diff --git a/crm/src/main/java/com/kakarote/crm/service/ICrmOpenApiService.java b/crm/src/main/java/com/kakarote/crm/service/ICrmOpenApiService.java new file mode 100644 index 0000000..f95b2d9 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/service/ICrmOpenApiService.java @@ -0,0 +1,4 @@ +package com.kakarote.crm.service; + +public interface ICrmOpenApiService { +} diff --git a/crm/src/main/java/com/kakarote/crm/service/ICrmQyjbxxService.java b/crm/src/main/java/com/kakarote/crm/service/ICrmQyjbxxService.java new file mode 100644 index 0000000..25eba97 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/service/ICrmQyjbxxService.java @@ -0,0 +1,55 @@ +package com.kakarote.crm.service; + + +import com.kakarote.core.servlet.BaseService; +import com.kakarote.crm.entity.BO.QyjbxxBo; +import com.kakarote.crm.entity.PO.CrmQyjbxx; + +import java.util.List; + +public interface ICrmQyjbxxService extends BaseService { + /** + * 通过企业Id查询企业基本信息 + */ + CrmQyjbxx getQyjbxx(Integer qyId); + + /** + * 通过纳税人识别号获取企业基本信息 + * @param qyjbxxBo + * @return + */ + CrmQyjbxx getQyjbxxByNsxx(QyjbxxBo qyjbxxBo); + + /** + * 通过纳税人名称获取企业基本信息 + * @param nsrmc + * @return + */ + CrmQyjbxx getQyjbxxByNsrmc(String nsrmc); + + /** + * 插入企业基本信息 + */ + int insertQyjbxx(CrmQyjbxx crmQyjbxx); + + /** + * 更新企业基本信息 + * @param crmQyjbxx + * @return + */ + int updateQyjbxx(CrmQyjbxx crmQyjbxx); + + /** + * 删除企业基本信息 + * @param qyId + * @return + */ + int deleteQyjbxx(String qyId); + + /** + * 查询企业基本信息列表 + * @param crmQyjbxx + * @return + */ + List getQyjbxxList(CrmQyjbxx crmQyjbxx); +} diff --git a/crm/src/main/java/com/kakarote/crm/service/impl/CrmCustomerServiceImpl.java b/crm/src/main/java/com/kakarote/crm/service/impl/CrmCustomerServiceImpl.java index 76df853..46895ab 100644 --- a/crm/src/main/java/com/kakarote/crm/service/impl/CrmCustomerServiceImpl.java +++ b/crm/src/main/java/com/kakarote/crm/service/impl/CrmCustomerServiceImpl.java @@ -439,6 +439,76 @@ public class CrmCustomerServiceImpl extends BaseServiceImpl 0) { + throw new CrmException(SystemCodeEnum.SYSTEM_NO_AUTH); + } + } + String batchId = StrUtil.isNotEmpty(crmCustomer.getBatchId()) ? crmCustomer.getBatchId() : IdUtil.simpleUUID(); + actionRecordUtil.updateRecord(crmModel.getField(), Dict.create().set("batchId", batchId).set("dataTableName", "wk_crm_customer_data")); + crmCustomerDataService.saveData(crmModel.getField(), batchId); + if (StrUtil.isEmpty(crmCustomer.getEmail())) { + crmCustomer.setEmail(null); + } + if (crmCustomer.getCustomerId() != null) { + crmBackLogDealService.deleteByType(crmCustomer.getOwnerUserId(), getLabel(), CrmBackLogEnum.TODAY_CUSTOMER, crmCustomer.getCustomerId()); + crmBackLogDealService.deleteByType(crmCustomer.getOwnerUserId(), getLabel(), CrmBackLogEnum.FOLLOW_CUSTOMER, crmCustomer.getCustomerId()); + crmCustomer.setUpdateTime(DateUtil.date()); + actionRecordUtil.updateRecord(BeanUtil.beanToMap(getById(crmCustomer.getCustomerId())), BeanUtil.beanToMap(crmCustomer), CrmEnum.CUSTOMER, crmCustomer.getCustomerName(), crmCustomer.getCustomerId()); + updateById(crmCustomer); + crmCustomer = getById(crmCustomer.getCustomerId()); + ElasticUtil.batchUpdateEsData(elasticsearchRestTemplate.getClient(), "customer", crmCustomer.getCustomerId().toString(), crmCustomer.getCustomerName()); + } else { + crmCustomer.setCreateTime(DateUtil.date()); + crmCustomer.setUpdateTime(DateUtil.date()); + crmCustomer.setReceiveTime(DateUtil.date()); + crmCustomer.setCreateUserId(UserUtil.getUserId()); + crmCustomer.setOwnerUserId(UserUtil.getUserId()); +// if (!isExcel && crmCustomer.getOwnerUserId() == null) { +// //导入会手动选择负责人,需要判断 +// +// } + crmCustomer.setBatchId(batchId); + crmCustomer.setLastTime(new Date()); + crmCustomer.setStatus(1); + crmCustomer.setDealStatus(0); + if (crmCustomer.getOwnerUserId() != null) { + if (!crmCustomerSettingService.queryCustomerSettingNum(1, crmCustomer.getOwnerUserId())) { + throw new CrmException(CrmCodeEnum.CRM_CUSTOMER_SETTING_USER_ERROR); + } + } + save(crmCustomer); + crmActivityService.addActivity(2, CrmActivityEnum.CUSTOMER, crmCustomer.getCustomerId(), ""); + actionRecordUtil.addRecord(crmCustomer.getCustomerId(), CrmEnum.CUSTOMER, crmCustomer.getCustomerName()); +// if (isExcel && poolId != null) { +// CrmCustomerPoolRelation relation = new CrmCustomerPoolRelation(); +// relation.setCustomerId(crmCustomer.getCustomerId()); +// relation.setPoolId(poolId); +// customerPoolRelationService.save(relation); +// } + } + crmModel.setEntity(BeanUtil.beanToMap(crmCustomer)); +// if (isExcel && poolId != null) { +// List poolRelations = customerPoolRelationService.lambdaQuery() +// .select(CrmCustomerPoolRelation::getPoolId) +// .eq(CrmCustomerPoolRelation::getCustomerId, crmCustomer.getCustomerId()) +// .list(); +// crmModel.getEntity().put("poolId", poolRelations.stream().map(CrmCustomerPoolRelation::getPoolId).collect(Collectors.toList())); +// } + savePage(crmModel, crmCustomer.getCustomerId(), false); + return crmCustomer; + } + + @Override public void setOtherField(Map map) { String ownerUserName = UserCacheUtil.getUserName((Long) map.get("ownerUserId")); diff --git a/crm/src/main/java/com/kakarote/crm/service/impl/CrmOpenApiServiceImpl.java b/crm/src/main/java/com/kakarote/crm/service/impl/CrmOpenApiServiceImpl.java new file mode 100644 index 0000000..cba2436 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/service/impl/CrmOpenApiServiceImpl.java @@ -0,0 +1,6 @@ +package com.kakarote.crm.service.impl; + +import com.kakarote.crm.service.ICrmOpenApiService; + +public class CrmOpenApiServiceImpl implements ICrmOpenApiService { +} diff --git a/crm/src/main/java/com/kakarote/crm/service/impl/CrmQyjbxxServiceImpl.java b/crm/src/main/java/com/kakarote/crm/service/impl/CrmQyjbxxServiceImpl.java new file mode 100644 index 0000000..a3af5e4 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/service/impl/CrmQyjbxxServiceImpl.java @@ -0,0 +1,113 @@ +package com.kakarote.crm.service.impl; + +import cn.hutool.core.util.StrUtil; +import com.aliyun.oss.ServiceException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; +import com.kakarote.core.exception.CrmException; +import com.kakarote.core.feign.crm.service.CrmService; +import com.kakarote.core.servlet.BaseServiceImpl; +import com.kakarote.crm.entity.BO.QyjbxxBo; +import com.kakarote.crm.entity.PO.CrmQyjbxx; +import com.kakarote.crm.mapper.CrmQyjbxxMapper; +import com.kakarote.crm.service.ICrmQyjbxxService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +import static com.kakarote.core.common.SystemCodeEnum.SYSTEM_NO_VALID; + +@Service +public class CrmQyjbxxServiceImpl extends BaseServiceImpl implements ICrmQyjbxxService { + @Autowired + private CrmQyjbxxMapper crmQyjbxxMapper; + + + /** + * 通过企业Id查询企业基本信息 + * + * @param qyId + */ + @Override + public CrmQyjbxx getQyjbxx(Integer qyId) { + return crmQyjbxxMapper.selectById(qyId); + } + + /** + * 通过纳税人识别号获取企业基本信息 + * + * @param qyjbxxBo + * @return + */ + @Override + public CrmQyjbxx getQyjbxxByNsxx(QyjbxxBo qyjbxxBo) { + LambdaQueryChainWrapper eq = new LambdaQueryChainWrapper<>(crmQyjbxxMapper); + if (StrUtil.isNotBlank(qyjbxxBo.getNsrsbh())) { + return eq.eq(CrmQyjbxx::getNsrsbh, qyjbxxBo.getNsrsbh()).last("limit 1").one(); + }else if (StrUtil.isNotBlank(qyjbxxBo.getNsrmc())) { + return eq.eq(CrmQyjbxx::getNsrmc, qyjbxxBo.getNsrmc()).last("limit 1").one(); + }else { + throw new CrmException(SYSTEM_NO_VALID); + } + } + + /** + * 通过纳税人名称获取企业基本信息 + * + * @param nsrmc + * @return + */ + @Override + public CrmQyjbxx getQyjbxxByNsrmc(String nsrmc) { + CrmQyjbxx crmQyjbxx = new LambdaQueryChainWrapper<>(crmQyjbxxMapper) + .eq(CrmQyjbxx::getNsrmc, nsrmc) + .last("limit 1") + .one(); + return crmQyjbxx; + } + + /** + * 插入企业基本信息 + * + * @param crmQyjbxx + */ + @Override + public int insertQyjbxx(CrmQyjbxx crmQyjbxx) { + return crmQyjbxxMapper.insert(crmQyjbxx); + } + + /** + * 更新企业基本信息 + * + * @param crmQyjbxx + * @return + */ + @Override + public int updateQyjbxx(CrmQyjbxx crmQyjbxx) { + return crmQyjbxxMapper.updateById(crmQyjbxx); + } + + /** + * 删除企业基本信息 + * + * @param qyId + * @return + */ + @Override + public int deleteQyjbxx(String qyId) { + return crmQyjbxxMapper.deleteById(qyId); + } + + /** + * 查询企业基本信息列表 + * + * @param crmQyjbxx + * @return + */ + @Override + public List getQyjbxxList(CrmQyjbxx crmQyjbxx) { + QueryWrapper crmQyjbxxQueryWrapper = new QueryWrapper<>(); + return crmQyjbxxMapper.selectList(crmQyjbxxQueryWrapper); + } +} diff --git a/crm/src/main/java/com/kakarote/crm/util/CommentGenerator.java b/crm/src/main/java/com/kakarote/crm/util/CommentGenerator.java new file mode 100644 index 0000000..dc0bc73 --- /dev/null +++ b/crm/src/main/java/com/kakarote/crm/util/CommentGenerator.java @@ -0,0 +1,57 @@ +package com.kakarote.crm.util; + +import org.mybatis.generator.api.IntrospectedColumn; +import org.mybatis.generator.api.IntrospectedTable; +import org.mybatis.generator.api.dom.java.Field; +import org.mybatis.generator.internal.DefaultCommentGenerator; +import org.mybatis.generator.internal.util.StringUtility; + +import java.util.Properties; + + +/** + * @Author: JCccc + * @Date: 2022-7-13 10:09 + * @Description: 注释添加 + */ +public class CommentGenerator extends DefaultCommentGenerator { + private boolean addRemarkComments = false; + + /** + * 设置用户配置的参数 + */ + @Override + public void addConfigurationProperties(Properties properties) { + super.addConfigurationProperties(properties); + this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments")); + } + + /** + * 给字段添加注释 + */ + @Override + public void addFieldComment(Field field, IntrospectedTable introspectedTable, + IntrospectedColumn introspectedColumn) { + String remarks = introspectedColumn.getRemarks(); + //根据参数和备注信息判断是否添加备注信息 + if (addRemarkComments && StringUtility.stringHasValue(remarks)) { + addFieldJavaDoc(field, remarks); + } + } + + /** + * 给model的字段添加注释 + */ + private void addFieldJavaDoc(Field field, String remarks) { + //文档注释开始 + field.addJavaDocLine("/**"); + //获取数据库字段的备注信息 + String[] remarkLines = remarks.split(System.getProperty("line.separator")); + for (String remarkLine : remarkLines) { + field.addJavaDocLine(" * " + remarkLine); + } + addJavadocTag(field, false); + field.addJavaDocLine(" */"); + } + +} \ No newline at end of file diff --git a/crm/src/main/resources/mapper/CrmActionRecordMapper.xml b/crm/src/main/resources/mapper/CrmActionRecordMapper.xml new file mode 100644 index 0000000..dc0d079 --- /dev/null +++ b/crm/src/main/resources/mapper/CrmActionRecordMapper.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/gateway/src/main/java/com/kakarote/gateway/service/impl/PermissionServiceImpl.java b/gateway/src/main/java/com/kakarote/gateway/service/impl/PermissionServiceImpl.java index 61bb1cc..d4dcc63 100644 --- a/gateway/src/main/java/com/kakarote/gateway/service/impl/PermissionServiceImpl.java +++ b/gateway/src/main/java/com/kakarote/gateway/service/impl/PermissionServiceImpl.java @@ -45,7 +45,7 @@ public class PermissionServiceImpl implements PermissionService { /** * 不需要cookies */ - private static final List NOT_AUTH_URLS = Lists.newArrayList("/crmMarketing/queryMarketingId", "/crmMarketing/queryAddField", "/crmMarketing/saveMarketingInfo", "/adminUser/queryLoginUser", "/crmCall/upload","/adminUser/querySystemStatus","/adminUser/initUser","/crmCustomer/queryPageList"); + private static final List NOT_AUTH_URLS = Lists.newArrayList("/crmMarketing/queryMarketingId", "/crmMarketing/queryAddField", "/crmMarketing/saveMarketingInfo", "/adminUser/queryLoginUser", "/crmCall/upload","/adminUser/querySystemStatus","/adminUser/initUser","/crmCustomer/queryPageList","/openApi/crm/addCorporateSeas"); /**