gongdecai 2 years ago
parent
commit
ff4175535e

+ 92 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheCarSharingAppService.java

@@ -0,0 +1,92 @@
+package com.iotechn.unimall.app.api.pinche;
+
+
+import com.iotechn.unimall.core.annotation.HttpMethod;
+import com.iotechn.unimall.core.annotation.HttpOpenApi;
+import com.iotechn.unimall.core.annotation.HttpParam;
+import com.iotechn.unimall.core.annotation.HttpParamType;
+import com.iotechn.unimall.core.annotation.param.NotNull;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.PincheCarSharing;
+import com.iotechn.unimall.data.model.Page;
+
+import java.util.Date;
+
+/**
+ * 发布信息Service接口
+ * 
+ * @author jlb
+ * @date 2022-11-30
+ */
+@HttpOpenApi(group = "pincheCarSharingApp", description = "发布信息")
+public interface IPincheCarSharingAppService {
+	@HttpMethod(description = "新增")
+	public Boolean add(@NotNull @HttpParam(name = "pincheCarSharing", type = HttpParamType.COMMON, description = "发布信息") PincheCarSharing pincheCarSharing,
+						   @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "列表")
+	public Page<PincheCarSharing> list(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "carpoolingType", type = HttpParamType.COMMON, description = "拼车类型") String carpoolingType,
+							@HttpParam(name = "route", type = HttpParamType.COMMON, description = "路线") String route,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "startPlace", type = HttpParamType.COMMON, description = "出发地点") String startPlace,
+							@HttpParam(name = "endPlace", type = HttpParamType.COMMON, description = "到达地点") String endPlace,
+							@HttpParam(name = "departureLatitude", type = HttpParamType.COMMON, description = "出发经纬度") String departureLatitude,
+							@HttpParam(name = "latitudeArrival", type = HttpParamType.COMMON, description = "到达经纬度") String latitudeArrival,
+							@HttpParam(name = "departureTime", type = HttpParamType.COMMON, description = "出发时间") Date departureTime,
+							@HttpParam(name = "numberPeople", type = HttpParamType.COMMON, description = "人数") String numberPeople,
+							@HttpParam(name = "explain", type = HttpParamType.COMMON, description = "说明") String explain,
+							@HttpParam(name = "unitPrice", type = HttpParamType.COMMON, description = "单价") Double unitPrice,
+							@HttpParam(name = "price", type = HttpParamType.COMMON, description = "总价") Double price,
+							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
+							@HttpParam(name = "remark1", type = HttpParamType.COMMON, description = "备注1") String remark1,
+							@HttpParam(name = "remark2", type = HttpParamType.COMMON, description = "备注2") String remark2,
+							@HttpParam(name = "remark3", type = HttpParamType.COMMON, description = "备注3") String remark3,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0:否(默认) 1:是") Long deleteFlag,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+							@HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+					@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+		@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
+		throws ServiceException;
+
+	@HttpMethod(description = "删除")
+	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
+
+	@HttpMethod(description = "修改")
+	public Boolean update(@NotNull @HttpParam(name = "pincheCarSharing", type = HttpParamType.COMMON, description = "发布信息") PincheCarSharing pincheCarSharing,
+						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "查询")
+	public PincheCarSharing get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
+	
+	@HttpMethod(description = "导出excl表", permission = "admin:unimall:pincheCarSharing:export",permissionParentName = "宠物管理", permissionName = "发布信息管理")
+	public String export(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "carpoolingType", type = HttpParamType.COMMON, description = "拼车类型") String carpoolingType,
+							@HttpParam(name = "route", type = HttpParamType.COMMON, description = "路线") String route,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "startPlace", type = HttpParamType.COMMON, description = "出发地点") String startPlace,
+							@HttpParam(name = "endPlace", type = HttpParamType.COMMON, description = "到达地点") String endPlace,
+							@HttpParam(name = "departureLatitude", type = HttpParamType.COMMON, description = "出发经纬度") String departureLatitude,
+							@HttpParam(name = "latitudeArrival", type = HttpParamType.COMMON, description = "到达经纬度") String latitudeArrival,
+							@HttpParam(name = "departureTime", type = HttpParamType.COMMON, description = "出发时间") Date departureTime,
+							@HttpParam(name = "numberPeople", type = HttpParamType.COMMON, description = "人数") String numberPeople,
+							@HttpParam(name = "explain", type = HttpParamType.COMMON, description = "说明") String explain,
+							@HttpParam(name = "unitPrice", type = HttpParamType.COMMON, description = "单价") Double unitPrice,
+							@HttpParam(name = "price", type = HttpParamType.COMMON, description = "总价") Double price,
+							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
+							@HttpParam(name = "remark1", type = HttpParamType.COMMON, description = "备注1") String remark1,
+							@HttpParam(name = "remark2", type = HttpParamType.COMMON, description = "备注2") String remark2,
+							@HttpParam(name = "remark3", type = HttpParamType.COMMON, description = "备注3") String remark3,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0:否(默认) 1:是") Long deleteFlag,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+							@HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+				@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+	@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)throws ServiceException;
+	
+}

