parent
bf9a905e1f
commit
d3e6975578
|
|
@ -0,0 +1,42 @@
|
|||
package com.kakarote.crm.controller;
|
||||
|
||||
|
||||
import com.kakarote.core.common.R;
|
||||
import com.kakarote.core.common.Result;
|
||||
import com.kakarote.crm.entity.PO.CrmCorporatePortrait;
|
||||
import com.kakarote.crm.service.ICrmCorporatePortraitService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/CrmCorporatePortrait")
|
||||
public class CrmCorporatePortraitController {
|
||||
|
||||
@Autowired
|
||||
private ICrmCorporatePortraitService crmCorporatePortraitService;
|
||||
|
||||
@GetMapping("queryByNsrmc/{nsrmc}")
|
||||
@ApiOperation("根据Nsrmc查询")
|
||||
public Result<CrmCorporatePortrait> queryByNsrmc(@PathVariable("nsrmc") String nsrmc) {
|
||||
return R.ok(crmCorporatePortraitService.queryByNsrmc(nsrmc));
|
||||
}
|
||||
|
||||
@PostMapping("/insertCorporatePortrait")
|
||||
@ApiOperation("新增")
|
||||
public Result<Integer> insertCorporatePortrait(@RequestBody CrmCorporatePortrait crmCorporatePortrait){
|
||||
return R.ok(crmCorporatePortraitService.insertCorporatePortrait(crmCorporatePortrait));
|
||||
}
|
||||
|
||||
@PostMapping("/updateCorporatePortrait")
|
||||
@ApiOperation("更新")
|
||||
public Result<Integer> updateCorporatePortrait(@RequestBody CrmCorporatePortrait crmCorporatePortrait){
|
||||
return R.ok(crmCorporatePortraitService.updateCorporatePortrait(crmCorporatePortrait));
|
||||
}
|
||||
|
||||
@GetMapping("deleteCorporatePortrait/{nsrmc}")
|
||||
public Result<Integer> deleteCorporatePortrait(@PathVariable("nsrmc") String nsrmc){
|
||||
return R.ok(crmCorporatePortraitService.deleteCorporatePortrait(nsrmc));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.kakarote.crm.entity.PO;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.kakarote.core.security.converter.SensitiveDataConverter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("wk_crm_corporate_portrait")
|
||||
@ApiModel(value="CrmCorporatePortrait对象", description="企业形象")
|
||||
public class CrmCorporatePortrait implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 企业规模
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String enterpriseSize;
|
||||
|
||||
/**
|
||||
* 行业类型
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String industryType;
|
||||
|
||||
/**
|
||||
* 信用等级
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String creditRating;
|
||||
|
||||
/**
|
||||
* 社保人数
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String socialSecurity;
|
||||
|
||||
/**
|
||||
* 产品是否使用 (0/1)
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String productsIs;
|
||||
|
||||
/**
|
||||
* 产品注册时间
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String productsDate;
|
||||
|
||||
/**
|
||||
* 报告查询次数
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String reportNum;
|
||||
|
||||
/**
|
||||
* 是否点击深度报告(0/1)
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String inDepthReporting;
|
||||
|
||||
/**
|
||||
* 纳税人名称
|
||||
*/
|
||||
private String nsrmc;
|
||||
}
|
||||
|
|
@ -42,4 +42,14 @@ public class CrmUsageReport implements Serializable {
|
|||
*/
|
||||
private Integer clickedDeepReport;
|
||||
|
||||
/**
|
||||
* 纳税人识别号
|
||||
*/
|
||||
private String nsrsbh;
|
||||
|
||||
/**
|
||||
* 纳税人名称
|
||||
*/
|
||||
private String nsrmc;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
package com.kakarote.crm.mapper;
|
||||
|
||||
import com.kakarote.core.servlet.BaseMapper;
|
||||
import com.kakarote.crm.entity.PO.CrmCorporatePortrait;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CrmCorporatePortraitMapper extends BaseMapper<CrmCorporatePortrait> {
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?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.kakarote.crm.mapper.CrmCorporatePortraitMapper">
|
||||
<resultMap id="BaseResultMap" type="com.kakarote.crm.entity.PO.CrmCorporatePortrait">
|
||||
<id property="id" jdbcType="INTEGER" column="id" />
|
||||
<result property="enterpriseSize" jdbcType="VARCHAR" column="enterprise_size" />
|
||||
<result property="industryType" jdbcType="VARCHAR" column="industry_type" />
|
||||
<result property="creditRating" jdbcType="VARCHAR" column="credit_rating" />
|
||||
<result property="socialSecurity" jdbcType="VARCHAR" column="social_security" />
|
||||
<result property="productsIs" jdbcType="VARCHAR" column="products_is" />
|
||||
<result property="productsDate" jdbcType="VARCHAR" column="products_date" />
|
||||
<result property="reportNum" jdbcType="VARCHAR" column="report_num" />
|
||||
<result property="inDepthReporting" jdbcType="VARCHAR" column="in_depth_reporting" />
|
||||
<result property="nsrmc" jdbcType="VARCHAR" column="nsrmc" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.kakarote.crm.service;
|
||||
|
||||
import com.kakarote.core.servlet.BaseService;
|
||||
import com.kakarote.crm.entity.PO.CrmCorporatePortrait;
|
||||
|
||||
|
||||
public interface ICrmCorporatePortraitService extends BaseService<CrmCorporatePortrait> {
|
||||
|
||||
|
||||
/**
|
||||
* 根据纳税人名称查询
|
||||
* @param nsrmc
|
||||
* @return
|
||||
*/
|
||||
CrmCorporatePortrait queryByNsrmc(String nsrmc);
|
||||
|
||||
/**
|
||||
* 增加
|
||||
* @param crmCorporatePortrait
|
||||
* @return
|
||||
*/
|
||||
int insertCorporatePortrait(CrmCorporatePortrait crmCorporatePortrait);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param crmCorporatePortrait
|
||||
* @return
|
||||
*/
|
||||
int updateCorporatePortrait(CrmCorporatePortrait crmCorporatePortrait);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param nsrmc
|
||||
* @return
|
||||
*/
|
||||
int deleteCorporatePortrait(String nsrmc);
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.kakarote.crm.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.kakarote.core.servlet.BaseServiceImpl;
|
||||
import com.kakarote.crm.entity.PO.CrmCorporatePortrait;
|
||||
import com.kakarote.crm.mapper.CrmCorporatePortraitMapper;
|
||||
import com.kakarote.crm.service.ICrmCorporatePortraitService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class CrmCorporatePortraitServiceImpl extends BaseServiceImpl<CrmCorporatePortraitMapper, CrmCorporatePortrait> implements ICrmCorporatePortraitService {
|
||||
|
||||
@Autowired
|
||||
private CrmCorporatePortraitMapper crmCorporatePortraitMapper;
|
||||
|
||||
@Override
|
||||
public CrmCorporatePortrait queryByNsrmc(String nsrmc) {
|
||||
LambdaQueryWrapper<CrmCorporatePortrait> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CrmCorporatePortrait::getNsrmc, nsrmc);
|
||||
return crmCorporatePortraitMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertCorporatePortrait(CrmCorporatePortrait crmCorporatePortrait) {
|
||||
return crmCorporatePortraitMapper.insert(crmCorporatePortrait);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateCorporatePortrait(CrmCorporatePortrait crmCorporatePortrait) {
|
||||
LambdaQueryWrapper<CrmCorporatePortrait> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CrmCorporatePortrait::getNsrmc, crmCorporatePortrait.getNsrmc());
|
||||
return crmCorporatePortraitMapper.update(crmCorporatePortrait,wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteCorporatePortrait(String nsrmc) {
|
||||
LambdaQueryWrapper<CrmCorporatePortrait> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CrmCorporatePortrait::getNsrmc, nsrmc);
|
||||
return crmCorporatePortraitMapper.delete(wrapper);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue