Explorar el Código

1.新增公众号--医生主页健康文章列表接口
2.新增医生端--健康文章类型接口
3.新增医生端--医生取消收藏文章

zd_123 hace 7 años
padre
commit
06c9d4e636

+ 291 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/jkedu/EduArticle.java

@ -0,0 +1,291 @@
/*
package com.yihu.wlyy.entity.jkedu;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.crypto.Data;
import java.util.Date;
*/
/**
 * Created by zhangdan on 2017/9/29.
 *//*
@Entity
@Table(name = "org_article",schema = "",catalog = "jkedudb")
public class EduArticle extends IdEntity{
    //文章ID
    private String ArticleId;
    //文章标题
    private String ArticleTitle;
    //文章内容
    private String ArticleContent;
    //排序
    private int ArticleOrder;
    //1、正常、2删除
    private int ArticleState;
    //文章所属单位名称
    private String OrgName;
    //文章来源(填写发布人所在的机构)
    private String ArticleSource;
    //文章所属单位ID
    private String OgId;
    //1、重要、2紧急
    private int Articlelevel;
    //封面图
    private String ArticleCover;
    //插入时间
    private Date InsertTime;
    //最后更新时间
    private Data UpdateTime;
    //创建人
    private String OperatorName;
    //创建人ID
    private String OperatorId;
    //2级类别名称
    private String SecondLevelCategoryName;
    //2级类别ID
    private String SecondLevelCategoryId;
    //认证单位
    private String Authentication;
    //认证单位ID
    private String AuthenticationId;
    //是否认证 1已认证2、未认证
    private int IsAuthentication;
    //1、视频 2、图文3、音频、 4 、精选问答
    private String ArticleType;
    //1级类别id
    private String FirstLevelCategoryId;
    //1级类别名称
    private String FirstLevelCategoryName;
    //操作人所在科室
    private String DeptName;
    //等级职称
    private String TitleLevel;
    //操作人头像
    private String OperatorImg;
    //最后修改人ID
    private String LastOperatorId;
    //最后修改人
    private String LastOperatorName;
    public String getArticleId() {
        return ArticleId;
    }
    public void setArticleId(String articleId) {
        ArticleId = articleId;
    }
    public String getArticleTitle() {
        return ArticleTitle;
    }
    public void setArticleTitle(String articleTitle) {
        ArticleTitle = articleTitle;
    }
    public String getArticleContent() {
        return ArticleContent;
    }
    public void setArticleContent(String articleContent) {
        ArticleContent = articleContent;
    }
    public int getArticleOrder() {
        return ArticleOrder;
    }
    public void setArticleOrder(int articleOrder) {
        ArticleOrder = articleOrder;
    }
    public int getArticleState() {
        return ArticleState;
    }
    public void setArticleState(int articleState) {
        ArticleState = articleState;
    }
    public String getOrgName() {
        return OrgName;
    }
    public void setOrgName(String orgName) {
        OrgName = orgName;
    }
    public String getArticleSource() {
        return ArticleSource;
    }
    public void setArticleSource(String articleSource) {
        ArticleSource = articleSource;
    }
    public String getOgId() {
        return OgId;
    }
    public void setOgId(String ogId) {
        OgId = ogId;
    }
    public int getArticlelevel() {
        return Articlelevel;
    }
    public void setArticlelevel(int articlelevel) {
        Articlelevel = articlelevel;
    }
    public String getArticleCover() {
        return ArticleCover;
    }
    public void setArticleCover(String articleCover) {
        ArticleCover = articleCover;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getInsertTime() {
        return InsertTime;
    }
    public void setInsertTime(Date insertTime) {
        InsertTime = insertTime;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Data getUpdateTime() {
        return UpdateTime;
    }
    public void setUpdateTime(Data updateTime) {
        UpdateTime = updateTime;
    }
    public String getOperatorName() {
        return OperatorName;
    }
    public void setOperatorName(String operatorName) {
        OperatorName = operatorName;
    }
    public String getOperatorId() {
        return OperatorId;
    }
    public void setOperatorId(String operatorId) {
        OperatorId = operatorId;
    }
    public String getSecondLevelCategoryName() {
        return SecondLevelCategoryName;
    }
    public void setSecondLevelCategoryName(String secondLevelCategoryName) {
        SecondLevelCategoryName = secondLevelCategoryName;
    }
    public String getSecondLevelCategoryId() {
        return SecondLevelCategoryId;
    }
    public void setSecondLevelCategoryId(String secondLevelCategoryId) {
        SecondLevelCategoryId = secondLevelCategoryId;
    }
    public String getAuthentication() {
        return Authentication;
    }
    public void setAuthentication(String authentication) {
        Authentication = authentication;
    }
    public String getAuthenticationId() {
        return AuthenticationId;
    }
    public void setAuthenticationId(String authenticationId) {
        AuthenticationId = authenticationId;
    }
    public int getIsAuthentication() {
        return IsAuthentication;
    }
    public void setIsAuthentication(int isAuthentication) {
        IsAuthentication = isAuthentication;
    }
    public String getArticleType() {
        return ArticleType;
    }
    public void setArticleType(String articleType) {
        ArticleType = articleType;
    }
    public String getFirstLevelCategoryId() {
        return FirstLevelCategoryId;
    }
    public void setFirstLevelCategoryId(String firstLevelCategoryId) {
        FirstLevelCategoryId = firstLevelCategoryId;
    }
    public String getFirstLevelCategoryName() {
        return FirstLevelCategoryName;
    }
    public void setFirstLevelCategoryName(String firstLevelCategoryName) {
        FirstLevelCategoryName = firstLevelCategoryName;
    }
    public String getDeptName() {
        return DeptName;
    }
    public void setDeptName(String deptName) {
        DeptName = deptName;
    }
    public String getTitleLevel() {
        return TitleLevel;
    }
    public void setTitleLevel(String titleLevel) {
        TitleLevel = titleLevel;
    }
    public String getOperatorImg() {
        return OperatorImg;
    }
    public void setOperatorImg(String operatorImg) {
        OperatorImg = operatorImg;
    }
    public String getLastOperatorId() {
        return LastOperatorId;
    }
    public void setLastOperatorId(String lastOperatorId) {
        LastOperatorId = lastOperatorId;
    }
    public String getLastOperatorName() {
        return LastOperatorName;
    }
    public void setLastOperatorName(String lastOperatorName) {
        LastOperatorName = lastOperatorName;
    }
}
*/