+ 94 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheMakeAppointmentAppService.java

@@ -0,0 +1,94 @@
+package com.iotechn.unimall.app.api.pinche;
+
+
+import com.iotechn.unimall.core.annotation.HttpMethod;
+import com.iotechn.unimall.core.annotation.HttpOpenApi;
+import com.iotechn.unimall.core.annotation.HttpParam;
+import com.iotechn.unimall.core.annotation.HttpParamType;
+import com.iotechn.unimall.core.annotation.param.NotNull;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.PincheMakeAppointment;
+import com.iotechn.unimall.data.model.Page;
+
+import java.util.Date;
+
+/**
+ * 预约信息Service接口
+ * 
+ * @author jlb
+ * @date 2022-11-30
+ */
+@HttpOpenApi(group = "pincheMakeAppointmentApp", description = "预约信息")
+public interface IPincheMakeAppointmentAppService {
+	@HttpMethod(description = "新增")
+	public Boolean add(@NotNull @HttpParam(name = "pincheMakeAppointment") PincheMakeAppointment pincheMakeAppointment,
+						   @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "列表")
+	public Page<PincheMakeAppointment> list(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "appointedBy", type = HttpParamType.COMMON, description = "预约人") String appointedBy,
+							@HttpParam(name = "carpoolingType", type = HttpParamType.COMMON, description = "拼车类型") String carpoolingType,
+							@HttpParam(name = "route", type = HttpParamType.COMMON, description = "路线") String route,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "startPlace", type = HttpParamType.COMMON, description = "出发地点") String startPlace,
+							@HttpParam(name = "endPlace", type = HttpParamType.COMMON, description = "到达地点") String endPlace,
+							@HttpParam(name = "departureLatitude", type = HttpParamType.COMMON, description = "出发经纬度") String departureLatitude,
+							@HttpParam(name = "latitudeArrival", type = HttpParamType.COMMON, description = "到达经纬度") String latitudeArrival,
+							@HttpParam(name = "departureTime", type = HttpParamType.COMMON, description = "出发时间") Date departureTime,
+							@HttpParam(name = "numberPeople", type = HttpParamType.COMMON, description = "人数") String numberPeople,
+							@HttpParam(name = "explain", type = HttpParamType.COMMON, description = "说明") String explain,
+							@HttpParam(name = "unitPrice", type = HttpParamType.COMMON, description = "单价") Double unitPrice,
+							@HttpParam(name = "price", type = HttpParamType.COMMON, description = "总价") Double price,
+							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
+							@HttpParam(name = "remark1", type = HttpParamType.COMMON, description = "备注1") String remark1,
+							@HttpParam(name = "remark2", type = HttpParamType.COMMON, description = "备注2") String remark2,
+							@HttpParam(name = "remark3", type = HttpParamType.COMMON, description = "备注3") String remark3,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0:否(默认) 1:是") Long deleteFlag,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+							@HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+					@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+		@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
+		throws ServiceException;
+
+	@HttpMethod(description = "删除", permission = "admin:unimall:pincheMakeAppointment:delete",permissionParentName = "宠物管理", permissionName = "预约信息管理")
+	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
+
+	@HttpMethod(description = "修改", permission = "admin:unimall:pincheMakeAppointment:update",permissionParentName = "宠物管理", permissionName = "预约信息管理")
+	public Boolean update(@NotNull @HttpParam(name = "pincheMakeAppointment", type = HttpParamType.COMMON, description = "预约信息") PincheMakeAppointment pincheMakeAppointment,
+						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "查询", permission = "admin:unimall:pincheMakeAppointment:get",permissionParentName = "宠物管理", permissionName = "预约信息管理")
+	public PincheMakeAppointment get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
+	
+	@HttpMethod(description = "导出excl表", permission = "admin:unimall:pincheMakeAppointment:export",permissionParentName = "宠物管理", permissionName = "预约信息管理")
+	public String export(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "appointedBy", type = HttpParamType.COMMON, description = "预约人") String appointedBy,
+							@HttpParam(name = "carpoolingType", type = HttpParamType.COMMON, description = "拼车类型") String carpoolingType,
+							@HttpParam(name = "route", type = HttpParamType.COMMON, description = "路线") String route,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "startPlace", type = HttpParamType.COMMON, description = "出发地点") String startPlace,
+							@HttpParam(name = "endPlace", type = HttpParamType.COMMON, description = "到达地点") String endPlace,
+							@HttpParam(name = "departureLatitude", type = HttpParamType.COMMON, description = "出发经纬度") String departureLatitude,
+							@HttpParam(name = "latitudeArrival", type = HttpParamType.COMMON, description = "到达经纬度") String latitudeArrival,
+							@HttpParam(name = "departureTime", type = HttpParamType.COMMON, description = "出发时间") Date departureTime,
+							@HttpParam(name = "numberPeople", type = HttpParamType.COMMON, description = "人数") String numberPeople,
+							@HttpParam(name = "explain", type = HttpParamType.COMMON, description = "说明") String explain,
+							@HttpParam(name = "unitPrice", type = HttpParamType.COMMON, description = "单价") Double unitPrice,
+							@HttpParam(name = "price", type = HttpParamType.COMMON, description = "总价") Double price,
+							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
+							@HttpParam(name = "remark1", type = HttpParamType.COMMON, description = "备注1") String remark1,
+							@HttpParam(name = "remark2", type = HttpParamType.COMMON, description = "备注2") String remark2,
+							@HttpParam(name = "remark3", type = HttpParamType.COMMON, description = "备注3") String remark3,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0:否(默认) 1:是") Long deleteFlag,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+							@HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+				@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+	@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)throws ServiceException;
+	
+}

