MySQL按指定字段自定义列表排序

亲测实例:

1级排序:同城>异城

2级排序:未领养>以领养

3级排序:发布最新靠前

MYSQL语句如下:

 

SELECT ura.id,ura.city,ura.uid,ura.rescue_name,ura.address,pa.status as pet_adopt_status,pa.name as pet_adopt_name,pa.add_time as pet_adopt_add_time 
FROM pet_adopt AS pa LEFT JOIN user_rescue_auth AS ura ON pa.uid = ura.uid WHERE (pa.del_status = 1) AND (pa.status IN (1,2,3,4,5)) 
ORDER BY FIELD(ura.city,'深圳') DESC,pa.status ASC,pa.id DESC

 

pet_adopt 数据表数据:

CREATE TABLE `pet_adopt` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL DEFAULT '0' COMMENT 'user表id',
  `pet_adopt_class_pid` int(11) NOT NULL DEFAULT '0' COMMENT '宠物分类表一级分类id',
  `pet_adopt_class_id` int(11) NOT NULL DEFAULT '0' COMMENT '宠物分类表二级分类id',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '宠物名称',
  `info` varchar(255) NOT NULL DEFAULT '' COMMENT '宠物说明',
  `show_img` varchar(255) NOT NULL DEFAULT '' COMMENT '宠物图片',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '领养状态,1未领养,2待审批,3已通过,4未通过,5已确认领养,6已完成',
  `recommend_status` tinyint(4) NOT NULL DEFAULT '2' COMMENT '推荐状态,1推荐,2不推荐',
  `follow_num` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '关注数量',
  `del_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除状态,1未删除,2已删除',
  `add_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 COMMENT='宠物表,宠物领养表';