+ 33 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/controller/EduDoctorArticleController.java

@ -3,6 +3,7 @@ package com.yihu.wlyy.web.third.jkedu.controller;
import com.alibaba.fastjson.JSON;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.third.jkedu.vo.CategoryModel;
import com.yihu.wlyy.web.third.jkedu.vo.base.BaseResultModel;
import com.yihu.wlyy.web.third.jkedu.vo.state.ErrorStateMessage;
import com.yihu.wlyy.web.third.jkedu.vo.base.ResultListModel;
import io.swagger.annotations.Api;
@ -56,9 +57,7 @@ public class EduDoctorArticleController extends BaseController{
                return new ResultListModel(list);
            }else{
                errCode =Integer.valueOf(String.valueOf(map.get("Code")));
                if(errCode<0){
                    errCode=-10000;
                }
                return new ResultListModel(errCode, ErrorStateMessage.getMessge(errCode));
            }
        }catch (Exception e){
@ -66,5 +65,36 @@ public class EduDoctorArticleController extends BaseController{
        }
    }
    @RequestMapping(value = "/cancelArticleCollection",method = RequestMethod.POST)
    @ApiOperation("APP端--医生取消收藏文章")
    @ResponseBody
    public BaseResultModel saveArticleCollection(
            @ApiParam(name = "articleId",value = "文章id")@RequestParam(value = "articleId")String articleId,
            @ApiParam(name = "userId",value = "用户id")@RequestParam(value = "userId")String userId,
            @ApiParam(name = "userType",value = "1医生2居民")@RequestParam(value = "userType")String userType) {
        int errCode = 0;
        try {
            //调用福州接口
            String url = "http://service.yihu.com:8085/WsPlatform/rest?Api=JkEdu.Behavior.cancelArticleCollection&" +
                    "Param={\"articleId\":\"" + articleId + "\",\"userId\":\"" + userId + "\",\"userType\":\"" + userType + "\"}";
            String jsonStr = HttpUtil.sendPost(url, "");
            //结果转map
            Map<String, Object> map = (Map<String, Object>) JSON.parseObject(jsonStr);
            System.out.println(map);
            if ("10000".equals(String.valueOf(map.get("Code")))) {
                return new BaseResultModel(10000,"成功!");
            } else {
                errCode = Integer.valueOf(String.valueOf(map.get("Code")));
                if (errCode == -10000) {
                    return new BaseResultModel(-10000, "没有找到相应的数据");
                }else{
                    return new BaseResultModel(errCode, ErrorStateMessage.getMessge(errCode));
                }
            }
        } catch (Exception e) {
            return new BaseResultModel(errCode, ErrorStateMessage.getMessge(errCode) + "," + e.getMessage());
        }
    }
}