+ 70 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheRoutePriceAppService.java

@@ -0,0 +1,70 @@
+package com.iotechn.unimall.app.api.pinche;
+
+
+import com.iotechn.unimall.core.annotation.HttpMethod;
+import com.iotechn.unimall.core.annotation.HttpOpenApi;
+import com.iotechn.unimall.core.annotation.HttpParam;
+import com.iotechn.unimall.core.annotation.HttpParamType;
+import com.iotechn.unimall.core.annotation.param.NotNull;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.PincheRoutePrice;
+import com.iotechn.unimall.data.model.Page;
+
+import java.util.Date;
+
+/**
+ * 路线价格Service接口
+ * 
+ * @author jlb
+ * @date 2022-11-30
+ */
+@HttpOpenApi(group = "pincheRoutePriceApp", description = "路线价格")
+public interface IPincheRoutePriceAppService {
+	@HttpMethod(description = "新增", permission = "admin:unimall:pincheRoutePrice:add", permissionParentName = "宠物管理", permissionName = "路线价格管理")
+	public Boolean add(@NotNull @HttpParam(name = "pincheRoutePrice", type = HttpParamType.COMMON, description = "路线价格") PincheRoutePrice pincheRoutePrice,
+						   @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "列表")
+	public Page<PincheRoutePrice> list(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "route", type = HttpParamType.COMMON, description = "路线") String route,
+							@HttpParam(name = "unitPrice", type = HttpParamType.COMMON, description = "单价") Double unitPrice,
+							@HttpParam(name = "remark1", type = HttpParamType.COMMON, description = "备注1") String remark1,
+							@HttpParam(name = "remark2", type = HttpParamType.COMMON, description = "备注2") String remark2,
+							@HttpParam(name = "remark3", type = HttpParamType.COMMON, description = "备注3") String remark3,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0:否(默认) 1:是") Long deleteFlag,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+							@HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+					@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+		@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
+		throws ServiceException;
+
+	@HttpMethod(description = "删除", permission = "admin:unimall:pincheRoutePrice:delete",permissionParentName = "宠物管理", permissionName = "路线价格管理")
+	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
+
+	@HttpMethod(description = "修改", permission = "admin:unimall:pincheRoutePrice:update",permissionParentName = "宠物管理", permissionName = "路线价格管理")
+	public Boolean update(@NotNull @HttpParam(name = "pincheRoutePrice", type = HttpParamType.COMMON, description = "路线价格") PincheRoutePrice pincheRoutePrice,
+						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "查询", permission = "admin:unimall:pincheRoutePrice:get",permissionParentName = "宠物管理", permissionName = "路线价格管理")
+	public PincheRoutePrice get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
+	
+	@HttpMethod(description = "导出excl表", permission = "admin:unimall:pincheRoutePrice:export",permissionParentName = "宠物管理", permissionName = "路线价格管理")
+	public String export(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "route", type = HttpParamType.COMMON, description = "路线") String route,
+							@HttpParam(name = "unitPrice", type = HttpParamType.COMMON, description = "单价") Double unitPrice,
+							@HttpParam(name = "remark1", type = HttpParamType.COMMON, description = "备注1") String remark1,
+							@HttpParam(name = "remark2", type = HttpParamType.COMMON, description = "备注2") String remark2,
+							@HttpParam(name = "remark3", type = HttpParamType.COMMON, description = "备注3") String remark3,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0:否(默认) 1:是") Long deleteFlag,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+							@HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+				@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+	@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)throws ServiceException;
+	
+}

