摘要: publie Object getaddress(){ List<MemberAddress> memberAddressList = new ArrayList<MemberAddress>(); try { // 通过memberId查询用户所有地址 memberAddressList = me 阅读全文
posted @ 2019-01-11 23:36 qqzhulu 阅读(1054) 评论(0) 推荐(0) 编辑
摘要: public Object cycle(){ private Map<String, Long> userTicks = new HashMap<String, Long>(); String memberId = member.getId(); if (userTicks.containsKey( 阅读全文
posted @ 2019-01-10 23:14 qqzhulu 阅读(320) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { double a = 26765; int b = 45676; double c = a/b; double d = a/b/1.000; double e = a/1000.00; String result = 阅读全文
posted @ 2019-01-09 21:28 qqzhulu 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 1、controller 层: @RequestMapping(value = "v2/member/blog/cancelBlogShield")//取消屏蔽别人的帖子 public Object cancelBlogShield(@RequestParam String blogId, Http 阅读全文
posted @ 2019-01-08 20:30 qqzhulu 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1、数字a位1为1时,改为0,a&(~1) 例: 5 & (~!)=4 即101 & (110) →100; 2、数字a位1为0时,改为1 ,a | (1) 例:4|(1)=5 即100 |(001)→101; 3、选数字a(i)位1位3皆为1时,a(i) & 5 == 5 例: 7 & 5 == 阅读全文
posted @ 2019-01-07 22:27 qqzhulu 阅读(173) 评论(0) 推荐(0) 编辑
摘要: controller层: public class Login{ public String confirmLogin(HttpServletRequest request) { Member member = memberService.checkIdAndToken(request); if(m 阅读全文
posted @ 2019-01-04 23:18 qqzhulu 阅读(443) 评论(0) 推荐(0) 编辑
摘要: public class XmltoJsonUtil { public static String xml2JSON(String xml) { JSONObject obj = new JSONObject(); try { InputStream is = new ByteArrayInputS 阅读全文
posted @ 2019-01-03 22:50 qqzhulu 阅读(687) 评论(0) 推荐(0) 编辑
摘要: java中选择相应的字段,生成固定长度的字符串 public static String getRandomString(int length) { // length表示生成字符串的长度 String base = "abcdefghijklmnopqrstuvwxyz0123456789"; R 阅读全文
posted @ 2019-01-02 23:46 qqzhulu 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 在使用微信支付时,需将从前台接收的JSONObeject 格式数据转换为String类型,其具体的转换过程如下: JSONObject jsonObject = JSONObject.parseObject(XmltoJsonUtil.xml2JSON(content)); JSONObject r 阅读全文
posted @ 2018-12-30 23:39 qqzhulu 阅读(2821) 评论(0) 推荐(0) 编辑
摘要: 一秒刷新页面一次 response.setHeader("refresh","1"); 二秒跳到其它页面 response.setHeader("refresh","2;URL=otherPagename"); 没有缓存:response.setHeader("Pragma", "No-cache" 阅读全文
posted @ 2018-12-29 23:59 qqzhulu 阅读(1566) 评论(0) 推荐(0) 编辑