效果图如下:
代码如下:层级分明 controller控制层 service serviceImpl业务层 dao持久层 xml
controller
@ApiOperation(value = "26个首字母排序")
@RequestMapping(value = "alphabetical", method = RequestMethod.POST)
public PmpResult alphabetical (){
//数据源查询数据库得出
List<CustomCabinets2> alphabeticalGather = crmCustomersService.alphabetical();
try {
// 输出26个字母 TreeMap有序集合
Map<String, Object> map = new TreeMap<>();
for (int i = 1; i