Commit b4b380ed95d97b55d18d386fe03cfe6e71173235

Authored by liwei2917
1 parent f74936d7

增加话题实体类

src/main/java/com/cnlive/shenhe/api/TopicControllerApi.java 0 → 100644
  1 +package com.cnlive.shenhe.api;
  2 +
  3 +import com.alibaba.fastjson.JSONArray;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.cnlive.shenhe.bean.ErrorEnum;
  6 +import com.cnlive.shenhe.bean.ResponseBean;
  7 +import com.cnlive.shenhe.entity.ShyComments;
  8 +import com.cnlive.shenhe.entity.ShyContent;
  9 +import com.cnlive.shenhe.serviceImpl.CommentsServiceImpl;
  10 +import com.cnlive.shenhe.serviceImpl.ContentServiceImpl;
  11 +import com.cnlive.shenhe.utils.AuditPass;
  12 +import com.cnlive.shenhe.utils.CommonConst;
  13 +import com.cnlive.shenhe.utils.CommonUtils;
  14 +import org.slf4j.Logger;
  15 +import org.slf4j.LoggerFactory;
  16 +import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.stereotype.Controller;
  18 +import org.springframework.ui.Model;
  19 +import org.springframework.web.bind.annotation.GetMapping;
  20 +import org.springframework.web.bind.annotation.PathVariable;
  21 +import org.springframework.web.bind.annotation.PostMapping;
  22 +import org.springframework.web.bind.annotation.RequestBody;
  23 +import org.springframework.web.bind.annotation.RequestMapping;
  24 +import org.springframework.web.bind.annotation.ResponseBody;
  25 +
  26 +import java.util.Date;
  27 +import java.util.List;
  28 +import java.util.Map;
  29 +
  30 +import javax.servlet.http.HttpSession;
  31 +
  32 +@Controller
  33 +@RequestMapping("/api/topic")
  34 +public class TopicControllerApi {
  35 + private static Logger logger = LoggerFactory.getLogger(TopicControllerApi.class);
  36 + @Autowired
  37 + AuditPass Pass;
  38 + @Autowired
  39 + CommentsServiceImpl commentsService;
  40 + @Autowired
  41 + ContentServiceImpl contentService;
  42 +
  43 + /**
  44 + * @author liwei
  45 + * @Date: 2019/12/13 15:17
  46 + * @Description: 话题送审接口
  47 + */
  48 + @PostMapping("/import")
  49 + @ResponseBody
  50 + public ResponseBean impotTopic(String param) {
  51 + logger.info("话题入库,param=====" + param);
  52 + JSONObject json = JSONObject.parseObject(param);
  53 + //判断是否存在
  54 + ShyContent shyContent=new ShyContent();
  55 + shyContent.setContent_id(json.getString("contentId"));
  56 + shyContent.setContent_tag("content");//图文标签
  57 + List<ShyContent> contentList = contentService.findshyContent(shyContent);
  58 +
  59 + //获取审核类型
  60 + Integer shenheType = contentService.getShenheType(json.getInteger("spId"),"content");
  61 + //存在则更新
  62 + if (contentList.size() > 0) {
  63 + ShyContent shyContent1 = contentList.get(0);
  64 + shyContent1.setTitle(json.getString("title"));//标题
  65 + shyContent1.setTitle_image(json.getString("titleImage"));//标题图片
  66 + shyContent1.setShenhe_type(shenheType);//审核类型
  67 + shyContent1.setContent_status(json.getInteger("contentStatus"));//当前图文的审核状态
  68 + shyContent1.setSource(json.getString("source"));//来源
  69 + shyContent1.setAuthor(json.getString("author"));//作者
  70 + shyContent1.setContent_text(json.getString("content_text"));//图文内容
  71 + String contentTime = json.getString("contentTime");//图文创建时间
  72 + if (CommonUtils.isNotEmpty(contentTime)) {
  73 + Date timestamp = CommonUtils.getTimestamp(contentTime, "yyyy-MM-dd HH:mm:ss");
  74 + shyContent1.setContent_time(timestamp);
  75 +
  76 + }
  77 + shyContent1.setCreate_date(CommonUtils.getCurrentTime());
  78 + shyContent1.setCallback(json.getString("callback"));//回调地址
  79 + shyContent1.setContent_url(json.getString("contentUrl"));//图文发布h5的url
  80 + shyContent1.setContent_pc_url(json.getString("contentPCUrl"));//图文发布pc的url
  81 + shyContent1.setSp_id(json.getInteger("spId"));//spid
  82 + shyContent1.setContent_tag("content");//图文标签
  83 + shyContent1.setReceive_status(CommonConst.RECEIVE_BEFORE);//领取状态
  84 + shyContent1.setLast_update(CommonUtils.getCurrentTime());//最后一次更新时间
  85 +
  86 +
  87 +
  88 + boolean YorN = contentService.updateshyContent(shyContent1);
  89 + if (YorN == true) {
  90 + return new ResponseBean(ErrorEnum.SUCCESS);
  91 + } else {
  92 + return new ResponseBean(ErrorEnum.ERROR);
  93 + }
  94 + }
  95 + //如果不存在直接插入
  96 + shyContent.setTitle(json.getString("title"));//标题
  97 + shyContent.setTitle_image(json.getString("titleImage"));//标题图片
  98 + shyContent.setShenhe_type(shenheType);//审核类型
  99 + shyContent.setContent_status(json.getInteger("contentStatus"));//当前图文的审核状态
  100 + shyContent.setSource(json.getString("source"));//来源
  101 + shyContent.setAuthor(json.getString("author"));//作者
  102 + shyContent.setContent_text(json.getString("content_text"));//图文内容
  103 + String contentTime = json.getString("contentTime");//创建时间
  104 + if (CommonUtils.isNotEmpty(contentTime)) {
  105 + Date timestamp = CommonUtils.getTimestamp(contentTime, "yyyy-MM-dd HH:mm:ss");
  106 + shyContent.setContent_time(timestamp);
  107 +
  108 + }
  109 + shyContent.setCreate_date(CommonUtils.getCurrentTime());
  110 + shyContent.setCallback(json.getString("callback"));//回调地址
  111 + shyContent.setContent_url(json.getString("contentUrl"));//图文发布h5的url
  112 + shyContent.setContent_pc_url(json.getString("contentPCUrl"));//图文发布pc的url
  113 + shyContent.setSp_id(json.getInteger("spId"));//spid
  114 + shyContent.setReceive_status(CommonConst.RECEIVE_BEFORE);//领取状态
  115 + shyContent.setLast_update(CommonUtils.getCurrentTime());//最后一次更新时间
  116 + boolean YorN = contentService.impotContent(shyContent);
  117 + if (YorN == true) {
  118 + return new ResponseBean(ErrorEnum.SUCCESS);
  119 + } else {
  120 + return new ResponseBean(ErrorEnum.ERROR);
  121 + }
  122 + }
  123 +
  124 +
  125 + /**
  126 + * @author liwei
  127 + * @Date: 2019/05/15 11:17
  128 + * @Description: 朋友圈送审接口
  129 + */
  130 + @PostMapping("/importMoment")
  131 + @ResponseBody
  132 + public ResponseBean impotMoment(@RequestBody String param) {
  133 + logger.info("朋友圈入库,param=====" + param);
  134 + JSONObject json = JSONObject.parseObject(param);
  135 + //判断是否存在
  136 + ShyContent shyContent=new ShyContent();
  137 + shyContent.setContent_id(json.getString("momentId"));//朋友圈id
  138 + shyContent.setContent_tag("moment");//朋友圈标签
  139 + List<ShyContent> contentList = contentService.findshyContent(shyContent);
  140 + //获取审核类型
  141 + Integer shenheType = contentService.getShenheType(json.getInteger("spId"),"moment");
  142 +
  143 + //获取生活圈内容的类型 1:图片 2:视频 3:分享
  144 + Integer contentType = json.getInteger("contentType");
  145 + String contentImageUrl="";//内容图片地址
  146 + if(contentType!=null&&contentType==1){
  147 + JSONArray contentImageUrlList = JSONObject.parseArray(json.getString("contentImageUrl"));//朋友圈分享的内容的url
  148 + for(int i=0;i<contentImageUrlList.size();i++){
  149 + JSONObject contentImageUrlMap = contentImageUrlList.getJSONObject(i);
  150 + contentImageUrl+=contentImageUrlMap.getString("imageUrl")+",";
  151 + }
  152 + contentImageUrl=contentImageUrl.substring(0, contentImageUrl.length()-1);//去掉最后一个逗号
  153 + }else{
  154 + contentImageUrl=json.getString("contentImageUrl");
  155 + }
  156 +
  157 + //存在则更新
  158 + if (contentList.size() > 0) {
  159 + ShyContent shyContent1 = contentList.get(0);
  160 + shyContent1.setTitle(json.getString("title"));//标题
  161 + shyContent1.setTitle_image(json.getString("image"));//用户头像
  162 + shyContent1.setShenhe_type(shenheType);//审核类型
  163 + String contentTime = json.getString("createTime");//朋友圈内容创建时间
  164 + if (CommonUtils.isNotEmpty(contentTime)) {
  165 +// Date timestamp = CommonUtils.getTimestamp(contentTime, "yyyy-MM-dd HH:mm:ss");
  166 + shyContent1.setContent_time(new Date(Long.valueOf(contentTime)));
  167 +
  168 + }
  169 + shyContent1.setCreate_date(CommonUtils.getCurrentTime());
  170 + shyContent1.setCallback(json.getString("callbackUrl"));//回调地址
  171 + shyContent1.setContent_url(json.getString("pageUrl"));//朋友圈分享的url
  172 + shyContent1.setContent_pc_url(contentImageUrl);//朋友圈分享的内容的url,以逗号分隔
  173 + shyContent1.setSp_id(json.getInteger("spId"));//spid
  174 + shyContent1.setAuthor(json.getString("userId"));//用户id
  175 + shyContent1.setSource(json.getString("nickName"));//用户昵称
  176 + shyContent1.setVideo_id(json.getString("videoId"));//关联videoId
  177 + shyContent1.setContent_tag("moment");//图文标签
  178 + shyContent1.setReceive_status(CommonConst.RECEIVE_BEFORE);//领取状态
  179 + shyContent1.setLast_update(CommonUtils.getCurrentTime());//最后一次更新时间
  180 +
  181 +
  182 +
  183 + boolean YorN = contentService.updateshyContent(shyContent1);
  184 + if (YorN == true) {
  185 + return new ResponseBean(ErrorEnum.SUCCESS);
  186 + } else {
  187 + return new ResponseBean(ErrorEnum.ERROR);
  188 + }
  189 + }
  190 + //如果不存在直接插入
  191 + shyContent.setTitle(json.getString("title"));//标题
  192 + shyContent.setTitle_image(json.getString("image"));//用户头像
  193 + shyContent.setShenhe_type(shenheType);//审核类型
  194 + shyContent.setContent_status(1);//当前朋友圈内容的审核状态,先发后审
  195 + String contentTime = json.getString("createTime");//创建时间
  196 + if (CommonUtils.isNotEmpty(contentTime)) {
  197 +// Date timestamp = CommonUtils.getTimestamp(contentTime, "yyyy-MM-dd HH:mm:ss");
  198 + shyContent.setContent_time(new Date(Long.valueOf(contentTime)));
  199 +
  200 + }
  201 + shyContent.setCreate_date(CommonUtils.getCurrentTime());
  202 + shyContent.setCallback(json.getString("callbackUrl"));//回调地址
  203 + shyContent.setContent_url(json.getString("pageUrl"));//朋友圈分享的url
  204 + shyContent.setContent_pc_url(contentImageUrl);//朋友圈分享的内容的url,以逗号分隔
  205 + shyContent.setSp_id(json.getInteger("spId"));//spid
  206 + shyContent.setAuthor(json.getString("userId"));//用户id
  207 + shyContent.setSource(json.getString("nickName"));//用户昵称
  208 + shyContent.setVideo_id(json.getString("videoId"));//关联videoId
  209 + shyContent.setReceive_status(CommonConst.RECEIVE_BEFORE);//领取状态
  210 + shyContent.setLast_update(CommonUtils.getCurrentTime());//最后一次更新时间
  211 + boolean YorN = contentService.impotContent(shyContent);
  212 + if (YorN == true) {
  213 + return new ResponseBean(ErrorEnum.SUCCESS);
  214 + } else {
  215 + return new ResponseBean(ErrorEnum.ERROR);
  216 + }
  217 + }
  218 +
  219 + @GetMapping("/detail/{id}.html")
  220 + public Object getContentDetail(Model model, @PathVariable Integer id) {
  221 + System.out.println("数美送审页面开始进入");
  222 + ShyContent content = contentService.selectByPrimaryKey(id);
  223 + model.addAttribute("contentText", content.getContent_text());
  224 + model.addAttribute("contentTitle", content.getTitle());
  225 + return "html/contentPage.html";
  226 + }
  227 +
  228 +
  229 +}
