浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangzhinan 5 年之前
父节点
当前提交
fc80ccbc95

+ 27 - 22
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrgDO.java

@ -11,7 +11,7 @@ import java.util.Date;
/**
* 机构信息(医院)实体
* 机构信息(医院)
*
* @author Administrator on  2018年09月05日
*
@ -161,26 +161,26 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
     */
    private String winNo;
	
	/**
	 * 排序
	 */
	private Integer sort;
    public BaseOrgDO() {
    }
    public BaseOrgDO(String provinceCode, String provinceName, String cityCode, String cityName, String townCode, String townName, String code, String name ){
	    this.provinceCode = provinceCode;
	    this.provinceName = provinceName;
	    this.cityCode = cityCode;
	    this.cityName = cityName;
	    this.townCode = townCode;
	    this.townName = townName;
	    this.code = code;
	    this.name = name;
    }
//	/**
//	 * 排序
//	 */
//	private Integer sort;
//    public BaseOrgDO() {
//    }
//
//    public BaseOrgDO(String provinceCode, String provinceName, String cityCode, String cityName, String townCode, String townName, String code, String name ){
//	    this.provinceCode = provinceCode;
//	    this.provinceName = provinceName;
//	    this.cityCode = cityCode;
//	    this.cityName = cityName;
//	    this.townCode = townCode;
//	    this.townName = townName;
//	    this.code = code;
//	    this.name = name;
//    }
    @Column(name = "code")
    public String getCode() {
        return code;
    }
@ -221,6 +221,7 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
        this.townCode = townCode;
    }
    @Column(name = "province_name")
    public String getProvinceName() {
        return provinceName;
    }
@ -229,6 +230,7 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
        this.provinceName = provinceName;
    }
    @Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }
@ -237,6 +239,7 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
        this.cityName = cityName;
    }
    @Column(name = "town_name")
    public String getTownName() {
        return townName;
    }
@ -245,6 +248,7 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
        this.townName = townName;
    }
    @Column(name = "street_code")
    public String getStreetCode() {
        return streetCode;
    }
@ -253,6 +257,7 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
        this.streetCode = streetCode;
    }
    @Column(name = "street_name")
    public String getStreetName() {
        return streetName;
    }
@ -390,7 +395,7 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
        this.del = del;
    }
    @Column(name = "level")
    @Column(name = "org_level")
    public Integer getLevel() {
        return level;
    }

+ 131 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/enterprise/EnterpriseController.java

@ -0,0 +1,131 @@
package com.yihu.jw.hospital.endpoint.enterprise;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.wechat.enterprise.EnterpriseService;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Trick on 2020/2/9.
 */