-- ----------------------------
-- Records of pet_adopt
-- ----------------------------
INSERT INTO `pet_adopt` VALUES ('9', '100159', '3', '4', '灰仔', '123123213213213123', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022775076.png', '1', '2', '0', '1', '0');
INSERT INTO `pet_adopt` VALUES ('10', '100159', '7', '8', 'liky宝宝', '狗狗狗狗狗狗', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022774033.png', '3', '2', '0', '1', '1517970099');
INSERT INTO `pet_adopt` VALUES ('11', '100165', '7', '9', '白白', '可爱', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022788116.jpg', '1', '2', '0', '1', '1519704181');
INSERT INTO `pet_adopt` VALUES ('12', '100165', '7', '8', '小狗狗', '萌萌', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022749211.jpg', '1', '2', '1', '1', '1519704220');
INSERT INTO `pet_adopt` VALUES ('13', '100165', '6', '10', '吉娃娃', '中文名 吉娃娃犬\n俗名别名 吉娃娃犬、芝娃娃犬\n英文名 Chihuahua 品种历史起源 当我们对9世纪时就已存在于墨西哥的TOLTEC人还所知甚少时,他们就已培育出了一种叫做特吉吉的犬。特吉吉犬是吉娃娃犬的祖先。在墨西哥城外的修道院里可以看到TOLTEC地区石刻上的图画。这些石头通常用来建造修道院,同时也是TOLTEC人建造棱锥的原料。原产地墨西哥习性它不喜欢外来的同品种的狗。', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030252372.jpg', '1', '2', '0', '1', '1519957053');
INSERT INTO `pet_adopt` VALUES ('14', '100165', '6', '13', '柯基犬', '威尔士柯基犬:\n威尔士柯基犬共分两种:卡迪根威尔士柯基犬和彭布罗克威尔士柯基犬。两者比较,彭布罗克柯基犬的体形较短,腿骨更直、更轻,而背毛的质地更好;但在性情上,彭布罗克柯基犬显得不安分,容易激动,没有卡迪根威尔士柯基犬那么驯服。从12世纪的理查一世到现在的女王伊丽莎白二世,柯基犬一直是英国王室的宠物。\n \n    威尔士柯基犬虽然属于小型犬,但性格非常稳健,完全没有一般小型犬的神经质,是非常适合小孩的守护犬。它们的胆子很大,也相当机警,能高度警惕地守护家园,是最受欢迎小型护卫犬之一。对该犬,我们标准地描', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030235194.jpg', '1', '2', '0', '1', '1519957524');
INSERT INTO `pet_adopt` VALUES ('15', '100165', '11', '15', '', '爱情鸟描述', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030561887.jpg', '1', '2', '0', '1', '1520221143');
INSERT INTO `pet_adopt` VALUES ('16', '100165', '7', '8', '领养666', '描述猫猫猫猫描述猫猫猫猫我认为而非为而非无人飞船上产生的31341231333333333333333333333321231', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030667680.jpg', '1', '2', '0', '1', '1520321525');
INSERT INTO `pet_adopt` VALUES ('17', '100160', '6', '10', '鹏鹏领养222', '沙发沙发沙发沙发沙发沙发的是多少', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030626930.jpg', '6', '2', '1', '1', '1520322053');
INSERT INTO `pet_adopt` VALUES ('18', '100165', '6', '12', '领养测试1', '撒打算大撒旦撒旦撒打算打啊实打实的地对地导弹地对地导弹', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030839946.jpg', '1', '2', '4', '1', '1520481690');
INSERT INTO `pet_adopt` VALUES ('19', '100165', '11', '14', '鹦鹉领养测试2', '是的是的是的是的是', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030826142.jpg', '1', '2', '3', '1', '1520502105');
INSERT INTO `pet_adopt` VALUES ('20', '100165', '3', '4', '辣辣0309', '是的是的是的是的', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030969088.jpg', '1', '2', '1', '1', '1520589262');
INSERT INTO `pet_adopt` VALUES ('21', '100187', '6', '10', '贝贝', '大耳朵图图', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018030988912.jpg', '1', '2', '1', '1', '1520607586');
INSERT INTO `pet_adopt` VALUES ('22', '100187', '11', '15', '大狗', '看看', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018031033390.png', '1', '2', '0', '1', '1520658947');
INSERT INTO `pet_adopt` VALUES ('23', '100175', '3', '4', '3560宠物领养1', '哈哈哈哈 就撒旦教卡仕达酱撒点开始卡了大家谁打的第三大城市打阿阿阿阿阿阿阿阿阿阿阿', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018031216350.jpg', '6', '2', '1', '1', '1520825554');
INSERT INTO `pet_adopt` VALUES ('24', '100165', '7', '8', 'sdsd', 'xvxvxvxvx', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018031298220.jpg', '6', '2', '1', '1', '1520836456');
INSERT INTO `pet_adopt` VALUES ('25', '100175', '6', '13', '宠物领养测试223233', '使对方的速度是烦烦烦烦烦烦烦烦烦烦烦', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031691736.jpg', '3', '2', '0', '1', '1521190549');
INSERT INTO `pet_adopt` VALUES ('26', '100160', '6', '10', '可乐', '可乐是一条阿拉斯加,可爱 搞破坏', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031682675.png', '5', '2', '0', '1', '1521194148');
INSERT INTO `pet_adopt` VALUES ('27', '100175', '6', '13', '宠物领养测试88', '捣鼓捣鼓', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031615427.jpg', '1', '2', '2', '1', '1521194377');
INSERT INTO `pet_adopt` VALUES ('28', '100175', '3', '4', '是哒', '双方的说法都是', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031614295.png', '3', '2', '0', '1', '1521196528');
INSERT INTO `pet_adopt` VALUES ('29', '100175', '6', '13', '速度闪躲', '实打实的', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031681545.jpg', '3', '2', '0', '1', '1521196690');
INSERT INTO `pet_adopt` VALUES ('30', '100175', '6', '12', '测试2232', '2222222222222222222222222222222', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031619960.jpg', '3', '2', '0', '1', '1521196932');
INSERT INTO `pet_adopt` VALUES ('31', '100175', '6', '12', '0319宠物领养测试111', '是的是的是的是的是的先擦擦擦擦擦擦擦擦擦擦', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031985911.jpg', '3', '2', '0', '1', '1521426360');
INSERT INTO `pet_adopt` VALUES ('32', '100175', '3', '5', 'we21', 'wedwdsdsds', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031974932.jpg', '1', '2', '0', '1', '1521430300');
INSERT INTO `pet_adopt` VALUES ('33', '100160', '11', '15', '老鬼测试1', '老鬼测试1老鬼测试1老鬼测试1老鬼测试1老鬼测试1', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031974932.jpg', '3', '2', '0', '2', '1521439319');
INSERT INTO `pet_adopt` VALUES ('34', '100175', '3', '4', '已通过', '是的是的是的', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031927396.jpg', '1', '2', '0', '1', '1521448349');
INSERT INTO `pet_adopt` VALUES ('35', '100175', '11', '14', '已确认', '撒旦撒旦撒旦', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031983163.jpg', '5', '2', '0', '1', '1521448367');
INSERT INTO `pet_adopt` VALUES ('36', '100175', '6', '12', '已结束的事', '是多少多少', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031971660.jpg', '6', '2', '0', '1', '1521448382');
INSERT INTO `pet_adopt` VALUES ('37', '100165', '6', '12', 'wrwrw', 'wewedw', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018031985064.jpg', '1', '2', '2', '1', '1521448572');
INSERT INTO `pet_adopt` VALUES ('38', '100175', '6', '12', '3560宠物领养1', '是的是的是的是大大大大说的都是实打实的撒旦是水水水水水水水水水水水水水水水水水水水水水水水水水使得等等等等等等等等等等等等', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032237387.png', '1', '2', '5', '1', '1521689431');
INSERT INTO `pet_adopt` VALUES ('39', '100165', '6', '12', 'WWWWWW', 'WSEDWDWDWDW', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032212079.jpg', '5', '2', '0', '1', '1521703946');
INSERT INTO `pet_adopt` VALUES ('40', '100160', '3', '5', '测试1111', '测试1111测试1111测试1111测试1111测试1111测试1111测试1111测试1111', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032219092.png', '3', '2', '0', '1', '1521712088');
INSERT INTO `pet_adopt` VALUES ('41', '100159', '3', '4', 'L测试', '111', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032344696.jpg', '5', '2', '0', '1', '1521775617');
INSERT INTO `pet_adopt` VALUES ('42', '100175', '6', '12', '23号1', '111112323223232', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032324710.jpg', '1', '2', '1', '1', '1521785390');
INSERT INTO `pet_adopt` VALUES ('43', '100175', '11', '15', '23号22', '萨达斯的大叔大大缩短撒大大', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032391123.jpg', '5', '2', '0', '1', '1521786118');
INSERT INTO `pet_adopt` VALUES ('44', '100175', '6', '12', '1212121', 'sfsdfdsf', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032641901.jpg', '5', '2', '0', '1', '1522055317');
INSERT INTO `pet_adopt` VALUES ('45', '100175', '11', '14', '232323', 'aeddad', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032620907.jpg', '5', '2', '0', '1', '1522055419');
INSERT INTO `pet_adopt` VALUES ('46', '100175', '3', '4', '4444444444', '无色差', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032640332.jpg', '1', '1', '2', '1', '1522057665');
INSERT INTO `pet_adopt` VALUES ('47', '100165', '11', '14', '7777777777777', 'dfgdgfg', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032766265.jpg', '1', '1', '1', '1', '1522116913');
INSERT INTO `pet_adopt` VALUES ('48', '100165', '7', '8', '猫咪', '撒旦豆豆豆豆豆豆豆豆豆豆豆豆豆豆豆豆豆豆', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018032732426.jpg', '3', '2', '0', '1', '1522135229');
INSERT INTO `pet_adopt` VALUES ('49', '100169', '11', '15', '1111111111111', 'aedasdasdsadasdadasdas', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033053123.jpg', '5', '2', '0', '1', '1522374520');
INSERT INTO `pet_adopt` VALUES ('50', '100169', '6', '12', 'erwer', 'sadasd', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033014081.jpg', '1', '2', '1', '1', '1522375446');
INSERT INTO `pet_adopt` VALUES ('51', '100169', '7', '8', 'sad', 'asdasdas', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033074956.jpg', '1', '1', '2', '1', '1522375459');
INSERT INTO `pet_adopt` VALUES ('52', '100175', '6', '12', '666', '送达方式', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033085052.jpg', '3', '2', '0', '1', '1522382661');
INSERT INTO `pet_adopt` VALUES ('53', '100160', '3', '4', '测试2222', '5235235', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033024354.png', '5', '2', '0', '1', '1522389513');
INSERT INTO `pet_adopt` VALUES ('54', '100160', '6', '12', '测试3333', '124124124', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033079606.png', '1', '2', '1', '1', '1522389643');
INSERT INTO `pet_adopt` VALUES ('55', '100165', '3', '4', '白白', '阿达撒点', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033043816.jpg', '5', '2', '0', '1', '1522398249');
INSERT INTO `pet_adopt` VALUES ('56', '100165', '11', '14', '大苏打', '阿萨', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033023823.jpg', '5', '2', '0', '1', '1522398265');
INSERT INTO `pet_adopt` VALUES ('57', '100165', '11', '14', 'wew', 'asd', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033032084.jpg', '1', '2', '0', '1', '1522400775');
INSERT INTO `pet_adopt` VALUES ('58', '100165', '6', '12', '饿死', '全额', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033010625.jpg', '5', '2', '0', '1', '1522402222');
INSERT INTO `pet_adopt` VALUES ('59', '100165', '6', '12', '4', 'ewr', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033080954.jpg', '3', '2', '0', '1', '1522403096');
INSERT INTO `pet_adopt` VALUES ('60', '100165', '3', '4', '来吧', '大撒手', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033031196.png', '6', '2', '0', '1', '1522404331');
INSERT INTO `pet_adopt` VALUES ('61', '100160', '6', '12', '测评45454545', '测评45454545', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018033170427.png', '3', '2', '0', '1', '1522473683');
INSERT INTO `pet_adopt` VALUES ('62', '100160', '3', '4', '测试55555', '测试55555', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040261373.png', '3', '2', '0', '1', '1522633712');
INSERT INTO `pet_adopt` VALUES ('63', '100160', '6', '12', '测试55555', '测试55555', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040267970.png', '3', '2', '0', '1', '1522634259');
INSERT INTO `pet_adopt` VALUES ('64', '100160', '7', '8', '测试55551234124124124', '测试55551234124124124', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040243406.png', '3', '2', '0', '1', '1522634352');
INSERT INTO `pet_adopt` VALUES ('65', '100160', '11', '14', '测试6666', '测试6666', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040262686.jpg', '3', '2', '0', '1', '1522634586');
INSERT INTO `pet_adopt` VALUES ('66', '100160', '11', '14', '测试7777', '测试7777测试7777测试7777', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040297471.jpg', '1', '1', '0', '1', '1522649569');
INSERT INTO `pet_adopt` VALUES ('67', '100160', '11', '15', '测试8888', '测试8888', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040264276.jpg', '1', '2', '0', '1', '1522650440');
INSERT INTO `pet_adopt` VALUES ('68', '100165', '11', '14', '来报小可爱', '是大撒旦撒旦', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040229969.jpg', '5', '2', '0', '1', '1522655059');
INSERT INTO `pet_adopt` VALUES ('69', '100165', '11', '15', '大幅度', '阿紫充分展现凑凑凑凑凑凑凑凑凑凑凑凑凑凑', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040237926.jpg', '3', '2', '1', '1', '1522661298');
INSERT INTO `pet_adopt` VALUES ('70', '100165', '3', '4', 'sd3434', 'sdsds', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040420893.jpg', '5', '2', '1', '1', '1522829030');
INSERT INTO `pet_adopt` VALUES ('71', '100165', '7', '8', 'erfsdfdcd', 'sdsd', 'http://lyjavatar-1255673705.image.myqcloud.com/other/2018040446524.jpg', '3', '2', '0', '1', '1522829096');
View Code

user_rescue_auth 数据表数据:

CREATE TABLE `user_rescue_auth` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL DEFAULT '0' COMMENT '申请人,user表id',
  `logo` varchar(255) NOT NULL DEFAULT '' COMMENT '救助中心logo',
  `rescue_name` varchar(100) NOT NULL DEFAULT '' COMMENT '救助中心名称',
  `phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
  `address` varchar(150) NOT NULL DEFAULT '' COMMENT '详细地址',
  `bank_id` smallint(6) NOT NULL DEFAULT '0' COMMENT '银行id',
  `bank_card_id` varchar(20) NOT NULL DEFAULT '' COMMENT '银行卡号',
  `real_name` varchar(20) NOT NULL DEFAULT '' COMMENT '银行卡姓名',
  `business_license` varchar(1000) NOT NULL DEFAULT '' COMMENT '营业执照,税务登记证',
  `info` varchar(1000) NOT NULL DEFAULT '' COMMENT '救助中心介绍',
  `email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱',
  `weibo` varchar(50) NOT NULL DEFAULT '' COMMENT '微博',
  `show_img` varchar(1000) NOT NULL DEFAULT '' COMMENT '救助中心实地图片',
  `status` tinyint(255) NOT NULL DEFAULT '0' COMMENT '申请救助中心状态,1审核中,2通过,3不通过',
  `lat` varchar(30) NOT NULL DEFAULT '' COMMENT '根据详细地址获取到的经度',
  `lng` varchar(30) NOT NULL DEFAULT '' COMMENT '根据详细地址获取到的纬度',
  `city` varchar(10) NOT NULL DEFAULT '' COMMENT '根据详细地址获取到的城市',
  `donation_money` bigint(20) NOT NULL DEFAULT '0' COMMENT '累计获得的爱心捐赠金额,以分为单位',
  `rescue_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '救助中心状态,1正常,2禁用',
  `add_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COMMENT='救助中心认证表';

-- ----------------------------
-- Records of user_rescue_auth
-- ----------------------------
INSERT INTO `user_rescue_auth` VALUES ('9', '100159', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022727541.jpg', '困困困', '13726267653', '南山区大冲', '1002', '4985565852585258', '军训', '[\"\",\"\"]', '提供急救服务', '', '', '[\"\",\"show_img3\"]', '2', '22.937865', '112.058213', '云浮', '4', '1', '1517969413');
INSERT INTO `user_rescue_auth` VALUES ('10', '100160', 'http://lyjavatar-1255673705.image.myqcloud.com/frontend/2018040417148.png', '爱宠服务救助中心', '18681587662', '大冲国际中心5号楼502', '1026', '69465656656664646646', '都不会奖学金', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/9eadf4f957320035f22a135679ce9aec.png\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/82b2dfc1616bbda4969009fbdb82d2b1.png\"]', '专门为宠物提供宠物用品零售、宠物美容、宠物寄养、宠物活体销售', '260452054@qq.com', '260452054', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/218dffa2e95fc31c2aee1c0db8a6bd93.png\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/banner3-1.pngshow_img3\"]', '2', '22.529623', '114.117084', '深圳', '11', '1', '1518139202');
INSERT INTO `user_rescue_auth` VALUES ('11', '100161', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022743101.png', '小灰灰宠物救助站', '13726267653', '南山区大冲国际中心5号楼', '1026', '111111111111111111', '。吧', '[\"\",\"\"]', '一流的服务水准', '', '', '[\"\",\"show_img3\"]', '2', '0.001078', '0.001411', '深圳', '0', '1', '1518320523');
INSERT INTO `user_rescue_auth` VALUES ('12', '100163', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022726984.png', 'HELLOOOG宠物店', '18681587662', '深圳南山高新园', '1003', '4582555825468488', '喜欢保密的', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/0F6E27F3-2EC5-4393-ACDB-5257371E4010.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/9A185925-029D-4D21-B30D-4A7E78C94D49.jpeg\"]', '专业  认真  有责任心bdbx上阿', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/0B71A36E-CE0D-498A-987D-17565C676F14.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/B55546D7-52CA-475D-A1AB-F16DCEB352BC.jpegshow_img3\"]', '2', '', '', '', '0', '1', '1519269301');
INSERT INTO `user_rescue_auth` VALUES ('13', '100165', 'https://lyjavatar-1255673705.cos.ap-guangzhou.myqcloud.com/CE81C7A3-A1EE-48C4-AC92-FD9E1FF5F0B6.jpeg', '小公园', '13076508906', '科发路与铜鼓路交叉口西南100米', '1001', '622848199505057899', '小白', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_13.jpg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_10.jpg\"]', '特别喜欢鲜活的事物,如花,如阳光,如一蓬蓬的绿植,如我和你的遇见。人是简单的到此一游,守护好内心的深情,纵然时光会薄凉,只要温暖在心,便无悔亦无惧。\n\n  总觉得,最好的感情无非是牵着彼此的手,从心动走到古稀,相濡以沫莫过于在珍惜中拥有。你是我的眼,我是你的心,如此一生一世,如此天长地久。\n\n  风,会老了山河岁月;雨,会散了烟花月色。而你,只有你,会在眉间心上,是如初鲜活的模样。\n\n  似乎还没缓过神,就已经走在春天的路上了。很多时候,光阴就是这么急不可待,不容商量。而我们能做的就是活好当下,把深情专注于每一个平凡的日子,养心,修心,暖你我。\n\n  花开见美,花落见素。时光就在这一开一合里,修得圆满,也修得了这一世的安生。\n\n  盈盈一水间,脉脉不得语的相悦有时会铭记一生。当心有灵犀的喜悦漾起一朵朵的潋滟,一醉便是千年的绮梦。\n\n  想来,人生的丰满,就是在行走的每一段路中获得的领悟,而每一次的遇见都会是懂得,每一次的经历都将是岁月赋予的成长。\n\n  看似不动声色,其实在不经意之间,让我们学会了宽恕,懂得了随缘,知道了珍惜,也更加明了最好的陪伴,该是久处不累,无论悲喜,安然相待。\n\n  此刻,坐在午后的时光里,心是欢喜的,有阳光,有音乐,我可以在指尖涂抹我的山河,也可以与烟火简单相依。\n\n  不管这个红尘有多苍白,我只抱紧自己的香,不迎合,不将就,活成自己喜欢的模样,如此,就好。\n\n  光阴含香,捡拾一路的美好,生活是单纯而宁静的。只因知道,无论孤也好,独也好,还有人在聆听。\n\n  其实,当春来的霎那,我们已走过了万水千山,很想用烟火做词牌,写下那年的初相遇。只是,我,又分明是不擅长说出想念的人。\n\n  早已习惯了沿途的繁盛与荒芜,念念不忘的终归是握在手心里的温暖。回望来时路,那些迷茫中的懂得,寒冷中的给予,曲折中的平坦,都是岁月馈赠的经历。\n\n  当光阴随波流转时,这些深浅的印记,都将是生命里动人,又无与伦比的美丽。\n\n  曾经以为,最难得是一见如故的喜欢,现在知道,最珍贵的是久处不厌的陪伴。\n\n  人生的路上,总是会有告别与遇见,当灵魂努力的在红尘烟水里泅渡,当合缝的掌纹将心事坐化成莲。请记得,最美的初遇和不见不散的契约。\n\n  世界上美好的东西有很多,可我们能拥有的却是有限,珍惜该珍惜的,春风十里,不如余生是你。得得监控默默的龙膜空空的龙膜可得得得的份', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/magazine-unlock-01-2.3.902-_dc9418d2b6154e13957c6bddebd779ab.jpg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_15.jpgshow_img3\"]', '2', '', '', '', '106', '1', '1519699491');
INSERT INTO `user_rescue_auth` VALUES ('14', '100169', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022726984.png', '红红火火', '13760290605', '深圳', '1002', '36289546853395423855', '小红', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/B741C6E9-A0B3-4687-8BB1-E1747E9C32BB.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/A31EA12D-3B20-4DD5-B116-804276A4E756.jpeg\"]', ' 不经意间,我们邂逅于时光的路口,不约而同的慢下脚步,相约一程,看一场春花绚丽,赏一处魔装学园的尘世里,只剩下一个人的身影,在苍苍蒹葭中哭泣。世间许多情感,都有太多的无奈,始于初见,止于终老,也只是我们对爱情最美好的期许。\n\n  总以为,一年一月的堆积,许多无法沉淀的记忆,在纵横交错的岁月里会慢慢消失。直到光阴转身,蓦然回首,才发现,那一场悲喜交织的经历,还在人生的平淡中,咀嚼苦涩的味道;那一段烟花寂寞的故事,依旧在岁月的起落中,隔着两个人的距离,守着你我的秘密。\n\n  或许,我们念念不忘的,是那一份娴静的时光,是时光里那一轮月色,是月色下那一个惦念的人。没有了阴晴,没有了悲喜,没有了寂寞。唯有思念的情愫在目光中闪烁,在每一个馨香的夜晚,用闲愁煮字,与灵魂相伴。\n\n  其实,一个人的品质与修养是否优良,并不在于你自身有多么强大的气场,一段缘分的深浅与聚散,并不代表人生的情感是否圆满。有些缘分,注定无法走得太远。虽已在你的世界里,布满了太多的脚印,留下了太多的心痕。等到风烛残年,低眉思量时,又有谁,将爱情经营的行云流水?又有谁,将平淡的日子过得风生水起?唯有将苍老的心事,在坎坷的人生里变得淡定从容。\n\n  喜欢每一个可以与阳光交谈的日子,明媚和熙,给心情增添了一份暖意。时光的村落里始终住着一份情意,听风赏月,独守安逸。就这样,岁月渐渐老去,心事慢慢沉积,当思念还在周而复始的延续,我想就这样轻轻拥有你,哪怕是梦里,哪怕是回忆。\n\n  闲暇的时候,喜欢将清爽的雨,檐下的风,读成眼眸中诗意而雅致的风景。怀一颗纯净的心,将岁月的荒芜在水墨下氤氲出绝美的风华。那些相互依存的爱情,我们不必询问爱的缘由,因为,没有谁可以追溯到情感的源头,也不必担忧叹息缘分的去留,因为,我们无法阻止真情的脚步。\n\n  这个冬天,我在等一场雪,等一片雪花编织一个温馨的梦,等一场雪洗涤一个清澈的心灵。原来,静静地等待,匆匆地路过,只为在我心上,留下你的身影。还有,那些如雪花般纯美的颜色,给予生命更多的温和, 不经意间,我们邂逅于时光的路口,不约而同的慢下脚步,相约一程,看一场春花绚丽,赏一处清月变圆。当年华一层层叠加,烟火缭绕的尘世里,只剩下一个人的身影,在苍苍蒹葭中哭泣。世间许多情感,都有太多的无奈,始于初见,止于终老,也只是我们对爱情最美好的期许 不经意间,我们邂逅于时光', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/FB5CC0CF-D3BA-4B9D-9286-FD3D0AA928FE.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/A65A634E-C70D-4CDA-9663-382068F0F2A2.jpegshow_img3\"]', '2', '', '', '', '7', '1', '1519699663');
INSERT INTO `user_rescue_auth` VALUES ('15', '100175', 'http://lyjavatar-1255673705.image.myqcloud.com/frontend/2018040457754.png', '林静救助站3560', '18988793560', '深圳市南区八路世界之窗', '1022', '6250420248290110', '林静', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_20180211_141218_HDR.jpg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_20180211_141218_HDR.jpg\"]', '林静救助站成立于3008年\n秉承着,,,,,,,,,,,,,,', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_20180212_153158_HDR.jpg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_20180212_153158_HDR.jpg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_20180211_141218_HDR.jpg\"]', '2', '', '', '', '7', '1', '1520491370');
INSERT INTO `user_rescue_auth` VALUES ('16', '100172', 'http://lyjavatar-1255673705.image.myqcloud.com/frontend/2018040454915.png', '小恶魔', '18988793560', '深圳', '1002', '12345678907894563', '恶魔', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1813.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1813.PNG\"]', '来咯我终于兔姐姐我哦哦哦的恶魔与兔兔兔哦我哦哦旅途我现在终于兔音乐wwww', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1813.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1813.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1813.PNG\"]', '2', '0', '0', '', '0', '1', '1521709306');
INSERT INTO `user_rescue_auth` VALUES ('17', '100166', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022726984.png', '彭焕', '18681587662', '大冲国际', '1005', '4304221993011217748', '彭老鬼', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/S80222-151134.jpg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/S80224-185410.jpg\"]', 'hdhc旺下降子女降妖除魔', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_10.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_0.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_11.png\"]', '2', '22.54206', '113.955438', '', '0', '1', '1521689043');
INSERT INTO `user_rescue_auth` VALUES ('18', '100178', 'http://lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com/other/2018022726984.png', '可东', '18681587662', '大冲国际中心', '1026', '630522199301121776', '彭老鬼', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/img_0.png\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/img_11.png\"]', '就更数计hchd最下预计如此如此vbjvjvjbhvguvgdf限时', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/img_9.png\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/img_1.png\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/banner3-1.png\"]', '2', '', '', '', '1', '1', '1520326103');
INSERT INTO `user_rescue_auth` VALUES ('19', '100174', 'http://lyjavatar-1255673705.image.myqcloud.com/frontend/2018040448811.png', '看看看', '18988793560', '深圳', '1002', '12345678907894563', '看看看', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/C02BFE92-2272-427B-BC32-F386EB6EB8B5.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/D2E121F1-513F-4609-8C68-7EAFCAC025E8.png\"]', '有劳模咯想我吗句我哦莫问我具体来看看咯了考虑图套装有劳模咯想我吗句我哦莫问我具体来看看咯了考虑图套装有劳模咯想我吗句我哦莫问我具体来看看咯了考虑图套装all', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/2BB281C5-98E0-4AFD-A85B-0445D8C1EB41.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/1D26D820-492A-468A-A4B6-EDDDCFC7BC54.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/9EBE854E-8CE6-4866-99A1-8367E88528F6.png\"]', '2', '0', '0', '', '0', '1', '1521171196');
INSERT INTO `user_rescue_auth` VALUES ('20', '100162', '', '测试中心', '18666826784', '测试地址', '1026', '1234567891234567891', '符晓鹏', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/919AA988-CBB6-4B51-A0E4-477155AA5538.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/385F1B2A-2E2F-4010-B512-3C2336F1227B.jpeg\"]', '来了咯默默的', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/45E20598-0DBD-451A-8982-A7B110FFA299.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/A4023B18-868A-4280-A9D2-8D0EA2AAB006.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/27DEDC08-A19E-406A-AEC2-586A7D4DEBD4.jpeg\"]', '1', '', '', '', '0', '1', '1520584160');
INSERT INTO `user_rescue_auth` VALUES ('21', '100184', '', 'bed,', '18666826784', 'l lo', '1026', '1234567890123456789', '考虑考虑', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/A7D66FE1-20CC-49DE-BDD6-A2167142826A.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/F3A9DB05-25DA-426A-870C-B5FEC2A5AEC7.jpeg\"]', '拉萨', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/787C87E5-E0CB-4A26-AF08-C51A58AE946C.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/A1D6FA39-80A3-4D95-A056-AF161D5D3D94.jpeg\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/D9A3CF98-6058-46AE-8B56-CE4CC7D6B9B3.jpeg\"]', '3', '', '', '', '0', '1', '1520587630');
INSERT INTO `user_rescue_auth` VALUES ('22', '100182', '', '18689462661', '18689462661', '深圳宝安', '1006', '123456789012345667', '旅途', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1854.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1854.PNG\"]', '啦啦噜啦咯了吗淋漓尽致y', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1849.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1854.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1854.PNG\"]', '2', '0', '0', '', '0', '1', '1522035520');
INSERT INTO `user_rescue_auth` VALUES ('23', '100194', '', '陈德救助中心', '13967788825', '温州', '1002', '1234567891111111', '陈德', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/2e5b43d2bebff09f47742d9b6d2be811.JPG\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_0930.JPG\"]', '非常好', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_0894.JPG\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/2e5b43d2bebff09f47742d9b6d2be811.JPG\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/2e5b43d2bebff09f47742d9b6d2be811.JPG\"]', '2', '114.46093', '22.577984', '', '200', '1', '1520605587');
INSERT INTO `user_rescue_auth` VALUES ('24', '100187', '', '陈德', '13967788820', '温州', '1002', '124836482919999993', '温州', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_0489.JPG\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/2e5b43d2bebff09f47742d9b6d2be811.JPG\"]', '很好', '', '', '[\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_0930.JPG\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/2e5b43d2bebff09f47742d9b6d2be811.JPG\",\"https:\\/\\/lingyangjia-1255673705.cos.ap-guangzhou.myqcloud.com\\/2e5b43d2bebff09f47742d9b6d2be811.JPG\"]', '2', '', '', '', '1', '1', '1520606941');
INSERT INTO `user_rescue_auth` VALUES ('25', '100200', '', '微信静', '18988793560', '深圳罗湖', '1002', '12345678907894563', '微信静', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/8AECA583-EE46-4C44-B94D-030E1CFDC169.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/E16F664E-C0B7-4890-A7F9-2CB8BEA477F8.jpeg\"]', '微信静', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/062C8611-9451-4FE6-9D17-F671DC0F84AF.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/0BAC4C6A-548A-4150-9659-6294239E9C2F.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/E015C644-4517-4753-A179-B43A3EE30F6C.jpeg\"]', '2', '0', '0', '', '0', '1', '1521771441');
INSERT INTO `user_rescue_auth` VALUES ('26', '100202', '', '双显卡', '18681587662', '在此馳丐上', '1026', '430422199301121775', '百正是', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_1.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_0.png\"]', '马真是驌', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_6.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_12.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_4.png\"]', '2', '0', '0', '', '0', '1', '1521792707');
INSERT INTO `user_rescue_auth` VALUES ('27', '100176', '', '咯咯', '18988793560', '和 lo', '1002', '12345678907894563', '哦哦哦', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1875.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1875.PNG\"]', 'lo\' w', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1875.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1880.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1876.JPG\"]', '2', '0', '0', '', '0', '1', '1522381561');
INSERT INTO `user_rescue_auth` VALUES ('28', '100199', '', '彭焕', '18681587662', '在线等', '1026', '430422199301121175', '彭焕', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/A65F84A8-F313-4689-9C71-0C5136D74E5F.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/1A0C0C5D-08A7-48C2-A467-854FD5E4295A.png\"]', '剧盽在', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/360A0C31-8347-40DB-AE0B-58C202892984.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/4EDB284F-1C97-4CF6-9B03-99345E91C933.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/6F7A769D-6A3A-40A3-B8CE-0EB91FDAA9A4.jpeg\"]', '2', '0', '0', '', '0', '1', '1522057819');
INSERT INTO `user_rescue_auth` VALUES ('29', '100211', '', '啦旅途', '18988793560', '556', '1026', '1234567890123456789', '和p p', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1888.JPG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1887.PNG\"]', '兔兔', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1879.PNG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1886.JPG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1887.PNG\"]', '1', '0', '0', '', '0', '1', '1522382465');
INSERT INTO `user_rescue_auth` VALUES ('30', '100213', '', '进行', '18681587662', '开始大家哈', '1005', '456918549467391646', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/7ADCD8E1-6660-4608-841E-AED1A5B6A252.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/53487AD0-E46B-406C-8DF8-7F021C9CD771.png\"]', '奇葩说阳春面', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/B325F511-11DA-410D-9BCC-3C53B11B48BA.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/8BE682F4-6A56-403A-A355-40470621E302.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/3A9A8570-8A2E-4703-A58B-6404D0D61BF1.jpeg\"]', '2', '0', '0', '', '0', '1', '1522388839');
INSERT INTO `user_rescue_auth` VALUES ('31', '100214', '', '彭晟', '18681587662', '夰还不是绰杨明古', '1003', '453828555946588484', '南阳古', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/S80330-171203.jpg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/S80222-151134.jpg\"]', 'vdnxnvdb成vxbx已vdbd了', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/S80222-151134.jpg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_1.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/img_3.png\"]', '2', '0', '0', '', '0', '1', '1522637299');
INSERT INTO `user_rescue_auth` VALUES ('32', '100203', '', '记录', '18988793560', '咯哦', '1003', '12345678909874563', '旅途', '[\"https:\\/\\/lyjavatar-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_1894.JPG\",\"https:\\/\\/lyjavatar-1255673705.cos.ap-guangzhou.myqcloud.com\\/IMG_1894.JPG\"]', '咯咯www', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1894.JPG\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/image.jpg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/IMG_1894.JPG\"]', '2', '0', '0', '', '0', '1', '1522657830');
INSERT INTO `user_rescue_auth` VALUES ('33', '100167', 'http://lyjavatar-1255673705.image.myqcloud.com/frontend/2018040417689.png', '嘎嘎', '13760408173', '啦啦啦', '1002', '1234567891234567891', '白白', '[\"https:\\/\\/lyjavatar-1255673705.cos.ap-guangzhou.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_11.jpg\",\"https:\\/\\/lyjavatar-1255673705.cos.ap-guangzhou.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_15.jpg\"]', '喜欢吗', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_15.jpg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_13.jpg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/Balance(magazine)-01-2.3.001-bigpicture_01_9.jpg\"]', '2', '0', '0', '', '0', '1', '1522722248');
INSERT INTO `user_rescue_auth` VALUES ('34', '100198', '', '干嘛蝴蝶瞌睡', '18681587662', '夏日日桌面', '1005', '452813548458454548', '感冒', '[\"https:\\/\\/lyjavatar-1255673705.cos.ap-guangzhou.myqcloud.com\\/01311A7B-E15E-481B-AA46-FB4AF88D3374.png\",\"https:\\/\\/lyjavatar-1255673705.cos.ap-guangzhou.myqcloud.com\\/F13ACBD9-8581-49BD-A538-42D897DBC9EE.png\"]', '需求量昋早在奇葩说目存在慧上面慧', '', '', '[\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/D72CF59B-49A2-4222-9FF0-904E9025430F.jpeg\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/62999BDD-C0BF-4D41-A9A2-E113C187A0F6.png\",\"https:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/E7FD0CDC-50D9-418D-AF2A-A5265E0D7789.png\"]', '2', '0', '0', '', '0', '1', '1522735823');
INSERT INTO `user_rescue_auth` VALUES ('35', '100204', 'http://lyjavatar-1255673705.image.myqcloud.com/frontend/2018040439971.png', '记录yu', '18988793560', 'nan shan', '1005', '12345678907896541', '咯咯', '[\"http:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/frontend\\/2018040433687.png\",\"http:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/frontend\\/2018040454007.png\"]', '啦旅途', '', '', '[\"http:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/frontend\\/2018040471624.png\",\"http:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/frontend\\/2018040454173.png\",\"http:\\/\\/lyjavatar-1255673705.image.myqcloud.com\\/frontend\\/2018040474490.png\"]', '2', '22.223832', '113.422337', '中山', '0', '1', '1522829448');
View Code

 

1.常规排序ASC DESC

ASC 正序,DESC 倒叙

SELECT * FROM `MyTable` WHERE `id` IN (1, 7, 3, 5) ORDER BY `id` DESC/ASC

2.自定义排序

自定义排序是根据自己想要的特定字符串(数字)顺序进行排序。

主要是使用函数 FIELD(str,str1,str2,str3,...)

MySQL的自定义排序,str与str1、str2、str3...进行比较,并按照str1,str2,str3...的顺序输出,如果遇到str为null或者不存在str1,str2,str3...中的情况的则序列为0,

eg:

SELECT * FROM TEST ORDER BY FIELD(value,'test1','test2','test3','test4') ASC/DESC

eg2:

SELECT * FROM TEST WHERE VALUE IN('test1','test2','test3','test4') ORDER BY FIELD(value,'test1','test2','test3','test4') ASC/DESC # 保证只满足条件的进行排序

3.按中文拼音字母排序

如果表字段使用的GBK编码的话,我们可以直接order by value ,因为GBK本身就是按照拼音字母排序ABCDEFGHIGK...,当第一位相同的时候会比较第二位,以此类推。 如果表字段使用的UTF-8编码的话,通常我们都会的编码,这样我们可以使用MySQL的convert方法开转换gbk进行排序。
eg:

SELECT * FROM TEST ORDER BY CONVERT(value USING GBK) ASC/DESC

 

排序扩展(未鉴定):

一、 ORDER BY 排序

要求:按照字段IS_NEW_PROJ的降序、字段LOAN_APR的降序、字段GMT_BUY_START的升序排序

sql语句如下:

SELECT  
    b.PROJECT_ID AS project_id,  
    b.PROJECT_TITLE AS project_title,  
    b.PROJECT_STATUS AS project_status,  
    b.LOAN_FUNDS AS loan_funds,  
    b.REPAY_ORDER AS repay_order,  
    b.LOAN_APR AS loan_apr,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN 0  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN 1  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN 2  
        WHEN b.PROJECT_STATUS = 'FULL_AUDIT' THEN 3  
        WHEN b.PROJECT_STATUS = 'BIDS_AUDIT' THEN 4  
        WHEN b.PROJECT_STATUS = 'BIDS_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'DELAY_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'RUN' THEN 5  
        WHEN b.PROJECT_STATUS = 'CANCEL_AUDIT' THEN 6  
        WHEN b.PROJECT_STATUS = 'CANCEL_PAYMENT' THEN 6  
        WHEN b.PROJECT_STATUS = 'FINISH' THEN 7  
        WHEN b.PROJECT_STATUS = 'AUDIT' THEN 8  
        WHEN b.PROJECT_STATUS = 'EDIT' THEN 8  
        END  
    ) AS status_order,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN  
            timediff(p.GMT_BUY_END, now())  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN  
            timediff(p.GMT_BUY_START, now())  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN  
            timediff(p.GMT_REG_START, now())  
        END  
    ) AS time_order,  
    p.PUBLISH_TIME AS publishTime,  
    p.GMT_BUY_START AS gmt_buy_start,  
    p.IS_NEW_PROJ AS isNewProj  
FROM  
    PJ_BASE_PROJ AS b  
LEFT JOIN PJ_MAIN_PROJ AS p ON b.PROJECT_ID = p.PROJECT_ID  
WHERE  
    b.DELETE_TAG = 'NO'  
AND b.PROJECT_STATUS IN (  
    'BUY',  
    'FULL_AUDIT',  
    'RUN',  
    'FINISH'  
)  
ORDER BY  
    IS_NEW_PROJ DESC,  
    LOAN_APR DESC,  
    GMT_BUY_START ASC  

结果显示:

二、 ORDER BY FIELD排序(自定义排序规则)

 

要求:按照字段PROJECT_STATUS指定的顺序排序

sql语句如下:

SELECT  
    b.PROJECT_ID AS project_id,  
    b.PROJECT_TITLE AS project_title,  
    b.PROJECT_STATUS AS project_status,  
    b.LOAN_FUNDS AS loan_funds,  
    b.REPAY_ORDER AS repay_order,  
    b.LOAN_APR AS loan_apr,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN 0  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN 1  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN 2  
        WHEN b.PROJECT_STATUS = 'FULL_AUDIT' THEN 3  
        WHEN b.PROJECT_STATUS = 'BIDS_AUDIT' THEN 4  
        WHEN b.PROJECT_STATUS = 'BIDS_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'DELAY_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'RUN' THEN 5  
        WHEN b.PROJECT_STATUS = 'CANCEL_AUDIT' THEN 6  
        WHEN b.PROJECT_STATUS = 'CANCEL_PAYMENT' THEN 6  
        WHEN b.PROJECT_STATUS = 'FINISH' THEN 7  
        WHEN b.PROJECT_STATUS = 'AUDIT' THEN 8  
        WHEN b.PROJECT_STATUS = 'EDIT' THEN 8  
        END  
    ) AS status_order,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN  
            timediff(p.GMT_BUY_END, now())  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN  
            timediff(p.GMT_BUY_START, now())  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN  
            timediff(p.GMT_REG_START, now())  
        END  
    ) AS time_order,  
    p.PUBLISH_TIME AS publishTime,  
    p.GMT_BUY_START AS gmt_buy_start,  
    p.IS_NEW_PROJ AS isNewProj  
FROM  
    PJ_BASE_PROJ AS b  
LEFT JOIN PJ_MAIN_PROJ AS p ON b.PROJECT_ID = p.PROJECT_ID  
WHERE  
    b.DELETE_TAG = 'NO'  
AND b.PROJECT_STATUS IN (  
    'BUY',  
    'FULL_AUDIT',  
    'RUN',  
    'FINISH'  
)  
ORDER BY FIELD(PROJECT_STATUS,'BUY','FULL_AUDIT','RUN','FINISH')  

结果显示:

三、 ORDER BY FIELD排序升级(多条件组合排序)

 

要求:按照字段IS_NEW_PROJ降序、字段PROJECT_STATUS指定的顺序排、字段LOAN_APR降序、字段GMT_BUY_START升序

sql语句如下:

SELECT  
    b.PROJECT_ID AS project_id,  
    b.PROJECT_TITLE AS project_title,  
    b.PROJECT_STATUS AS project_status,  
    b.LOAN_FUNDS AS loan_funds,  
    b.REPAY_ORDER AS repay_order,  
    b.LOAN_APR AS loan_apr,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN 0  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN 1  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN 2  
        WHEN b.PROJECT_STATUS = 'FULL_AUDIT' THEN 3  
        WHEN b.PROJECT_STATUS = 'BIDS_AUDIT' THEN 4  
        WHEN b.PROJECT_STATUS = 'BIDS_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'DELAY_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'RUN' THEN 5  
        WHEN b.PROJECT_STATUS = 'CANCEL_AUDIT' THEN 6  
        WHEN b.PROJECT_STATUS = 'CANCEL_PAYMENT' THEN 6  
        WHEN b.PROJECT_STATUS = 'FINISH' THEN 7  
        WHEN b.PROJECT_STATUS = 'AUDIT' THEN 8  
        WHEN b.PROJECT_STATUS = 'EDIT' THEN 8  
        END  
    ) AS status_order,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN  
            timediff(p.GMT_BUY_END, now())  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN  
            timediff(p.GMT_BUY_START, now())  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN  
            timediff(p.GMT_REG_START, now())  
        END  
    ) AS time_order,  
    p.PUBLISH_TIME AS publishTime,  
    p.GMT_BUY_START AS gmt_buy_start,  
    p.IS_NEW_PROJ AS isNewProj  
FROM  
    PJ_BASE_PROJ AS b  
LEFT JOIN PJ_MAIN_PROJ AS p ON b.PROJECT_ID = p.PROJECT_ID  
WHERE  
    b.DELETE_TAG = 'NO'  
AND b.PROJECT_STATUS IN (  
    'BUY',  
    'FULL_AUDIT',  
    'RUN',  
    'FINISH'  
)  
ORDER BY FIELD(IS_NEW_PROJ,'DESC',PROJECT_STATUS,'BUY','FULL_AUDIT','RUN','FINISH',LOAN_APR,'DESC',GMT_BUY_START,'ASC')  

结果显示(此时结果集是混乱的): 

四、 ORDER BY 排序终极版(多条件组合排序+自定义排序)

 

要求:按照字段IS_NEW_PROJ降序、字段PROJECT_STATUS指定的顺序排序、字段GMT_BUY_START降序、字段PROJECT_STATUS指定的顺序排序

sql语句如下:

SELECT  
    b.PROJECT_ID AS project_id,  
    b.PROJECT_TITLE AS project_title,  
    b.PROJECT_STATUS AS project_status,  
    b.LOAN_FUNDS AS loan_funds,  
    b.LOAN_APR AS loan_apr,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN 0  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN 1  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN 2  
        WHEN b.PROJECT_STATUS = 'FULL_AUDIT' THEN 3  
        WHEN b.PROJECT_STATUS = 'BIDS_AUDIT' THEN 4  
        WHEN b.PROJECT_STATUS = 'BIDS_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'DELAY_CONFIRM' THEN 4  
        WHEN b.PROJECT_STATUS = 'RUN' THEN 5  
        WHEN b.PROJECT_STATUS = 'CANCEL_AUDIT' THEN 6  
        WHEN b.PROJECT_STATUS = 'CANCEL_PAYMENT' THEN 6  
        WHEN b.PROJECT_STATUS = 'FINISH' THEN 7  
        WHEN b.PROJECT_STATUS = 'AUDIT' THEN 8  
        WHEN b.PROJECT_STATUS = 'EDIT' THEN 8  
        END  
    ) AS status_order,  
    (  
        CASE  
        WHEN b.PROJECT_STATUS = 'BUY' THEN  
            timediff(p.GMT_BUY_END, now())  
        WHEN b.PROJECT_STATUS = 'PREBUY' THEN  
            timediff(p.GMT_BUY_START, now())  
        WHEN b.PROJECT_STATUS = 'REGISTER' THEN  
            timediff(p.GMT_REG_START, now())  
        END  
    ) AS time_order,  
    p.PUBLISH_TIME AS publishTime,  
    p.GMT_BUY_START AS gmt_buy_start,  
    p.IS_NEW_PROJ AS isNewProj  
FROM  
    PJ_BASE_PROJ AS b  
LEFT JOIN PJ_MAIN_PROJ AS p ON b.PROJECT_ID = p.PROJECT_ID  
WHERE  
    b.DELETE_TAG = 'NO'  
AND b.PROJECT_STATUS IN (  
    'BUY',  
    'FULL_AUDIT',  
    'RUN',  
    'FINISH'  
)  
ORDER BY  
    IS_NEW_PROJ DESC,  
    STATUS_ORDER ASC,  
    p.GMT_BUY_START DESC,  
    TIME_ORDER ASC  

结果显示:

posted @ 2018-04-09 14:43  一个人的孤独自白  阅读(2519)  评论(0编辑  收藏  举报