... ...
src/main/java/com/cnlive/shenhe/entity/ShyTopic.java 0 → 100644
  1 +package com.cnlive.shenhe.entity;
  2 +
  3 +import java.util.Date;
  4 +import javax.persistence.*;
  5 +
  6 +@Table(name = "shy_topic")
  7 +public class ShyTopic {
  8 + /**
  9 + * id
  10 + */
  11 + @Id
  12 + private Integer id;
  13 +
  14 + /**
  15 + * 话题id
  16 + */
  17 + private String topic_id;
  18 +
  19 + /**
  20 + * spId
  21 + */
  22 + private Integer sp_id;
  23 +
  24 + /**
  25 + * 话题图片
  26 + */
  27 + private String topic_image;
  28 +
  29 + /**
  30 + * 话题标签
  31 + */
  32 + private String topic_tag;
  33 +
  34 + /**
  35 + * 话题url
  36 + */
  37 + private String topic_url;
  38 +
  39 + /**
  40 + * 回调地址
  41 + */
  42 + private String callback;
  43 +
  44 + /**
  45 + * 话题创建时间
  46 + */
  47 + private Date topic_time;
  48 +
  49 + /**
  50 + * 审核类型,1:免审,2:机审,3:人工审
  51 + */
  52 + private Integer shenhe_type;
  53 +
  54 + /**
  55 + * 话题状态.0:未审核 1:审核中 2:通过 3:拒绝
  56 + */
  57 + private Integer topic_status;
  58 +
  59 + /**
  60 + * 送审时间
  61 + */
  62 + private Date create_date;
  63 +
  64 + /**
  65 + * 更新时间
  66 + */
  67 + private Date update_date;
  68 +
  69 + /**
  70 + * 领取状态。0:未领取;1:已领取,2:已审核
  71 + */
  72 + private Integer receive_status;
  73 +
  74 + /**
  75 + * 审核人id
  76 + */
  77 + private String auditor_id;
  78 +
  79 + /**
  80 + * 更新人名称
  81 + */
  82 + private String updater;
  83 +
  84 + /**
  85 + * 审核意见
  86 + */
  87 + private String shenhe_msg;
  88 +
  89 + /**
  90 + * 话题标题
  91 + */
  92 + private String title;
  93 +
  94 + /**
  95 + * 话题内容
  96 + */
  97 + private String topic_text;
  98 +
  99 + /**
  100 + * 获取id
  101 + *
  102 + * @return id - id
  103 + */
  104 + public Integer getId() {
  105 + return id;
  106 + }
  107 +
  108 + /**
  109 + * 设置id
  110 + *
  111 + * @param id id
  112 + */
  113 + public void setId(Integer id) {
  114 + this.id = id;
  115 + }
  116 +
  117 + /**
  118 + * 获取话题id
  119 + *
  120 + * @return topic_id - 话题id
  121 + */
  122 + public String getTopic_id() {
  123 + return topic_id;
  124 + }
  125 +
  126 + /**
  127 + * 设置话题id
  128 + *
  129 + * @param topic_id 话题id
  130 + */
  131 + public void setTopic_id(String topic_id) {
  132 + this.topic_id = topic_id;
  133 + }
  134 +
  135 + /**
  136 + * 获取spId
  137 + *
  138 + * @return sp_id - spId
  139 + */
  140 + public Integer getSp_id() {
  141 + return sp_id;
  142 + }
  143 +
  144 + /**
  145 + * 设置spId
  146 + *
  147 + * @param sp_id spId
  148 + */
  149 + public void setSp_id(Integer sp_id) {
  150 + this.sp_id = sp_id;
  151 + }
  152 +
  153 + /**
  154 + * 获取话题图片
  155 + *
  156 + * @return topic_image - 话题图片
  157 + */
  158 + public String getTopic_image() {
  159 + return topic_image;
  160 + }
  161 +
  162 + /**
  163 + * 设置话题图片
  164 + *
  165 + * @param topic_image 话题图片
  166 + */
  167 + public void setTopic_image(String topic_image) {
  168 + this.topic_image = topic_image;
  169 + }
  170 +
  171 + /**
  172 + * 获取话题标签
  173 + *
  174 + * @return topic_tag - 话题标签
  175 + */
  176 + public String getTopic_tag() {
  177 + return topic_tag;
  178 + }
  179 +
  180 + /**
  181 + * 设置话题标签
  182 + *
  183 + * @param topic_tag 话题标签
  184 + */
  185 + public void setTopic_tag(String topic_tag) {
  186 + this.topic_tag = topic_tag;
  187 + }
  188 +
  189 + /**
  190 + * 获取话题url
  191 + *
  192 + * @return topic_url - 话题url
  193 + */
  194 + public String getTopic_url() {
  195 + return topic_url;
  196 + }
  197 +
  198 + /**
  199 + * 设置话题url
  200 + *
  201 + * @param topic_url 话题url
  202 + */
  203 + public void setTopic_url(String topic_url) {
  204 + this.topic_url = topic_url;
  205 + }
  206 +
  207 + /**
  208 + * 获取回调地址
  209 + *
  210 + * @return callback - 回调地址
  211 + */
  212 + public String getCallback() {
  213 + return callback;
  214 + }
  215 +
  216 + /**
  217 + * 设置回调地址
  218 + *
  219 + * @param callback 回调地址
  220 + */
  221 + public void setCallback(String callback) {
  222 + this.callback = callback;
  223 + }
  224 +
  225 + /**
  226 + * 获取话题创建时间
  227 + *
  228 + * @return topic_time - 话题创建时间
  229 + */
  230 + public Date getTopic_time() {
  231 + return topic_time;
  232 + }
  233 +
  234 + /**
  235 + * 设置话题创建时间
  236 + *
  237 + * @param topic_time 话题创建时间
  238 + */
  239 + public void setTopic_time(Date topic_time) {
  240 + this.topic_time = topic_time;
  241 + }
  242 +
  243 + /**
  244 + * 获取审核类型,1:免审,2:机审,3:人工审
  245 + *
  246 + * @return shenhe_type - 审核类型,1:免审,2:机审,3:人工审
  247 + */
  248 + public Integer getShenhe_type() {
  249 + return shenhe_type;
  250 + }
  251 +
  252 + /**
  253 + * 设置审核类型,1:免审,2:机审,3:人工审
  254 + *
  255 + * @param shenhe_type 审核类型,1:免审,2:机审,3:人工审
  256 + */
  257 + public void setShenhe_type(Integer shenhe_type) {
  258 + this.shenhe_type = shenhe_type;
  259 + }
  260 +
  261 + /**
  262 + * 获取话题状态.0:未审核 1:审核中 2:通过 3:拒绝
  263 + *
  264 + * @return topic_status - 话题状态.0:未审核 1:审核中 2:通过 3:拒绝
  265 + */
  266 + public Integer getTopic_status() {
  267 + return topic_status;
  268 + }
  269 +
  270 + /**
  271 + * 设置话题状态.0:未审核 1:审核中 2:通过 3:拒绝
  272 + *
  273 + * @param topic_status 话题状态.0:未审核 1:审核中 2:通过 3:拒绝
  274 + */
  275 + public void setTopic_status(Integer topic_status) {
  276 + this.topic_status = topic_status;
  277 + }
  278 +
  279 + /**
  280 + * 获取送审时间
  281 + *
  282 + * @return create_date - 送审时间
  283 + */
  284 + public Date getCreate_date() {
  285 + return create_date;
  286 + }
  287 +
  288 + /**
  289 + * 设置送审时间
  290 + *
  291 + * @param create_date 送审时间
  292 + */
  293 + public void setCreate_date(Date create_date) {
  294 + this.create_date = create_date;
  295 + }
  296 +
  297 + /**
  298 + * 获取更新时间
  299 + *
  300 + * @return update_date - 更新时间
  301 + */
  302 + public Date getUpdate_date() {
  303 + return update_date;
  304 + }
  305 +
  306 + /**
  307 + * 设置更新时间
  308 + *
  309 + * @param update_date 更新时间
  310 + */
  311 + public void setUpdate_date(Date update_date) {
  312 + this.update_date = update_date;
  313 + }
  314 +
  315 + /**
  316 + * 获取领取状态。0:未领取;1:已领取,2:已审核
  317 + *
  318 + * @return receive_status - 领取状态。0:未领取;1:已领取,2:已审核
  319 + */
  320 + public Integer getReceive_status() {
  321 + return receive_status;
  322 + }
  323 +
  324 + /**
  325 + * 设置领取状态。0:未领取;1:已领取,2:已审核
  326 + *
  327 + * @param receive_status 领取状态。0:未领取;1:已领取,2:已审核
  328 + */
  329 + public void setReceive_status(Integer receive_status) {
  330 + this.receive_status = receive_status;
  331 + }
  332 +
  333 + /**
  334 + * 获取审核人id
  335 + *
  336 + * @return auditor_id - 审核人id
  337 + */
  338 + public String getAuditor_id() {
  339 + return auditor_id;
  340 + }
  341 +
  342 + /**
  343 + * 设置审核人id
  344 + *
  345 + * @param auditor_id 审核人id
  346 + */
  347 + public void setAuditor_id(String auditor_id) {
  348 + this.auditor_id = auditor_id;
  349 + }
  350 +
  351 + /**
  352 + * 获取更新人名称
  353 + *
  354 + * @return updater - 更新人名称
  355 + */
  356 + public String getUpdater() {
  357 + return updater;
  358 + }
  359 +
  360 + /**
  361 + * 设置更新人名称
  362 + *
  363 + * @param updater 更新人名称
  364 + */
  365 + public void setUpdater(String updater) {
  366 + this.updater = updater;
  367 + }
  368 +
  369 + /**
  370 + * 获取审核意见
  371 + *
  372 + * @return shenhe_msg - 审核意见
  373 + */
  374 + public String getShenhe_msg() {
  375 + return shenhe_msg;
  376 + }
  377 +
  378 + /**
  379 + * 设置审核意见
  380 + *
  381 + * @param shenhe_msg 审核意见
  382 + */
  383 + public void setShenhe_msg(String shenhe_msg) {
  384 + this.shenhe_msg = shenhe_msg;
  385 + }
  386 +
  387 + /**
  388 + * 获取话题标题
  389 + *
  390 + * @return title - 话题标题
  391 + */
  392 + public String getTitle() {
  393 + return title;
  394 + }
  395 +
  396 + /**
  397 + * 设置话题标题
  398 + *
  399 + * @param title 话题标题
  400 + */
  401 + public void setTitle(String title) {
  402 + this.title = title;
  403 + }
  404 +
  405 + /**
  406 + * 获取话题内容
  407 + *
  408 + * @return topic_text - 话题内容
  409 + */
  410 + public String getTopic_text() {
  411 + return topic_text;
  412 + }
  413 +
  414 + /**
  415 + * 设置话题内容
  416 + *
  417 + * @param topic_text 话题内容
  418 + */
  419 + public void setTopic_text(String topic_text) {
  420 + this.topic_text = topic_text;
  421 + }
  422 +}