@RestController
@RequestMapping(value ="/enterprise")
@Api(value = "企业号相关", description = "企业号相关", tags = {"企业号相关"})
public class EnterpriseController extends EnvelopRestEndpoint {
    @Autowired
    private EnterpriseService enterpriseService;
    @PostMapping(value = "/sendTWMes")
    @ApiOperation(value = "发送图文消息")
    public Envelop sendTWMes(
            @ApiParam(name = "enterpriseId", value = "企业id", required = true)
            @RequestParam(value = "enterpriseId") String enterpriseId,
            @ApiParam(name = "mobile", value = "手机号", required = true)
            @RequestParam(value = "mobile")String mobile,
            @ApiParam(name = "title", value = "标题", required = true)
            @RequestParam(value = "title")String title,
            @ApiParam(name = "description", value = "描述", required = true)
            @RequestParam(value = "description")String description,
            @ApiParam(name = "url", value = "跳转链接", required = true)
            @RequestParam(value = "url")String url) throws Exception{
        return success(enterpriseService.sendTWMesBymobile( enterpriseId, mobile, title, description, url));
    }
    @PostMapping(value = "/sendTWMesByDoctor")
    @ApiOperation(value = "发送图文消息")
    public Envelop sendTWMesByDoctor(
            @ApiParam(name = "enterpriseId", value = "企业id", required = true)
            @RequestParam(value = "enterpriseId") String enterpriseId,
            @ApiParam(name = "doctor", value = "医生code", required = true)
            @RequestParam(value = "doctor")String doctor,
            @ApiParam(name = "title", value = "标题", required = true)
            @RequestParam(value = "title")String title,
            @ApiParam(name = "description", value = "描述", required = true)
            @RequestParam(value = "description")String description,
            @ApiParam(name = "url", value = "跳转链接", required = true)
            @RequestParam(value = "url")String url) throws Exception{
        return success(enterpriseService.sendTWMesByDoctor( enterpriseId, doctor, title, description, url));
    }
    @PostMapping(value = "/sendMKMesByDoctor")
    @ApiOperation(value = "发送MK消息")
    public Envelop sendMKMesByDoctor(
            @ApiParam(name = "enterpriseId", value = "企业id", required = true)
            @RequestParam(value = "enterpriseId") String enterpriseId,
            @ApiParam(name = "doctor", value = "医生code", required = true)
            @RequestParam(value = "doctor")String doctor,
            @ApiParam(name = "content", value = "描述", required = true)
            @RequestParam(value = "content")String content) throws Exception{
        return success(enterpriseService.sendMKMesByDoctor(enterpriseId,doctor,content));
    }
    @PostMapping(value = "/sendMKMesByMobile")
    @ApiOperation(value = "发送MK消息")
    public Envelop sendMKMesByMobile(
            @ApiParam(name = "enterpriseId", value = "企业id", required = true)
            @RequestParam(value = "enterpriseId") String enterpriseId,
            @ApiParam(name = "mobile", value = "手机号", required = true)
            @RequestParam(value = "mobile")String mobile,
            @ApiParam(name = "content", value = "描述", required = true)
            @RequestParam(value = "content")String content) throws Exception{
        return success(enterpriseService.sendMKMesByMobile(enterpriseId,mobile,content));
    }
    @PostMapping(value = "/sendXCXMesByDoctor")
    @ApiOperation(value = "发送小程序消息")
    public Envelop sendXCXMesByDoctor(@ApiParam(name = "enterpriseId", value = "企业id", required = true)
                                          @RequestParam(value = "enterpriseId")String enterpriseId,
                                      @ApiParam(name = "doctor", value = "医生手机号", required = true)
                                          @RequestParam(value = "doctor")String doctor,
                                      @ApiParam(name = "appid", value = "appid", required = true)
                                          @RequestParam(value = "appid")String appid,
                                      @ApiParam(name = "page", value = "跳转地址", required = true)
                                          @RequestParam(value = "page")String page,
                                      @ApiParam(name = "title", value = "标题", required = true)
                                          @RequestParam(value = "title")String title,
                                      @ApiParam(name = "description", value = "描述", required = true)
                                          @RequestParam(value = "description")String description,
                                      @ApiParam(name = "emphasis_first_item", value = "是否首行放大", required = true)
                                          @RequestParam(value = "emphasis_first_item")Boolean emphasis_first_item,
                                      @ApiParam(name = "content_item", value = "内容JSON数组字符串", required = true)
                                          @RequestParam(value = "content_item")String content_item) throws Exception{
        return success(enterpriseService.sendXCXMesByDoctor(enterpriseId,doctor,appid,page,title,description,emphasis_first_item,content_item));
    }
    @PostMapping(value = "/sendXCXMesByMobile")
    @ApiOperation(value = "发送小程序消息")
    public Envelop sendXCXMesByMobile(@ApiParam(name = "enterpriseId", value = "企业id", required = true)
                                          @RequestParam(value = "enterpriseId")String enterpriseId,
                                      @ApiParam(name = "mobile", value = "手机号", required = true)
                                      @RequestParam(value = "mobile")String mobile,
                                      @ApiParam(name = "appid", value = "appid", required = true)
                                          @RequestParam(value = "appid")String appid,
                                      @ApiParam(name = "page", value = "跳转地址", required = true)
                                          @RequestParam(value = "page")String page,
                                      @ApiParam(name = "title", value = "标题", required = true)
                                          @RequestParam(value = "title")String title,
                                      @ApiParam(name = "description", value = "描述", required = true)
                                          @RequestParam(value = "description")String description,
                                      @ApiParam(name = "emphasis_first_item", value = "是否首行放大", required = true)
                                          @RequestParam(value = "emphasis_first_item")Boolean emphasis_first_item,
                                      @ApiParam(name = "content_item", value = "内容JSON数组字符串", required = true)
                                          @RequestParam(value = "content_item")String content_item) throws Exception{
        return success(enterpriseService.sendXCXMesByMobile(enterpriseId,mobile,appid,page,title,description,emphasis_first_item,content_item));
    }
    @PostMapping(value = "/saveAllUser")
    @ApiOperation(value = "拉取用户信息")
    public Envelop saveAllUser(
            @ApiParam(name = "enterpriseId", value = "企业id", required = true)
            @RequestParam(value = "enterpriseId") String enterpriseId) throws Exception{
        return success(enterpriseService.saveAllUser(enterpriseId));
    }
}