+ 63 - 20
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/controller/patient/EduArticleController.java

@ -1,18 +1,29 @@
package com.yihu.wlyy.web.third.jkedu.controller.patient;
import com.yihu.wlyy.entity.jkedu.EduArticle;
import com.alibaba.fastjson.JSON;
import com.yihu.wlyy.service.app.sign.FamilyContractService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.third.jkedu.vo.ArticleModel;
import com.yihu.wlyy.web.third.jkedu.vo.CategoryModel;
import com.yihu.wlyy.web.third.jkedu.vo.base.ResultListModel;
import com.yihu.wlyy.web.third.jkedu.vo.state.ErrorStateMessage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONArray;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * Created by Administrator on 2017/9/30.
@ -20,27 +31,59 @@ import java.util.List;
@Controller
@Api(description = "居民端--健康宣教文章")
@RequestMapping(value = "/wlyygc/patient/jkedu",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class EduArticleController {
public class EduArticleController extends BaseController{
    @Autowired
    private FamilyContractService familyContractService;
    @Autowired
    private com.yihu.wlyy.util.HttpUtil HttpUtil;
    /*@RequestMapping("/getDoctorArticalList")
    @ApiOperation("获取卫计委认证文章+医生发表未认证文章")
    public ResultListModel<List<EduArticle>> getDoctorArticalList(
    @RequestMapping(value = "/getDoctorArticalList",method = RequestMethod.POST)
    @ApiOperation("获取医生主页中的文章列表(获取卫计委认证文章+医生发表未认证文章)")
    @ResponseBody
    public ResultListModel<List<ArticleModel>> getDoctorArticalList(
            @ApiParam(name = "articleTitle",value = "文章标题",required = false)@RequestParam(value = "articleTitle",required = false)String articleTitle,
            @ApiParam(name = "articleState",value = "文章标题",required = false)@RequestParam(value = "articleTitle",required = false)String articleState,
            @ApiParam(name = "firstLevelCategoryId",value = "文章标题",required = false)@RequestParam(value = "articleTitle",required = false)String firstLevelCategoryId,
            @ApiParam(name = "pageIndex",value = "文章标题",required = false)@RequestParam(value = "articleTitle",required = false)String pageIndex,
            @ApiParam(name = "pageSize",value = "文章标题",required = false)@RequestParam(value = "articleTitle",required = false)String pageSize,
            @ApiParam(name = "userId",value = "文章标题",required = false)@RequestParam(value = "articleTitle",required = false)String userId){
    }*/
            @ApiParam(name = "firstLevelCategoryId",value = "一级类别ID ,多个逗号隔开",required = false)@RequestParam(value = "firstLevelCategoryId",required = false)String firstLevelCategoryId,
            @ApiParam(name = "pageIndex",value = "起始页数 0开始,默认0",required = false)@RequestParam(value = "pageIndex",required = false)String pageIndex){
        int errCode =0;
        int pageNo=0;
        int pageSize=5;
        try {
            //调用福州接口
            String url ="http://service.yihu.com:8085/WsPlatform/rest?Api=JkEdu.Article.getDoctorArticalList&Param={\"articleState\":\"1\",\"pageSize\":\""+pageSize+"\",";
            if(org.apache.commons.lang.StringUtils.isNotBlank(articleTitle)){
                url += "\"articleTitle\":\""+articleTitle+"\",";
            }
            if(org.apache.commons.lang.StringUtils.isNotBlank(firstLevelCategoryId)){
                url += "\"firstLevelCategoryId\":\""+firstLevelCategoryId+"\",";
            }
            if(org.apache.commons.lang.StringUtils.isNotBlank(pageIndex)){
                pageNo=Integer.valueOf(pageIndex);
                url += "\"pageIndex\":\""+pageNo+"\",";
            }
            /*if(StringUtils.isEmpty(userId)){
                userId=getRepUID();
            }*/
            url += "\"userId\":\""+getRepUID()+"\"}";
            String jsonStr = HttpUtil.sendPost(url,"");
            //结果转map
            Map<String,Object> map = (Map<String, Object>) JSON.parseObject(jsonStr);
            System.out.println(map);
            List<ArticleModel> list = new ArrayList<ArticleModel>();
            if("10000".equals(String.valueOf(map.get("Code")))){
                String result = String.valueOf(map.get("Result"));
                String resultStr = String.valueOf(result);
                JSONArray jsonArray = JSONArray.fromObject(resultStr);
                list = (List<ArticleModel>) JSONArray.toCollection(jsonArray, ArticleModel.class);//转换成列表
                return new ResultListModel(list);
            }else{
                errCode =Integer.valueOf(String.valueOf(map.get("Code")));
                return new ResultListModel(errCode, ErrorStateMessage.getMessge(errCode));
            }
        }catch (Exception e){
            e.printStackTrace();
            return new ResultListModel(errCode, ErrorStateMessage.getMessge(errCode)+","+e.getMessage());
        }
    @RequestMapping(value = "/getDoctorArticleList",method = RequestMethod.GET)
    @ApiOperation("获取医生主页中的文章列表")
    public ResultListModel<ArticleModel> getDoctorArticleList(
        @ApiParam(name = "keyWord",value = "搜索关键字",required = false)@RequestParam(value = "keyWord",required = false)String keyWord){
        //根据公众号的openid查询到和患者签约的医生code。
        //根据医生code查询这个医生的所有文章
        return  new ResultListModel();
    }
}

+ 364 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/vo/ArticleModel.java

@ -0,0 +1,364 @@
package com.yihu.wlyy.web.third.jkedu.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * Created by Administrator on 2017/9/29.
 */
@ApiModel(description = "公众号--医生健康文章")
public class ArticleModel {
    //文章ID
    @ApiModelProperty(value = "文章ID", required = false, access = "response")
    private String articleId;
    //文章标题
    @ApiModelProperty(value = "文章标题", required = false, access = "response")
    private String articleTitle;
    //文章内容
    @ApiModelProperty(value = "文章内容", required = false, access = "response")
    private String articleContent;
    //排序
    @ApiModelProperty(value = "文章排序", required = false, access = "response")
    private int articleOrder;
    //1、正常、2删除
    @ApiModelProperty(value = "文章状态", required = false, access = "response")
    private int articleState;
    //文章所属单位名称
    @ApiModelProperty(value = "文章所属单位名称", required = false, access = "response")
    private String orgName;
    //文章来源(填写发布人所在的机构)
    @ApiModelProperty(value = "文章来源", required = false, access = "response")
    private String articleSource;
    //文章所属单位ID
   // @ApiModelProperty(value = "文章ID", required = false, access = "response")
    //private String OgId;
    //1、重要、2紧急、3、一般
    @ApiModelProperty(value = "文章级别", required = false, access = "response")
    private int articlelevel;
    //封面图
    @ApiModelProperty(value = "封面图", required = false, access = "response")
    private String articleCover;
    //插入时间
    @ApiModelProperty(value = "插入时间", required = false, access = "response")
    private Date insertTime;
    //最后更新时间
    @ApiModelProperty(value = "最后更新时间", required = false, access = "response")
    private Date updateTime;
    //创建人
    @ApiModelProperty(value = "创建人", required = false, access = "response")
    private String operatorName;
    //创建人ID
    @ApiModelProperty(value = "创建人ID", required = false, access = "response")
    private String operatorId;
    //1级类别id
    @ApiModelProperty(value = "1级类别id", required = false, access = "response")
    private String firstLevelCategoryId;
    //1级类别名称
    @ApiModelProperty(value = "1级类别名称", required = false, access = "response")
    private String firstLevelCategoryName;
    //2级类别ID
    @ApiModelProperty(value = "2级类别ID", required = false, access = "response")
    private String secondLevelCategoryId;
    //2级类别名称
    @ApiModelProperty(value = "2级类别名称", required = false, access = "response")
    private String secondLevelCategoryName;
    //认证单位
    @ApiModelProperty(value = "认证单位", required = false, access = "response")
    private String authentication;
    //认证单位ID
    @ApiModelProperty(value = "认证单位ID", required = false, access = "response")
    private String authenticationId;
    //是否认证 1已认证2、未认证
    @ApiModelProperty(value = "是否认证", required = false, access = "response")
    private int isAuthentication;
    //1、视频 2、图文3、音频、 4 、精选问答
    @ApiModelProperty(value = "文章类型", required = false, access = "response")
    private String articleType;
    //操作人所在科室
    @ApiModelProperty(value = "操作人所在科室", required = false, access = "response")
    private String deptName;
    //等级职称
    @ApiModelProperty(value = "等级职称", required = false, access = "response")
    private String titleLevel;
    //操作人头像
    @ApiModelProperty(value = "操作人头像", required = false, access = "response")
    private String operatorImg;
    @ApiModelProperty(value = "浏览数", required = false, access = "response")
    private int browseNumbere;//浏览数
    @ApiModelProperty(value = "点赞数", required = false, access = "response")
    private int pointNumber;//点赞数
    @ApiModelProperty(value = "评论数", required = false, access = "response")
    private int commentNumber;//评论数
    @ApiModelProperty(value = "分享数", required = false, access = "response")
    private int shareNumber;//分享数
    @ApiModelProperty(value = "收藏数", required = false, access = "response")
    private int collectionNumber;//收藏数
    public String getArticleId() {
        return articleId;
    }
    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }
    public String getArticleTitle() {
        return articleTitle;
    }
    public void setArticleTitle(String articleTitle) {
        this.articleTitle = articleTitle;
    }
    public String getArticleContent() {
        return articleContent;
    }
    public void setArticleContent(String articleContent) {
        this.articleContent = articleContent;
    }
    public int getArticleOrder() {
        return articleOrder;
    }
    public void setArticleOrder(int articleOrder) {
        this.articleOrder = articleOrder;
    }
    public int getArticleState() {
        return articleState;
    }
    public void setArticleState(int articleState) {
        this.articleState = articleState;
    }
    public String getOrgName() {
        return orgName;
    }
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }
    public String getArticleSource() {
        return articleSource;
    }
    public void setArticleSource(String articleSource) {
        this.articleSource = articleSource;
    }
    public int getArticlelevel() {
        return articlelevel;
    }
    public void setArticlelevel(int articlelevel) {
        this.articlelevel = articlelevel;
    }
    public String getArticleCover() {
        return articleCover;
    }
    public void setArticleCover(String articleCover) {
        this.articleCover = articleCover;
    }
    public Date getInsertTime() {
        return insertTime;
    }
    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getOperatorName() {
        return operatorName;
    }
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }
    public String getOperatorId() {
        return operatorId;
    }
    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }
    public String getFirstLevelCategoryId() {
        return firstLevelCategoryId;
    }
    public void setFirstLevelCategoryId(String firstLevelCategoryId) {
        this.firstLevelCategoryId = firstLevelCategoryId;
    }
    public String getFirstLevelCategoryName() {
        return firstLevelCategoryName;
    }
    public void setFirstLevelCategoryName(String firstLevelCategoryName) {
        this.firstLevelCategoryName = firstLevelCategoryName;
    }
    public String getSecondLevelCategoryId() {
        return secondLevelCategoryId;
    }
    public void setSecondLevelCategoryId(String secondLevelCategoryId) {
        this.secondLevelCategoryId = secondLevelCategoryId;
    }
    public String getSecondLevelCategoryName() {
        return secondLevelCategoryName;
    }
    public void setSecondLevelCategoryName(String secondLevelCategoryName) {
        this.secondLevelCategoryName = secondLevelCategoryName;
    }
    public String getAuthentication() {
        return authentication;
    }
    public void setAuthentication(String authentication) {
        this.authentication = authentication;
    }
    public String getAuthenticationId() {
        return authenticationId;
    }
    public void setAuthenticationId(String authenticationId) {
        this.authenticationId = authenticationId;
    }
    public int getIsAuthentication() {
        return isAuthentication;
    }
    public void setIsAuthentication(int isAuthentication) {
        this.isAuthentication = isAuthentication;
    }
    public String getArticleType() {
        return articleType;
    }
    public void setArticleType(String articleType) {
        this.articleType = articleType;
    }
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    public String getTitleLevel() {
        return titleLevel;
    }
    public void setTitleLevel(String titleLevel) {
        this.titleLevel = titleLevel;
    }
    public String getOperatorImg() {
        return operatorImg;
    }
    public void setOperatorImg(String operatorImg) {
        this.operatorImg = operatorImg;
    }
    public int getBrowseNumbere() {
        return browseNumbere;
    }
    public void setBrowseNumbere(int browseNumbere) {
        this.browseNumbere = browseNumbere;
    }
    public int getPointNumber() {
        return pointNumber;
    }
    public void setPointNumber(int pointNumber) {
        this.pointNumber = pointNumber;
    }
    public int getCommentNumber() {
        return commentNumber;
    }
    public void setCommentNumber(int commentNumber) {
        this.commentNumber = commentNumber;
    }
    public int getShareNumber() {
        return shareNumber;
    }
    public void setShareNumber(int shareNumber) {
        this.shareNumber = shareNumber;
    }
    public int getCollectionNumber() {
        return collectionNumber;
    }
    public void setCollectionNumber(int collectionNumber) {
        this.collectionNumber = collectionNumber;
    }
}