0 423 \ No newline at end of file
... ...
src/main/java/com/cnlive/shenhe/mapper/ShyTopicMapper.java 0 → 100644
  1 +package com.cnlive.shenhe.mapper;
  2 +
  3 +import com.cnlive.shenhe.entity.ShyTopic;
  4 +import tk.mybatis.mapper.common.Mapper;
  5 +
  6 +public interface ShyTopicMapper extends Mapper<ShyTopic> {
  7 +}
0 8 \ No newline at end of file
... ...
src/main/resources/application.properties
1   -spring.datasource.url=jdbc:mysql://10.137.192.14:3306/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
  1 +spring.datasource.url=jdbc:mysql://120.92.51.100:50070/new_shy?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
2 2 spring.datasource.username=admin
3 3 spring.datasource.password=83BwiCoq
4 4  
... ...
src/main/resources/generatorConfig.xml
... ... @@ -23,9 +23,9 @@
23 23  
24 24  
25 25 <jdbcConnection driverClass="com.mysql.jdbc.Driver"
26   - connectionURL="jdbc:mysql://120.92.102.31:3306/new_shy??useUnicode=true&amp;characterEncoding=utf8&amp;characterSetResults=utf8"
27   - userId="root"
28   - password="M345sdfss4!">
  26 + connectionURL="jdbc:mysql://120.92.51.100:50070/new_shy??useUnicode=true&amp;characterEncoding=utf8&amp;characterSetResults=utf8"
  27 + userId="admin"
  28 + password="83BwiCoq">
