param

【后台管理系统】—— Ant Design Pro组件使用(二)

我是研究僧i 提交于 2019-12-05 07:18:18
一、关联表单项 - 动态增删输入框Input 封装子组件 class ParamsInputArray extends React.Component{ constructor(props){ super(props); } // 改变一组input输入框中的key值和value值 handleChange = (paramType, index) => { const { onChange, value={} } = this.props; if(event && event.target && event.target.value){ let newValue = {...value}; if(paramType == 'key'){ newValue.key = event.target.value }else{ newValue.value = event.target.value } // 调用父级props传来的onChange事件 // 将newValue对象存入数组对应index的位置 onChange(newValue, index) } } render() { const { value={}, keys, index, add, remove} = this.props; return ( <Row gutter={8}> <Col span={5}>

模拟Http请求

℡╲_俬逩灬. 提交于 2019-12-05 07:02:49
前言:有时需要对信息进行保密,在后台将数据传递给其他接口,再返回其他接口的返回数据 比如小程序上获取openId,需要将AppId、AppSeret等数据传递给特定的微信接口 1.Http请求工具类 import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.Reader; import java.net.HttpURLConnection; import java.net.ProtocolException; import java.net.URL; import java.util.Map; public class HttpUtil { /** * 请求类型: GET */ public final static String GET = "GET"; /** * 请求类型: POST */ public final static String POST = "POST"; /** * 模拟Http Get请求 * @param urlStr * 请求路径 * @param paramMap * 请求参数 * @return * @throws Exception */

LogHelper

拈花ヽ惹草 提交于 2019-12-05 06:40:19
public class LogHelper { static string strLogCOMPath = Directory.GetCurrentDirectory() + "\\Log\\" + DateTime.Now.ToString("yyyyMMdd") + "LogJH.txt"; static string strLogErrorPath = Directory.GetCurrentDirectory() + "\\Log\\" + DateTime.Now.ToString("yyyyMMdd") + "ErrorLog.txt"; /// <summary> /// 记录交互日志 /// </summary> /// <param name="strLogContent">要记录的内容</param> /// <param name="bWriteFirstLine">是否要添加第一行日志title</param> /// <param name="strConentTitle">title内容</param> public static void AddCOMLog(string strLogContent, bool bWriteFirstLine, string strConentTitle) { string time1; time1 =

微服务架构四大金刚利器

三世轮回 提交于 2019-12-05 06:40:04
概述 互联网应用发展到今天,从单体应用架构到SOA以及今天的微服务,随着微服务化的不断升级进化,服务和服务之间的稳定性变得越来越重要,分布式系统之所以复杂,主要原因是分布式系统需要考虑到网络的延时和不可靠,微服务很重要的一个特质就是需要保证服务幂等,保证幂等性很重要的前提需要分布式锁控制并发,同时缓存、降级和限流是保护微服务系统运行稳定性的三大利器。 随着业务不断的发展,按业务域的划分子系统越来越多,每个业务系统都需要缓存、限流、分布式锁、幂等工具组件,distributed-tools组件(暂未开源)正式包含了上述分布式系统所需要的基础功能组件。 distributed-tools组件基于tair、redis分别提供了2个springboot starter,使用起来非常简单。 以使用缓存使用redis为例,application.properties添加如下配置 redis.extend.hostName=127.0.0.1 redis.extend.port=6379 redis.extend.password=pwdcode redis.extend.timeout=10000 redis.idempotent.enabled=true 接下来的篇幅,重点会介绍一下缓存、限流、分布式锁、幂等的使用方式。 缓存 缓存的使用可以说无处不在,从应用请求的访问路径来看,用户user

JAVA文档注释标签

给你一囗甜甜゛ 提交于 2019-12-05 06:24:23
1 常用Java注释标签(Java comment tags) @author 作者 @param 输入参数的名称 说明 @return 输出参数说明 @since JDK版本 @version 版本号 @see 链接目标 @throws 异常 @deprecated 解释 @link 链接地址 2 Java注释的使用顺序 3 简单常见的HTML嵌入 4 HTML嵌入注释范例 5 参考文档 1 常用Java 注释标签(Java comment tags) @author 作者 适用范围:文件、类、方法 (*多个作者使用多个@author标签标识,java doc中显示按输入时间顺序罗列。) 例:* @author Leo. Yao @param 输入参数的名称 说明 适用范围:方法 例:* @param str the String用来存放输出信息。 @Param:用来在DAO层中声明参数,如:List<News> selectByUserIdAndOffset(@Param("userId") int userId, @Param("offset") int offset, @Param("limit") int limit); 当使用了使用@Param注解来声明参数时,如果使用 #{} 或 ${} 的方式都可以。 @Select("select entity from

中国网建发送验证码

泄露秘密 提交于 2019-12-05 05:03:48
首先要设置中国网建的签名(没设置是不能用的): 之后拿发送时需要的 uid 和 key 接下来就可以开始写代码了 把这两个方法写到common.php文件中,我用的是 fastadmin 框架(thinkphp框架都可以写到common里),可以在其他地方直接调用 if (!function_exists('sendSms')) { /** * 发短信 * @param $mobile int 手机号码 * @param $content string 短信内容 * @return array */ function sendSms($mobile,$content){ $uid = '******'; //上面拿到的 uid $pwd = '*********'; //上面拿到的 key $url='http://utf8.sms.webchinese.cn/?Uid='.$uid.'&Key='.$pwd.'&smsMob='.$mobile.'&smsText='.$content; $string = smsCURL($url); if ($string>0) { //发送成功 $data=array( 'code'=>1, 'msg'=>"短信发送成功", ); }else{ $data=array( 'code'=>0, 'msg'=>"短信发送失败", ); }

Sending/Receiving a string through PostMessage

≡放荡痞女 提交于 2019-12-05 04:25:34
Although there are already a few resources online that address this rough topic, I still haven't found an answer that works for me. I desire to have full communication between my VB.net process and my C++ process. I would like to be able to send a string to and from the C++ process, but for the time being I need to achieve: Sending a string to the C++ process, and handling it. This creates a few points that I am uncertain on, but I'll try to keep this as simple as possible... Using the following function declaration in VB ; Declare Function PostMessage Lib "user32" Alias "PostMessageA" ( _

SpringDataJPA对SimpleJpaRepository/JPARepository返回结果的进一步处理

北城余情 提交于 2019-12-05 03:57:45
package com.yb.fw.core.helper; public enum Op { LIKE,// like NOTLIKE,// notlike EQ,// = NOTEQ,// != GT, // > GTEQ,//>= LT,//< LTEQ,//<= NULL,// is null NOTNULL,// is not null IN,// in NOTIN,// not in } package com.yb.fw.core.dao; import java.io.Serializable; import java.util.List; import java.util.Map; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import

SpringData系列四 @Query注解及@Modifying注解

荒凉一梦 提交于 2019-12-05 03:49:06
SpringData系列四 @Query注解及@Modifying注解     @Query注解查询适用于所查询的数据无法通过关键字查询得到结果的查询。这种查询可以摆脱像关键字查询那样的约束,将查询直接在相应的接口方法中声明,结构更为清晰,这是Spring Data的特有实现。 索引参数与命名参数     1、索引参数如下所示,索引值从1开始,查询中 "?X" 个数需要与方法定义的参数个数相一致,并且顺序也要一致。      1 @Query("SELECT p FROM Person p WHERE p.lastName = ?1 AND p.email = ?2") 2 List<Person> testQueryAnnotationParams1(String lastName, String email);     注释:上面代码中的?1,?2表示参数的占位符,需要和方法中所传递的参数顺序一致。X是从1开始。     2、命名参数(推荐使用此方式):可以定义好参数名,赋值时使用@Param("参数名"),而不用管顺序。 1 // 为@Query注解传递参数的方式1:命名参数 2 @Query("SELECT p FROM Person p WHERE p.lastName = :lastName AND p.email = :email") 3 List<Person>

PHP实现微信提现(企业付款到零钱)

丶灬走出姿态 提交于 2019-12-05 03:07:09
怎么开通企业付款到零钱? 有的商户号的产品中心是没有这个功能的,不过,该功能的pid(product id)是5,只要随便进去某一个产品,在地址栏把pid改为5。 即可进入该功能页面,进行开通,不过要满足条件。 用户提现代码: 1 //用户微信提现 2 private function withdrawals_weixin($id){ 3 $falg = M('withdrawals')->where(['id'=>$id])->find(); 4 $openid = M('users')->where('user_id', $falg['user_id'])->value('openid'); 5 $data['openid'] = $openid; 6 $data['pay_code'] = $falg['id'].$falg['user_id']; 7 $data['desc'] = '提现ID'.$falg['id']; 8 if($falg['taxfee'] >= $falg['money']){ 9 return array('status'=>1, 'msg'=>"提现额度必须大于手续费!" ); 10 }else{ 11 $data['money'] = bcsub($falg['money'], $falg['taxfee'], 2); 12 } 13