提交 81f42051 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 3e6ee00f
package cn.ibizlab.util.client;
import com.alibaba.fastjson.JSONArray;
import cn.ibizlab.util.domain.MsgBody;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;
......@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
public class IBZNotifyFallback implements IBZNotifyFeignClient {
@Override
public Boolean SendMsg(JSONObject msg) {
public Boolean sendMsg(MsgBody msg) {
return null;
}
......@@ -16,4 +16,19 @@ public class IBZNotifyFallback implements IBZNotifyFeignClient {
public Boolean createMsgTemplate(JSONObject template) {
return null;
}
@Override
public Boolean sendDingTalkLinkMsg(MsgBody msg) {
return null;
}
@Override
public String createDingTalkWorkRecord(MsgBody msg) {
return null;
}
@Override
public Boolean finishDingTalkWorkRecord(String msgId) {
return null;
}
}
package cn.ibizlab.util.client;
import cn.ibizlab.util.domain.MsgBody;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
@FeignClient(value = "${ibiz.ref.service.notify:ibznotify-api}",fallback = IBZNotifyFallback.class)
@FeignClient(value = "${ibiz.ref.service.notify:ibznotify-api}",contextId = "notify",fallback = IBZNotifyFallback.class)
public interface IBZNotifyFeignClient
{
@RequestMapping(method = RequestMethod.POST,value = "/SendMsg")
Boolean SendMsg(@RequestBody JSONObject msg);
@RequestMapping(method = RequestMethod.POST,value = "/notify/sendmsg")
Boolean sendMsg(@RequestBody MsgBody msg);
@RequestMapping(method = RequestMethod.POST,value = "/createMsgTemplate")
@RequestMapping(method = RequestMethod.POST,value = "/notify/createmsgtempl")
Boolean createMsgTemplate(@RequestBody JSONObject template);
@RequestMapping(method = RequestMethod.POST,value = "/notify/dingtalk/sendlinkmsg")
Boolean sendDingTalkLinkMsg(@RequestBody MsgBody msg);
@RequestMapping(method = RequestMethod.POST,value = "/notify/dingtalk/createworkrecord")
String createDingTalkWorkRecord(@RequestBody MsgBody msg);
@RequestMapping(method = RequestMethod.POST,value = "/notify/dingtalk/finishworkrecord/{msgid}")
Boolean finishDingTalkWorkRecord(@PathVariable("msgid") String msgId);
}
......@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import java.util.Map;
import java.util.Set;
@FeignClient(value = "${ibiz.ref.service.ou:ibzou-api}",fallback = IBZOUFallback.class)
@FeignClient(value = "${ibiz.ref.service.ou:ibzou-api}",contextId = "ou",fallback = IBZOUFallback.class)
public interface IBZOUFeignClient
{
/**
......
package cn.ibizlab.util.client;
import cn.ibizlab.util.domain.PayTrade;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;
@Component
public class IBZPayFallback implements IBZPayFeignClient {
@Override
public JSONObject preCreate(PayTrade trade) {
return null;
}
@Override
public JSONObject query(PayTrade trade) {
return null;
}
@Override
public JSONObject cancel(PayTrade trade) {
return null;
}
@Override
public String pagePay(PayTrade trade) {
return null;
}
}
package cn.ibizlab.util.client;
import cn.ibizlab.util.domain.PayTrade;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@FeignClient(value = "${ibiz.ref.service.pay:ibzpay-api}",contextId = "pay",fallback = IBZPayFallback.class)
public interface IBZPayFeignClient
{
@RequestMapping(method = RequestMethod.POST,value = "/pay/trade/precreate")
JSONObject preCreate(@RequestBody PayTrade trade);
@RequestMapping(method = RequestMethod.POST,value = "/pay/trade/query")
JSONObject query(@RequestBody PayTrade trade);
@RequestMapping(method = RequestMethod.POST,value = "/pay/trade/cancel")
JSONObject cancel(@RequestBody PayTrade trade);
@RequestMapping(method = RequestMethod.POST,value = "/pay/trade/pagepay")
String pagePay(@RequestBody PayTrade trade);
}
......@@ -7,7 +7,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
@FeignClient(value = "${ibiz.ref.service.uaa:ibzuaa-api}",fallback = IBZUAAFallback.class)
@FeignClient(value = "${ibiz.ref.service.uaa:ibzuaa-api}",contextId = "uaa",fallback = IBZUAAFallback.class)
public interface IBZUAAFeignClient
{
/**
......
......@@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
@FeignClient(value = "${ibiz.ref.service.wf:ibzwf-api}",fallback = IBZWFFallback.class)
@FeignClient(value = "${ibiz.ref.service.wf:ibzwf-api}",contextId = "wf",fallback = IBZWFFallback.class)
public interface IBZWFFeignClient
{
@RequestMapping(method = RequestMethod.GET, value = "/{system}-app-{appname}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/tasks")
......
package cn.ibizlab.util.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 消息对象
*/
@Data
public class MsgBody{
/**
* 接收用户
*/
@JSONField(name = "to_users")
@JsonProperty("to_users")
private String toUsers;
/**
* 标题
*/
@JSONField(name = "subject")
@JsonProperty("subject")
private String subject;
/**
* 内容
*/
@JSONField(name = "content")
@JsonProperty("content")
private String content;
/**
* 类型
*/
@JSONField(name = "msg_type")
@JsonProperty("msg_type")
private Integer msgType;
/**
* 模板标识
*/
@JSONField(name = "template_id")
@JsonProperty("template_id")
private String templateId;
/**
* 模板参数
*/
@JSONField(name = "template_params")
@JsonProperty("template_params")
private String templateParams;
/**
* 消息链接
*/
@JSONField(name = "msg_link")
@JsonProperty("msg_link")
private String msgLink;
/**
* 消息链接(pc)
*/
@JSONField(name = "msg_link_pc")
@JsonProperty("msg_link_pc")
private String msgLinkPc;
}
package cn.ibizlab.util.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* 实体[支付交易]
*/
@Data
public class PayTrade{
/**
* 订单标题
*/
@TableField(value = "subject")
@JSONField(name = "subject")
@JsonProperty("subject")
private String subject;
/**
* 订单金额
*/
@JSONField(name = "total_amount")
@JsonProperty("total_amount")
private String totalAmount;
/**
* 支付类型
*/
@JSONField(name = "trade_type")
@JsonProperty("trade_type")
private String tradeType;
/**
* 订单号
*/
@JSONField(name = "out_trade_no")
@JsonProperty("out_trade_no")
private String outTradeNo;
/**
* 应用标识
*/
@JSONField(name = "app_id")
@JsonProperty("app_id")
private String appId;
/**
* 支付平台接入标识
*/
@JSONField(name = "access_id")
@JsonProperty("access_id")
private String accessId;
}
......@@ -22,9 +22,9 @@ spring:
max-file-size: 100MB
max-request-size: 100MB
datasource:
username: root
password: 'root'
url: jdbc:mysql://127.0.0.1:3306/ibzuaa?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
username: a_A_5d9d78509
password: '@6dEfb3@'
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
driver-class-name: com.mysql.jdbc.Driver
filters: stat,wall,log4j2
#配置初始化大小/最小/最大
......@@ -45,7 +45,7 @@ spring:
pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
isSyncDBSchema: false
defaultSchema: root
defaultSchema: a_A_5d9d78509
conf: classpath:liquibase/master.xml
#Mybatis-plus配置
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册