### **前、后台需要配置的选项** ### **1、需要拼接上日期** ![](https://img.kancloud.cn/aa/91/aa91fe6f2a166e7eb14302d1b2601c7b_1920x689.png) ### **2、需要在字段上类型选择日期类型,查询勾选上,查询模式为单条件查询或范围查询** ![](https://img.kancloud.cn/d7/fe/d7feb9f9df2c9a7af49295ccaeb12313_1920x761.png) ### **3、前台传给后台接口采用统一格式为年月日是中间是-,如下图** ![](https://img.kancloud.cn/af/19/af190f70e358bef7ade272ac440f76b4_784x59.png) 后台需要转换成自己需要的,如年月日,如果是数据库存的是-,则不需要转换 ``` SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date parse = dateFormat.parse(riqi); SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyy年MM月dd日"); format = dateFormat1.format(parse); ``` ### **4、点击查询即可** ![](https://img.kancloud.cn/df/19/df1952ddfe0a2752ff9c63da8de54b13_1902x881.png)