+ 217 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheCarSharingAppServiceImpl.java

@@ -0,0 +1,217 @@
+package com.iotechn.unimall.app.api.pinche.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.iotechn.unimall.app.api.pinche.IPincheCarSharingAppService;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.PincheCarSharing;
+import com.iotechn.unimall.data.mapper.PincheCarSharingMapper;
+import com.iotechn.unimall.data.model.Page;
+import com.iotechn.unimall.data.util.ExcelUtil;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 发布信息Service业务层处理
+ *
+ * @author jlb
+ * @date 2022-11-30
+ */
+@Service
+public class PincheCarSharingAppServiceImpl implements IPincheCarSharingAppService {
+    @Autowired
+    private PincheCarSharingMapper pincheCarSharingMapper;
+
+    @Override
+    public Boolean add(PincheCarSharing pincheCarSharing, Long adminId) throws ServiceException {
+        Date now = new Date();
+        pincheCarSharing.setStatus("进行中");
+        pincheCarSharing.setGmtCreate(now);
+        pincheCarSharing.setGmtUpdate(now);
+        pincheCarSharing.setAdminId(adminId);
+        return pincheCarSharingMapper.insert(pincheCarSharing) > 0;
+    }
+
+    @Override
+    public Page<PincheCarSharing> list(Long companyId, String carpoolingType, String route, String phone, String startPlace, String endPlace, String departureLatitude, String latitudeArrival, Date departureTime, String numberPeople, String explain, Double unitPrice, Double price, String status, String remark1, String remark2, String remark3, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<PincheCarSharing> wrapper = new EntityWrapper<PincheCarSharing>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(carpoolingType)) {
+            wrapper.eq("carpooling_type", carpoolingType);
+        }
+        if (!StringUtils.isEmpty(route)) {
+            wrapper.eq("route", route);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(startPlace)) {
+            wrapper.eq("start_place", startPlace);
+        }
+        if (!StringUtils.isEmpty(endPlace)) {
+            wrapper.eq("end_place", endPlace);
+        }
+        if (!StringUtils.isEmpty(departureLatitude)) {
+            wrapper.eq("departure_latitude", departureLatitude);
+        }
+        if (!StringUtils.isEmpty(latitudeArrival)) {
+            wrapper.eq("latitude_arrival", latitudeArrival);
+        }
+        if (!StringUtils.isEmpty(departureTime)) {
+            wrapper.eq("departure_time", departureTime);
+        }
+        if (!StringUtils.isEmpty(numberPeople)) {
+            wrapper.eq("number_people", numberPeople);
+        }
+        if (!StringUtils.isEmpty(explain)) {
+            wrapper.eq("explain", explain);
+        }
+        if (!StringUtils.isEmpty(unitPrice)) {
+            wrapper.eq("unit_price", unitPrice);
+        }
+        if (!StringUtils.isEmpty(price)) {
+            wrapper.eq("price", price);
+        }
+        if (!StringUtils.isEmpty(status)) {
+            wrapper.eq("status", status);
+        }
+        if (!StringUtils.isEmpty(remark1)) {
+            wrapper.eq("remark1", remark1);
+        }
+        if (!StringUtils.isEmpty(remark2)) {
+            wrapper.eq("remark2", remark2);
+        }
+        if (!StringUtils.isEmpty(remark3)) {
+            wrapper.eq("remark3", remark3);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        wrapper.eq("delete_flag", 0);
+        wrapper.orderBy("departure_time",false);
+        List<PincheCarSharing> list = pincheCarSharingMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = pincheCarSharingMapper.selectCount(wrapper);
+        return new Page<PincheCarSharing>(list, page, limit, count);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(String id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            PincheCarSharing tmp = pincheCarSharingMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1l);
+                pincheCarSharingMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public Boolean update(PincheCarSharing pincheCarSharing, Long adminId) throws ServiceException {
+        Date now = new Date();
+        pincheCarSharing.setGmtUpdate(now);
+        pincheCarSharing.setAdminId(adminId);
+        return pincheCarSharingMapper.updateById(pincheCarSharing) > 0;
+    }
+
+    @Override
+    public PincheCarSharing get(Long id) throws ServiceException {
+        return pincheCarSharingMapper.selectById(id);
+    }
+
+    @Override
+    public String export(Long companyId, String carpoolingType, String route, String phone, String startPlace, String endPlace, String departureLatitude, String latitudeArrival, Date departureTime, String numberPeople, String explain, Double unitPrice, Double price, String status, String remark1, String remark2, String remark3, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<PincheCarSharing> wrapper = new EntityWrapper<PincheCarSharing>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(carpoolingType)) {
+            wrapper.eq("carpooling_type", carpoolingType);
+        }
+        if (!StringUtils.isEmpty(route)) {
+            wrapper.eq("route", route);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(startPlace)) {
+            wrapper.eq("start_place", startPlace);
+        }
+        if (!StringUtils.isEmpty(endPlace)) {
+            wrapper.eq("end_place", endPlace);
+        }
+        if (!StringUtils.isEmpty(departureLatitude)) {
+            wrapper.eq("departure_latitude", departureLatitude);
+        }
+        if (!StringUtils.isEmpty(latitudeArrival)) {
+            wrapper.eq("latitude_arrival", latitudeArrival);
+        }
+        if (!StringUtils.isEmpty(departureTime)) {
+            wrapper.eq("departure_time", departureTime);
+        }
+        if (!StringUtils.isEmpty(numberPeople)) {
+            wrapper.eq("number_people", numberPeople);
+        }
+        if (!StringUtils.isEmpty(explain)) {
+            wrapper.eq("explain", explain);
+        }
+        if (!StringUtils.isEmpty(unitPrice)) {
+            wrapper.eq("unit_price", unitPrice);
+        }
+        if (!StringUtils.isEmpty(price)) {
+            wrapper.eq("price", price);
+        }
+        if (!StringUtils.isEmpty(status)) {
+            wrapper.eq("status", status);
+        }
+        if (!StringUtils.isEmpty(remark1)) {
+            wrapper.eq("remark1", remark1);
+        }
+        if (!StringUtils.isEmpty(remark2)) {
+            wrapper.eq("remark2", remark2);
+        }
+        if (!StringUtils.isEmpty(remark3)) {
+            wrapper.eq("remark3", remark3);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        List<PincheCarSharing> list = pincheCarSharingMapper.selectList(wrapper);
+        ExcelUtil<PincheCarSharing> util = new ExcelUtil<PincheCarSharing>(PincheCarSharing.class);
+        return util.exportExcel(list, "操作日志");
+    }
+}

+ 221 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheMakeAppointmentAppServiceImpl.java

@@ -0,0 +1,221 @@
+package com.iotechn.unimall.app.api.pinche.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.iotechn.unimall.app.api.pinche.IPincheMakeAppointmentAppService;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.PincheMakeAppointment;
+import com.iotechn.unimall.data.mapper.PincheMakeAppointmentMapper;
+import com.iotechn.unimall.data.model.Page;
+import com.iotechn.unimall.data.util.ExcelUtil;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 预约信息Service业务层处理
+ *
+ * @author jlb
+ * @date 2022-11-30
+ */
+@Service
+public class PincheMakeAppointmentAppServiceImpl implements IPincheMakeAppointmentAppService {
+    @Autowired
+    private PincheMakeAppointmentMapper pincheMakeAppointmentMapper;
+
+    @Override
+    public Boolean add(PincheMakeAppointment pincheMakeAppointment, Long adminId) throws ServiceException {
+        Date now = new Date();
+        pincheMakeAppointment.setGmtCreate(now);
+        pincheMakeAppointment.setGmtUpdate(now);
+        pincheMakeAppointment.setAdminId(adminId);
+        return pincheMakeAppointmentMapper.insert(pincheMakeAppointment) > 0;
+    }
+
+    @Override
+    public Page<PincheMakeAppointment> list(Long companyId, String appointedBy, String carpoolingType, String route, String phone, String startPlace, String endPlace, String departureLatitude, String latitudeArrival, Date departureTime, String numberPeople, String explain, Double unitPrice, Double price, String status, String remark1, String remark2, String remark3, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<PincheMakeAppointment> wrapper = new EntityWrapper<PincheMakeAppointment>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(appointedBy)) {
+            wrapper.eq("appointed_by", appointedBy);
+        }
+        if (!StringUtils.isEmpty(carpoolingType)) {
+            wrapper.eq("carpooling_type", carpoolingType);
+        }
+        if (!StringUtils.isEmpty(route)) {
+            wrapper.eq("route", route);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(startPlace)) {
+            wrapper.eq("start_place", startPlace);
+        }
+        if (!StringUtils.isEmpty(endPlace)) {
+            wrapper.eq("end_place", endPlace);
+        }
+        if (!StringUtils.isEmpty(departureLatitude)) {
+            wrapper.eq("departure_latitude", departureLatitude);
+        }
+        if (!StringUtils.isEmpty(latitudeArrival)) {
+            wrapper.eq("latitude_arrival", latitudeArrival);
+        }
+        if (!StringUtils.isEmpty(departureTime)) {
+            wrapper.eq("departure_time", departureTime);
+        }
+        if (!StringUtils.isEmpty(numberPeople)) {
+            wrapper.eq("number_people", numberPeople);
+        }
+        if (!StringUtils.isEmpty(explain)) {
+            wrapper.eq("explain", explain);
+        }
+        if (!StringUtils.isEmpty(unitPrice)) {
+            wrapper.eq("unit_price", unitPrice);
+        }
+        if (!StringUtils.isEmpty(price)) {
+            wrapper.eq("price", price);
+        }
+        if (!StringUtils.isEmpty(status)) {
+            wrapper.eq("status", status);
+        }
+        if (!StringUtils.isEmpty(remark1)) {
+            wrapper.eq("remark1", remark1);
+        }
+        if (!StringUtils.isEmpty(remark2)) {
+            wrapper.eq("remark2", remark2);
+        }
+        if (!StringUtils.isEmpty(remark3)) {
+            wrapper.eq("remark3", remark3);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        wrapper.eq("delete_flag", 0);
+        List<PincheMakeAppointment> list = pincheMakeAppointmentMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = pincheMakeAppointmentMapper.selectCount(wrapper);
+        return new Page<PincheMakeAppointment>(list, page, limit, count);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(String id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            PincheMakeAppointment tmp = pincheMakeAppointmentMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1l);
+                pincheMakeAppointmentMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public Boolean update(PincheMakeAppointment pincheMakeAppointment, Long adminId) throws ServiceException {
+        Date now = new Date();
+        pincheMakeAppointment.setGmtUpdate(now);
+        pincheMakeAppointment.setAdminId(adminId);
+        return pincheMakeAppointmentMapper.updateById(pincheMakeAppointment) > 0;
+    }
+
+    @Override
+    public PincheMakeAppointment get(Long id) throws ServiceException {
+        return pincheMakeAppointmentMapper.selectById(id);
+    }
+
+    @Override
+    public String export(Long companyId, String appointedBy, String carpoolingType, String route, String phone, String startPlace, String endPlace, String departureLatitude, String latitudeArrival, Date departureTime, String numberPeople, String explain, Double unitPrice, Double price, String status, String remark1, String remark2, String remark3, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<PincheMakeAppointment> wrapper = new EntityWrapper<PincheMakeAppointment>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(appointedBy)) {
+            wrapper.eq("appointed_by", appointedBy);
+        }
+        if (!StringUtils.isEmpty(carpoolingType)) {
+            wrapper.eq("carpooling_type", carpoolingType);
+        }
+        if (!StringUtils.isEmpty(route)) {
+            wrapper.eq("route", route);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(startPlace)) {
+            wrapper.eq("start_place", startPlace);
+        }
+        if (!StringUtils.isEmpty(endPlace)) {
+            wrapper.eq("end_place", endPlace);
+        }
+        if (!StringUtils.isEmpty(departureLatitude)) {
+            wrapper.eq("departure_latitude", departureLatitude);
+        }
+        if (!StringUtils.isEmpty(latitudeArrival)) {
+            wrapper.eq("latitude_arrival", latitudeArrival);
+        }
+        if (!StringUtils.isEmpty(departureTime)) {
+            wrapper.eq("departure_time", departureTime);
+        }
+        if (!StringUtils.isEmpty(numberPeople)) {
+            wrapper.eq("number_people", numberPeople);
+        }
+        if (!StringUtils.isEmpty(explain)) {
+            wrapper.eq("explain", explain);
+        }
+        if (!StringUtils.isEmpty(unitPrice)) {
+            wrapper.eq("unit_price", unitPrice);
+        }
+        if (!StringUtils.isEmpty(price)) {
+            wrapper.eq("price", price);
+        }
+        if (!StringUtils.isEmpty(status)) {
+            wrapper.eq("status", status);
+        }
+        if (!StringUtils.isEmpty(remark1)) {
+            wrapper.eq("remark1", remark1);
+        }
+        if (!StringUtils.isEmpty(remark2)) {
+            wrapper.eq("remark2", remark2);
+        }
+        if (!StringUtils.isEmpty(remark3)) {
+            wrapper.eq("remark3", remark3);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        List<PincheMakeAppointment> list = pincheMakeAppointmentMapper.selectList(wrapper);
+        ExcelUtil<PincheMakeAppointment> util = new ExcelUtil<PincheMakeAppointment>(PincheMakeAppointment.class);
+        return util.exportExcel(list, "操作日志");
+    }
+}

+ 149 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheRoutePriceAppServiceImpl.java

@@ -0,0 +1,149 @@
+package com.iotechn.unimall.app.api.pinche.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.iotechn.unimall.app.api.pinche.IPincheRoutePriceAppService;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.PincheRoutePrice;
+import com.iotechn.unimall.data.mapper.PincheRoutePriceMapper;
+import com.iotechn.unimall.data.model.Page;
+import com.iotechn.unimall.data.util.ExcelUtil;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 路线价格Service业务层处理
+ *
+ * @author jlb
+ * @date 2022-11-30
+ */
+@Service
+public class PincheRoutePriceAppServiceImpl implements IPincheRoutePriceAppService {
+    @Autowired
+    private PincheRoutePriceMapper pincheRoutePriceMapper;
+
+    @Override
+    public Boolean add(PincheRoutePrice pincheRoutePrice, Long adminId) throws ServiceException {
+        Date now = new Date();
+        pincheRoutePrice.setGmtCreate(now);
+        pincheRoutePrice.setGmtUpdate(now);
+        pincheRoutePrice.setAdminId(adminId);
+        return pincheRoutePriceMapper.insert(pincheRoutePrice) > 0;
+    }
+
+    @Override
+    public Page<PincheRoutePrice> list(Long companyId, String route, Double unitPrice, String remark1, String remark2, String remark3, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<PincheRoutePrice> wrapper = new EntityWrapper<PincheRoutePrice>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(route)) {
+            wrapper.eq("route", route);
+        }
+        if (!StringUtils.isEmpty(unitPrice)) {
+            wrapper.eq("unit_price", unitPrice);
+        }
+        if (!StringUtils.isEmpty(remark1)) {
+            wrapper.eq("remark1", remark1);
+        }
+        if (!StringUtils.isEmpty(remark2)) {
+            wrapper.eq("remark2", remark2);
+        }
+        if (!StringUtils.isEmpty(remark3)) {
+            wrapper.eq("remark3", remark3);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        wrapper.eq("delete_flag", 0);
+        List<PincheRoutePrice> list = pincheRoutePriceMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = pincheRoutePriceMapper.selectCount(wrapper);
+        return new Page<PincheRoutePrice>(list, page, limit, count);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(String id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            PincheRoutePrice tmp = pincheRoutePriceMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1l);
+                pincheRoutePriceMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public Boolean update(PincheRoutePrice pincheRoutePrice, Long adminId) throws ServiceException {
+        Date now = new Date();
+        pincheRoutePrice.setGmtUpdate(now);
+        pincheRoutePrice.setAdminId(adminId);
+        return pincheRoutePriceMapper.updateById(pincheRoutePrice) > 0;
+    }
+
+    @Override
+    public PincheRoutePrice get(Long id) throws ServiceException {
+        return pincheRoutePriceMapper.selectById(id);
+    }
+
+    @Override
+    public String export(Long companyId, String route, Double unitPrice, String remark1, String remark2, String remark3, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<PincheRoutePrice> wrapper = new EntityWrapper<PincheRoutePrice>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(route)) {
+            wrapper.eq("route", route);
+        }
+        if (!StringUtils.isEmpty(unitPrice)) {
+            wrapper.eq("unit_price", unitPrice);
+        }
+        if (!StringUtils.isEmpty(remark1)) {
+            wrapper.eq("remark1", remark1);
+        }
+        if (!StringUtils.isEmpty(remark2)) {
+            wrapper.eq("remark2", remark2);
+        }
+        if (!StringUtils.isEmpty(remark3)) {
+            wrapper.eq("remark3", remark3);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        List<PincheRoutePrice> list = pincheRoutePriceMapper.selectList(wrapper);
+        ExcelUtil<PincheRoutePrice> util = new ExcelUtil<PincheRoutePrice>(PincheRoutePrice.class);
+        return util.exportExcel(list, "操作日志");
+    }
+}

+ 8 - 0
unimall-data/pom.xml

@@ -122,6 +122,14 @@
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+		</dependency>
 	</dependencies>
 
 </project>

+ 175 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/CacheComponent.java

@@ -0,0 +1,175 @@
+package com.iotechn.unimall.data.domain;
+
+import com.alibaba.fastjson.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Created by rize on 2019/3/22.
+ */
+@Component
+public class CacheComponent {
+
+    @Autowired
+    private StringRedisTemplate stringRedisTemplate;
+
+    public void putObj(String key, Object obj, Integer expireSec) {
+        if (expireSec != null) {
+            stringRedisTemplate.opsForValue().set(key, JSONObject.toJSONString(obj), expireSec, TimeUnit.SECONDS);
+        } else {
+            stringRedisTemplate.opsForValue().set(key, JSONObject.toJSONString(obj));
+        }
+    }
+
+    public Long incRaw(String key) {
+        return stringRedisTemplate.opsForValue().increment(key);
+    }
+
+    public  <T> T getObj(String key, Class<T> clazz) {
+        String json = stringRedisTemplate.opsForValue().get(key);
+        if (StringUtils.isEmpty(json)) {
+            return null;
+        }
+        return JSONObject.parseObject(json, clazz);
+    }
+
+    public <T> List<T> getObjList(String key, Class<T> clazz) {
+        String json = stringRedisTemplate.opsForValue().get(key);
+        if (StringUtils.isEmpty(json)) {
+            return null;
+        }
+        return JSONObject.parseArray(json, clazz);
+    }
+
+    public void putHashAll(String key, Map<String, String> map, Integer expireSec) {
+        stringRedisTemplate.opsForHash().putAll(key, map);
+        stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+    }
+
+    public Map<String,String> getHashAll(String key) {
+        if (!stringRedisTemplate.hasKey(key)) {
+            return null;
+        }
+        return (Map)stringRedisTemplate.opsForHash().entries(key);
+    }
+
+    public <T> T getHashObj(String hashName, String key, Class<T> clazz) {
+        String o = (String) stringRedisTemplate.opsForHash().get(hashName, key);
+        if (StringUtils.isEmpty(o)) {
+            return null;
+        }
+        return JSONObject.parseObject(o, clazz);
+    }
+
+    public String getHashRaw(String hashName, String key) {
+        String o = (String) stringRedisTemplate.opsForHash().get(hashName, key);
+        if (StringUtils.isEmpty(o)) {
+            return null;
+        }
+        return o;
+    }
+
+    public <T> List<T> getHashArray(String hashName, String key, Class<T> clazz) {
+        String o = (String) stringRedisTemplate.opsForHash().get(hashName, key);
+        if (StringUtils.isEmpty(o)) {
+            return null;
+        }
+        return JSONObject.parseArray(o, clazz);
+    }
+
+    public Long incHashRaw(String hashName, String key, long delta) {
+        return stringRedisTemplate.opsForHash().increment(hashName, key, delta);
+    }
+
+    public void putHashRaw(String hashName, String key, String str, Integer expireSec) {
+        boolean hasKey = stringRedisTemplate.hasKey(key);
+        stringRedisTemplate.opsForHash().put(hashName, key, str);
+        if (!hasKey) {
+            stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+        }
+    }
+
+    public void putHashRaw(String hashName, String key, String str) {
+        stringRedisTemplate.opsForHash().put(hashName, key, str);
+    }
+
+    public void putHashObj(String hashName, String key, Object obj, Integer expireSec) {
+        boolean hasKey = stringRedisTemplate.hasKey(key);
+        stringRedisTemplate.opsForHash().put(hashName, key, JSONObject.toJSONString(obj));
+        if (!hasKey) {
+            stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+        }
+    }
+
+    public void delHashObj(String hashName, String key) {
+        stringRedisTemplate.opsForHash().delete(hashName, key);
+    }
+
+
+    public void putRaw(String key, String value) {
+        putRaw(key, value, null);
+    }
+
+    public void putRaw(String key, String value, Integer expireSec) {
+        if (expireSec != null) {
+            stringRedisTemplate.opsForValue().set(key, value, expireSec, TimeUnit.SECONDS);
+        } else {
+            stringRedisTemplate.opsForValue().set(key, value);
+        }
+    }
+
+    public String getRaw(String key) {
+        return stringRedisTemplate.opsForValue().get(key);
+    }
+
+    public void del(String key) {
+        stringRedisTemplate.delete(key);
+    }
+
+    public boolean hasKey(String key) {
+        return stringRedisTemplate.hasKey(key);
+    }
+
+    public void putSetRaw(String key, String member, Integer expireSec) {
+        stringRedisTemplate.opsForSet().add(key, member);
+        stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+    }
+
+    public void putSetRawAll(String key, String[] set, Integer expireSec) {
+        stringRedisTemplate.opsForSet().add(key, set);
+        stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+    }
+
+    public void removeSetRaw(String key, String member) {
+        stringRedisTemplate.opsForSet().remove(key, member);
+    }
+
+    public boolean isSetMember(String key, String member) {
+        return stringRedisTemplate.opsForSet().isMember(key, member);
+    }
+
+    /**
+     * 获取指定前缀的Key
+     * @param prefix
+     * @return
+     */
+    public Set<String> getPrefixKeySet(String prefix) {
+        return stringRedisTemplate.keys(prefix + "*");
+    }
+
+    public void delPrefixKey(String prefix) {
+        Set<String> prefixKeySet = getPrefixKeySet(prefix);
+        for (String key : prefixKeySet) {
+            stringRedisTemplate.delete(key);
+        }
+    }
+
+
+}

+ 6 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/PincheCarSharing.java

@@ -1,5 +1,7 @@
 package com.iotechn.unimall.data.domain;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
@@ -10,6 +12,8 @@ import lombok.Data;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.util.Date;
 
 /**
@@ -70,6 +74,8 @@ public class PincheCarSharing extends SuperDO{
     /** 出发时间 */
     @Excel(name = "出发时间", width = 30, dateFormat = "yyyy-MM-dd")
     @TableField("departure_time")
+    @JSONField(format = "yyyy-MM-dd HH:mm")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
     private Date departureTime;
 
     /** 人数 */