+ 69 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/vo/base/ResultBatchModel.java

@ -0,0 +1,69 @@
package com.yihu.wlyy.web.third.jkedu.vo.base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by chenweida on 2017/8/17.
 */
@ApiModel("返回实体")
public class ResultBatchModel extends BaseResultModel {
    @ApiModelProperty(value = "成功数目", required = false, access = "response")
    private Integer successNum = 0;
    @ApiModelProperty(value = "失败数目", required = false, access = "response")
    private Integer errorNum = 0;
    @ApiModelProperty(value = "失败List", required = false, access = "response")
    private List<String> errorList = new ArrayList<>();
    public ResultBatchModel(Integer success, Integer error, List<String> errorList) {
        this.successNum = success;
        this.errorNum = error;
        this.errorList = errorList;
    }
    public ResultBatchModel(Integer code, String message, Integer success, Integer error, List<String> errorList) {
        super(code, message);
        this.successNum = success;
        this.errorNum = error;
        this.errorList = errorList;
    }
    public ResultBatchModel() {
    }
    public ResultBatchModel(Integer status, String message) {
        super(status, message);
    }
    public Integer getSuccessNum() {
        return successNum;
    }
    public void setSuccessNum(Integer successNum) {
        this.successNum = successNum;
    }
    public Integer getErrorNum() {
        return errorNum;
    }
    public void setErrorNum(Integer errorNum) {
        this.errorNum = errorNum;
    }
    public List<String> getErrorList() {
        return errorList;
    }
    public void setErrorList(List<String> errorList) {
        this.errorList = errorList;
    }
}