29 29 </jdbcConnection>
30 30  
31 31 <javaModelGenerator targetPackage="com.cnlive.shenhe.entity" targetProject="src/main/java"/>
... ...
src/main/resources/mapper/ShyTopicMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.cnlive.shenhe.mapper.ShyTopicMapper">
  4 + <resultMap id="BaseResultMap" type="com.cnlive.shenhe.entity.ShyTopic">
  5 + <!--
  6 + WARNING - @mbg.generated
  7 + -->
  8 + <id column="id" jdbcType="INTEGER" property="id" />
  9 + <result column="topic_id" jdbcType="VARCHAR" property="topic_id" />
  10 + <result column="sp_id" jdbcType="INTEGER" property="sp_id" />
  11 + <result column="topic_image" jdbcType="VARCHAR" property="topic_image" />
  12 + <result column="topic_tag" jdbcType="VARCHAR" property="topic_tag" />
  13 + <result column="topic_url" jdbcType="VARCHAR" property="topic_url" />
  14 + <result column="callback" jdbcType="VARCHAR" property="callback" />
  15 + <result column="topic_time" jdbcType="TIMESTAMP" property="topic_time" />
  16 + <result column="shenhe_type" jdbcType="INTEGER" property="shenhe_type" />
  17 + <result column="topic_status" jdbcType="INTEGER" property="topic_status" />
  18 + <result column="create_date" jdbcType="TIMESTAMP" property="create_date" />
  19 + <result column="update_date" jdbcType="TIMESTAMP" property="update_date" />
  20 + <result column="receive_status" jdbcType="INTEGER" property="receive_status" />
  21 + <result column="auditor_id" jdbcType="VARCHAR" property="auditor_id" />
  22 + <result column="updater" jdbcType="VARCHAR" property="updater" />
  23 + <result column="shenhe_msg" jdbcType="VARCHAR" property="shenhe_msg" />
  24 + <result column="title" jdbcType="LONGVARCHAR" property="title" />
  25 + <result column="topic_text" jdbcType="LONGVARCHAR" property="topic_text" />
  26 + </resultMap>
  27 +</mapper>
0 28 \ No newline at end of file
... ...