2016年工作中遇到的问题

细节很重要

1.sql  db2计算时间差
select sum(DIVIDE_AMOUNT) from TBL_DIVIDE_REQUEST where LEDGERNO ='10012523793' and days(date(COMPLETE_DATE)) - days(date(CREATE_DATE)) =1

2.排序尽量不要用时间排序  可通过id,很大程度上提升效率
select name from tbl order by id desc

3.常用网站
时间戳转换的网站
http://timestamp.phpddt.com/

编码转换
http://tool.chinaz.com/Tools/Unicode.aspx

sql异常码
http://blog.csdn.net/cangyingaoyou/article/details/7402243

卡bin查询
http://cha.yinhangkadata.com/

查询ip
http://ip138.com/


4.事务调用
动态代理

类classA
方法a
方法b(事务)
a调用b 可能会失效(与动态代理有关)

5.查找隐藏div并设置子输入框为不提交
jquery标签查找
$( 'form' ).find( ':hidden' ).find( ':input' ).attr( 'disabled' , true );


6.HTTP GET和POST的区别
GET
查询字符串(名称/值对)是在 GET 请求的 URL 中发送的:
/test/demo_form.asp?name1=value1&name2=value2
  • GET 请求可被缓存
  • GET 请求保留在浏览器历史记录中
  • GET 请求可被收藏为书签
  • GET 请求不应在处理敏感数据时使用
  • GET 请求有长度限制
  • GET 请求只应当用于取回数据
POST

查询字符串(名称/值对)是在 POST 请求的 HTTP 消息主体中发送的:

POST /test/demo_form.asp HTTP/1.1
Host: w3schools.com
name1=value1&name2=value2
  • POST 请求不会被缓存
  • POST 请求不会保留在浏览器历史记录中
  • POST 不能被收藏为书签
  • POST 请求对数据长度没有要求

7.三代数据报表查询条件格式更改

8.换行符 替换为空格
   查找   ^n

9.关联查询 动态关联
select c.belong 产品归属, sum(p.amount) 交易金额,sum(p.amount)-sum(p.real_amount) 手续费 , count(p.id) 交易笔数
from zgt.tbl_payment p
left join zgt.tbl_trxorder t on t.external_id = p.externalid
left join zgt.tbl_customer_config c on
c.customer_identity_no = (
case when t.agent_no is null then t.customer_no
else t.agent_no
end
)

10. 获取Spring的上下文环境ApplicationContext的方式,引用地址 http://blog.csdn.net/yang123111/article/details/32099329
TEST测试用例

public class SpringUtil {

       public static ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
 
       public static Object getBean(String serviceName){
             return context.getBean(serviceName);
       }
}

在web项目中这种方式非常不可取!!!

分析:

首先,主要意图就是获得Spring上下文;

其次,有了Spring上下文,希望通过getBean()方法获得Spring管理的Bean的对象;

最后,为了方便调用,把上下文定义为static变量或者getBean方法定义为static方法;

 

但是,在web项目中,系统一旦启动,web服务器会初始化Spring的上下文的,我们可以很优雅的获得Spring的ApplicationContext对象。

如果使用

new ClassPathXmlApplicationContext("applicationContext.xml");
相当于重新初始化一遍!!!!

也就是说,重复做启动时候的初始化工作,第一次执行该类的时候会非常耗时!!!!!

@Component
public class SpringContextUtil implements ApplicationContextAware {

         private static ApplicationContext applicationContext; // Spring应用上下文环境

         /*

          * 实现了ApplicationContextAware 接口,必须实现该方法;

          *通过传递applicationContext参数初始化成员变量applicationContext

          */

         public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
               SpringContextUtil.applicationContext = applicationContext;
         }

 

         public static ApplicationContext getApplicationContext() {
                return applicationContext;
         }


          @SuppressWarnings("unchecked")
          public static <T> T getBean(String name) throws BeansException {
                     return (T) applicationContext.getBean(name);
           }

}


11. maven 查看jar列表,由于两个jar包冲突引起的莫名错误,通过maven命令可以查看jar包树进行检查
mvn dependency:tree

12.数据导入明确   数据条数、字段长度、文件大小(明确错误原因);核对重复数据(30分钟内)

13.重复转账?



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值