+ 39 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/vo/base/ResultOneModel.java

@ -0,0 +1,39 @@
package com.yihu.wlyy.web.third.jkedu.vo.base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * Created by chenweida on 2017/8/17.
 * 对外放回的实体
 */
@ApiModel("返回的实体类")
public class ResultOneModel<T> extends BaseResultModel {
    @ApiModelProperty(value = "返回数据", required = false, access = "response")
    private T result;
    public T getResult() {
        return result;
    }
    public void setResult(T result) {
        this.result = result;
    }
    public ResultOneModel(T result) {
        this.result = result;
    }
    public ResultOneModel() {
    }
    public ResultOneModel(Integer code, String message) {
        super(code, message);
    }
    public ResultOneModel(Integer status, String message, T result) {
        super(status, message);
        this.result = result;
    }
}

+ 67 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/vo/base/ResultPageListModel.java

@ -0,0 +1,67 @@
package com.yihu.wlyy.web.third.jkedu.vo.base;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
/**
 * Created by chenweida on 2017/8/17.
 */
public class ResultPageListModel<T> extends BaseResultModel {
    @ApiModelProperty(value = "当前页", required = false, access = "response")
    private Integer page;
    @ApiModelProperty(value = "每页大小", required = false, access = "response")
    private Integer pageSize;
    @ApiModelProperty(value = "总数", required = false, access = "response")
    private Integer allNum;
    @ApiModelProperty(value = "返回数据", required = false, access = "response")
    private List<T> result;
    public List<T> getResult() {
        return result;
    }
    public void setResult(List<T> result) {
        this.result = result;
    }
    public Integer getPage() {
        return page;
    }
    public void setPage(Integer page) {
        this.page = page;
    }
    public Integer getPageSize() {
        return pageSize;
    }
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
    public ResultPageListModel(Integer page, Integer pageSize, Integer allNum, List<T> result) {
        this.page = page;
        this.pageSize = pageSize;
        this.result = result;
        this.allNum = allNum;
    }
    public ResultPageListModel() {
    }
    public ResultPageListModel(Integer status, String message) {
        super(status, message);
    }
    public Integer getAllNum() {
        return allNum;
    }
    public void setAllNum(Integer allNum) {
        this.allNum = allNum;
    }
}

+ 11 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/vo/state/ErrorStateMessage.java

@ -18,7 +18,10 @@ public class ErrorStateMessage {
    public  final  static  String err_20010="验证不通过:timestamp参数不能为空";
    public  final  static  String err_29999="远程过程调用(RPC)异常";
    public  final  static  String err_30000="响应超时";
    public  final  static  String fail="请求成功";
    public  final  static  String fail="请求失败";
    public  final  static  String err_f_10000="必填参数异常";
    public  final  static  String err_f_14444="程序异常";
    public  final  static  String err_f_10001="收藏异常";
@ -68,7 +71,13 @@ public class ErrorStateMessage {
                message = err_30000;
                break;
            case -10000:
                message = fail;
                message = err_f_10000;
                break;
            case -14444:
                message = err_f_14444;
                break;
            case -10001:
                message = err_f_10001;
                break;
        }
        return message;