Commit ea7ca1d4 authored by 刘基明's avatar 刘基明

feign fix

parent 8f1dda00
......@@ -21,9 +21,9 @@ public class CodeAutoGenerator {
String author = "xudong";
String mysqlUserName = "tamp_admin";
String mysqlPassword = "@imeng123";
String jdbcUrl = "jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_community";
String jdbcUrl = "jdbc:mysql://rm-uf6r22t3d798q4kmk.mysql.rds.aliyuncs.com:3306/tamp_community";
// String[] tables = new String[]{"theme"};
String[] tables = new String[]{"file_record"};
String[] tables = new String[]{"theme_text_filter"};
String basePackage = "com.tanpu.community";
String mapperPackage = "dao.mapper.community";
String entityPackage = "dao.entity.community";
......
package com.tanpu.community.dao.entity.community;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 主题文字查重表
* </p>
*
* @author xudong
* @since 2021-09-08
*/
@TableName("theme_text_filter")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="ThemeTextFilterEntity对象", description="主题文字查重表")
public class ThemeTextFilterEntity implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "主题Id")
private String themeId;
@ApiModelProperty(value = "分块")
private String partition;
@ApiModelProperty(value = "分块hash")
private String partitionHash;
@ApiModelProperty(value = "分块号")
private Integer partitionNum;
@ApiModelProperty(value = "分块总数")
private Integer totalParts;
private LocalDateTime createTime;
private LocalDateTime updateTime;
private Integer deleteTag;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getThemeId() {
return themeId;
}
public void setThemeId(String themeId) {
this.themeId = themeId;
}
public String getPartition() {
return partition;
}
public void setPartition(String partition) {
this.partition = partition;
}
public String getPartitionHash() {
return partitionHash;
}
public void setPartitionHash(String partitionHash) {
this.partitionHash = partitionHash;
}
public Integer getPartitionNum() {
return partitionNum;
}
public void setPartitionNum(Integer partitionNum) {
this.partitionNum = partitionNum;
}
public Integer getTotalParts() {
return totalParts;
}
public void setTotalParts(Integer totalParts) {
this.totalParts = totalParts;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getDeleteTag() {
return deleteTag;
}
public void setDeleteTag(Integer deleteTag) {
this.deleteTag = deleteTag;
}
@Override
public String toString() {
return "ThemeTextFilterEntity{" +
"id=" + id +
", themeId=" + themeId +
", partition=" + partition +
", partitionHash=" + partitionHash +
", partitionNum=" + partitionNum +
", totalParts=" + totalParts +
", createTime=" + createTime +
", updateTime=" + updateTime +
", deleteTag=" + deleteTag +
"}";
}
}
package com.tanpu.community.dao.mapper.community;
import com.tanpu.community.dao.entity.community.ThemeTextFilterEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 主题文字查重表 Mapper 接口
* </p>
*
* @author xudong
* @since 2021-09-08
*/
public interface ThemeTextFilterMapper extends BaseMapper<ThemeTextFilterEntity> {
}
......@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(value = "service-jifen", contextId = "jifen", fallbackFactory = FeignBackClientForActivity.class, url = "http://tp-tamp-jifen-svc", path = "/jifen")
@FeignClient(value = "service-jifen", contextId = "jifen", fallbackFactory = FeignBackClientForActivity.class, url = "http://tp-jifen-svc", path = "/jifen")
// @FeignClient(value = "service-jifen", contextId = "jifen", fallbackFactory = FeignBackClientForActivity.class, url = "http://127.0.0.1:8202/community")
public interface FeignClientForActivity {
......
package com.tanpu.community.service;
import com.tanpu.community.dao.entity.community.ThemeTextFilterEntity;
import com.tanpu.community.dao.mapper.community.ThemeTextFilterMapper;
import javax.annotation.Resource;
public class ThemeTextCheckService {
@Resource
private ThemeTextFilterMapper themeTextFilterMapper;
public void insert(){
ThemeTextFilterEntity build = ThemeTextFilterEntity.builder().build();
themeTextFilterMapper.insert(build);
}
}
<?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.tanpu.community.dao.mapper.community.ThemeTextFilterMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.tanpu.community.dao.entity.community.ThemeTextFilterEntity">
<id column="id" property="id" />
<result column="theme_id" property="themeId" />
<result column="partition" property="partition" />
<result column="partition_hash" property="partitionHash" />
<result column="partition_num" property="partitionNum" />
<result column="total_parts" property="totalParts" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="delete_tag" property="deleteTag" />
</resultMap>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment