gongdecai 1 gadu atpakaļ
vecāks
revīzija
594e7ef998
23 mainītis faili ar 1035 papildinājumiem un 18 dzēšanām
  1. BIN
      11.png
  2. BIN
      111.jpg
  3. BIN
      123.png
  4. BIN
      22.png
  5. BIN
      2f489f03-d82d-4d7e-a17b-bdeb0a7ce027.png
  6. BIN
      333.png
  7. BIN
      57eed33d2aa005c82756d4591a0cc4e.png
  8. BIN
      app.png
  9. 88 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/pinche/IPincheVehicleFilingService.java
  10. 221 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/pinche/impl/PincheVehicleFilingServiceImpl.java
  11. 6 1
      unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheRoutePriceAppService.java
  12. 89 0
      unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheVehicleFilingAppService.java
  13. 15 0
      unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheRoutePriceAppServiceImpl.java
  14. 215 0
      unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheVehicleFilingAppServiceImpl.java
  15. 9 1
      unimall-data/pom.xml
  16. 154 0
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/PincheVehicleFiling.java
  17. 14 0
      unimall-data/src/main/java/com/iotechn/unimall/data/mapper/PincheVehicleFilingMapper.java
  18. 199 0
      unimall-data/src/main/java/com/iotechn/unimall/data/util/LocalUploadImageUtils.java
  19. 2 2
      unimall-data/src/main/java/com/iotechn/unimall/data/util/WeiXinQiYeUtil.java
  20. 9 0
      unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/PincheVehicleFilingMapper.xml
  21. 3 1
      unimall-launcher/src/main/java/com/iotechn/unimall/launcher/controller/ApiController.java
  22. 8 12
      unimall-launcher/src/main/java/com/iotechn/unimall/launcher/controller/FileUploadController.java
  23. 3 1
      unimall-launcher/src/main/resources/application.properties

BIN
11.png


BIN
111.jpg


BIN
123.png


BIN
22.png


BIN
2f489f03-d82d-4d7e-a17b-bdeb0a7ce027.png


BIN
333.png


BIN
57eed33d2aa005c82756d4591a0cc4e.png


BIN
app.png


+ 88 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/pinche/IPincheVehicleFilingService.java

@@ -0,0 +1,88 @@
+package com.iotechn.unimall.admin.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.PincheVehicleFiling;
+import com.iotechn.unimall.data.model.Page;
+import java.util.Date;
+
+/**
+ * 司机认证Service接口
+ * 
+ * @author jlb
+ * @date 2023-02-17
+ */
+@HttpOpenApi(group = "admin.unimall.pincheVehicleFiling", description = "司机认证")
+public interface IPincheVehicleFilingService{
+	@HttpMethod(description = "新增", permission = "admin:unimall:pincheVehicleFiling:add", permissionParentName = "宠物管理", permissionName = "司机认证管理")
+	public Boolean add(@NotNull @HttpParam(name = "pincheVehicleFiling", type = HttpParamType.COMMON, description = "司机认证") PincheVehicleFiling pincheVehicleFiling,
+						   @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "列表")
+	public Page<PincheVehicleFiling> list(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "dept", type = HttpParamType.COMMON, description = "部门") String dept,
+							@HttpParam(name = "driverName", type = HttpParamType.COMMON, description = "姓名") String driverName,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "employeeNo", type = HttpParamType.COMMON, description = "员工号") String employeeNo,
+							@HttpParam(name = "carNo", type = HttpParamType.COMMON, description = "车牌号") String carNo,
+							@HttpParam(name = "pinpai", type = HttpParamType.COMMON, description = "品牌") String pinpai,
+							@HttpParam(name = "color", type = HttpParamType.COMMON, description = "颜色") String color,
+							@HttpParam(name = "jiashiben", type = HttpParamType.COMMON, description = "驾驶本") String jiashiben,
+							@HttpParam(name = "xingshiben", type = HttpParamType.COMMON, description = "行驶本") String xingshiben,
+							@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:pincheVehicleFiling:delete",permissionParentName = "宠物管理", permissionName = "司机认证管理")
+	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
+
+	@HttpMethod(description = "修改")
+	public Boolean update(@NotNull @HttpParam(name = "pincheVehicleFiling", type = HttpParamType.COMMON, description = "司机认证") PincheVehicleFiling pincheVehicleFiling,
+						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+	@HttpMethod(description = "修改")
+	public Boolean audit(@NotNull @HttpParam(name = "pincheVehicleFiling", type = HttpParamType.COMMON, description = "司机认证") PincheVehicleFiling pincheVehicleFiling,
+						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "查询", permission = "admin:unimall:pincheVehicleFiling:get",permissionParentName = "宠物管理", permissionName = "司机认证管理")
+	public PincheVehicleFiling get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
+	
+	@HttpMethod(description = "导出excl表", permission = "admin:unimall:pincheVehicleFiling:export",permissionParentName = "宠物管理", permissionName = "司机认证管理")
+	public String export(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "dept", type = HttpParamType.COMMON, description = "部门") String dept,
+							@HttpParam(name = "driverName", type = HttpParamType.COMMON, description = "姓名") String driverName,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "employeeNo", type = HttpParamType.COMMON, description = "员工号") String employeeNo,
+							@HttpParam(name = "carNo", type = HttpParamType.COMMON, description = "车牌号") String carNo,
+							@HttpParam(name = "pinpai", type = HttpParamType.COMMON, description = "品牌") String pinpai,
+							@HttpParam(name = "color", type = HttpParamType.COMMON, description = "颜色") String color,
+							@HttpParam(name = "jiashiben", type = HttpParamType.COMMON, description = "驾驶本") String jiashiben,
+							@HttpParam(name = "xingshiben", type = HttpParamType.COMMON, description = "行驶本") String xingshiben,
+							@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;
+	
+}

+ 221 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/pinche/impl/PincheVehicleFilingServiceImpl.java

@@ -0,0 +1,221 @@
+package com.iotechn.unimall.admin.api.pinche.impl;
+
+import java.util.List;
+
+import com.iotechn.unimall.admin.api.pinche.IPincheVehicleFilingService;
+import com.iotechn.unimall.data.domain.PincheVehicleFiling;
+import com.iotechn.unimall.data.mapper.PincheVehicleFilingMapper;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.util.ExcelUtil;
+import com.iotechn.unimall.data.model.Page;
+
+import java.util.Date;
+
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 司机认证Service业务层处理
+ *
+ * @author jlb
+ * @date 2023-02-17
+ */
+@Service
+public class PincheVehicleFilingServiceImpl implements IPincheVehicleFilingService {
+    @Autowired
+    private PincheVehicleFilingMapper pincheVehicleFilingMapper;
+
+    @Override
+    public Boolean add(PincheVehicleFiling pincheVehicleFiling, Long adminId) throws ServiceException {
+        Date now = new Date();
+		pincheVehicleFiling.setStatus("待管理员审核");
+        pincheVehicleFiling.setGmtCreate(now);
+        pincheVehicleFiling.setGmtUpdate(now);
+        pincheVehicleFiling.setAdminId(adminId);
+        return pincheVehicleFilingMapper.insert(pincheVehicleFiling) > 0;
+    }
+
+    @Override
+    public Page<PincheVehicleFiling> list(Long companyId, String dept, String driverName, String phone, String employeeNo, String carNo, String pinpai, String color, String jiashiben, String xingshiben, 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<PincheVehicleFiling> wrapper = new EntityWrapper<PincheVehicleFiling>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(dept)) {
+            wrapper.eq("dept", dept);
+        }
+        if (!StringUtils.isEmpty(driverName)) {
+            wrapper.eq("driver_name", driverName);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(employeeNo)) {
+            wrapper.eq("employee_no", employeeNo);
+        }
+        if (!StringUtils.isEmpty(carNo)) {
+            wrapper.eq("car_no", carNo);
+        }
+        if (!StringUtils.isEmpty(pinpai)) {
+            wrapper.eq("pinpai", pinpai);
+        }
+        if (!StringUtils.isEmpty(color)) {
+            wrapper.eq("color", color);
+        }
+        if (!StringUtils.isEmpty(jiashiben)) {
+            wrapper.eq("jiashiben", jiashiben);
+        }
+        if (!StringUtils.isEmpty(xingshiben)) {
+            wrapper.eq("xingshiben", xingshiben);
+        }
+        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<PincheVehicleFiling> list = pincheVehicleFilingMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = pincheVehicleFilingMapper.selectCount(wrapper);
+        return new Page<PincheVehicleFiling>(list, page, limit, count);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(String id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            PincheVehicleFiling tmp = pincheVehicleFilingMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1l);
+                pincheVehicleFilingMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public Boolean update(PincheVehicleFiling pincheVehicleFiling, Long adminId) throws ServiceException {
+        Date now = new Date();
+		pincheVehicleFiling.setStatus("待管理员审核");
+        pincheVehicleFiling.setGmtUpdate(now);
+        pincheVehicleFiling.setAdminId(adminId);
+        return pincheVehicleFilingMapper.updateById(pincheVehicleFiling) > 0;
+    }
+
+
+	@Override
+	public Boolean audit(PincheVehicleFiling pincheVehicleFiling, Long adminId) throws ServiceException {
+		PincheVehicleFiling pincheVehicleFiling1 = pincheVehicleFilingMapper.selectById(pincheVehicleFiling.getId());
+    	if("1".equals(pincheVehicleFiling.getFlag())){
+			pincheVehicleFiling1.setStatus("审核通过");
+		}
+    	else{
+			pincheVehicleFiling1.setStatus("审核未通过");
+		}
+		Date now = new Date();
+		pincheVehicleFiling1.setGmtUpdate(now);
+		pincheVehicleFiling1.setAdminId(adminId);
+		return pincheVehicleFilingMapper.updateById(pincheVehicleFiling1) > 0;
+	}
+
+    @Override
+    public PincheVehicleFiling get(Long id) throws ServiceException {
+        return pincheVehicleFilingMapper.selectById(id);
+    }
+
+    @Override
+    public String export(Long companyId, String dept, String driverName, String phone, String employeeNo, String carNo, String pinpai, String color, String jiashiben, String xingshiben, 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<PincheVehicleFiling> wrapper = new EntityWrapper<PincheVehicleFiling>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(dept)) {
+            wrapper.eq("dept", dept);
+        }
+        if (!StringUtils.isEmpty(driverName)) {
+            wrapper.eq("driver_name", driverName);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(employeeNo)) {
+            wrapper.eq("employee_no", employeeNo);
+        }
+        if (!StringUtils.isEmpty(carNo)) {
+            wrapper.eq("car_no", carNo);
+        }
+        if (!StringUtils.isEmpty(pinpai)) {
+            wrapper.eq("pinpai", pinpai);
+        }
+        if (!StringUtils.isEmpty(color)) {
+            wrapper.eq("color", color);
+        }
+        if (!StringUtils.isEmpty(jiashiben)) {
+            wrapper.eq("jiashiben", jiashiben);
+        }
+        if (!StringUtils.isEmpty(xingshiben)) {
+            wrapper.eq("xingshiben", xingshiben);
+        }
+        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<PincheVehicleFiling> list = pincheVehicleFilingMapper.selectList(wrapper);
+        ExcelUtil<PincheVehicleFiling> util = new ExcelUtil<PincheVehicleFiling>(PincheVehicleFiling.class);
+        return util.exportExcel(list, "操作日志");
+    }
+
+
+
+}

+ 6 - 1
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheRoutePriceAppService.java

@@ -9,6 +9,7 @@ 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 org.springframework.web.multipart.MultipartFile;
 
 import java.util.Date;
 
@@ -20,7 +21,11 @@ import java.util.Date;
  */
 @HttpOpenApi(group = "pincheRoutePriceApp", description = "路线价格")
 public interface IPincheRoutePriceAppService {
-	@HttpMethod(description = "新增", permission = "admin:unimall:pincheRoutePrice:add", permissionParentName = "宠物管理", permissionName = "路线价格管理")
+	@HttpMethod(description = "新增")
+	public String UploadPicture(@HttpParam(name = "file", type = HttpParamType.COMMON, description = "路径") MultipartFile file)throws ServiceException;
+
+
+	@HttpMethod(description = "新增")
 	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;
 

+ 89 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/IPincheVehicleFilingAppService.java

@@ -0,0 +1,89 @@
+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.PincheVehicleFiling;
+import com.iotechn.unimall.data.model.Page;
+
+import java.util.Date;
+
+/**
+ * 司机认证Service接口
+ * 
+ * @author jlb
+ * @date 2023-02-17
+ */
+@HttpOpenApi(group = "pincheVehicleFilingApp", description = "司机认证")
+public interface IPincheVehicleFilingAppService {
+	@HttpMethod(description = "新增")
+	public Boolean add(@NotNull @HttpParam(name = "pincheVehicleFiling", type = HttpParamType.COMMON, description = "司机认证") PincheVehicleFiling pincheVehicleFiling,
+						   @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "列表")
+	public Page<PincheVehicleFiling> list(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "dept", type = HttpParamType.COMMON, description = "部门") String dept,
+							@HttpParam(name = "driverName", type = HttpParamType.COMMON, description = "姓名") String driverName,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "employeeNo", type = HttpParamType.COMMON, description = "员工号") String employeeNo,
+							@HttpParam(name = "carNo", type = HttpParamType.COMMON, description = "车牌号") String carNo,
+							@HttpParam(name = "pinpai", type = HttpParamType.COMMON, description = "品牌") String pinpai,
+							@HttpParam(name = "color", type = HttpParamType.COMMON, description = "颜色") String color,
+							@HttpParam(name = "jiashiben", type = HttpParamType.COMMON, description = "驾驶本") String jiashiben,
+							@HttpParam(name = "xingshiben", type = HttpParamType.COMMON, description = "行驶本") String xingshiben,
+							@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 = "pincheVehicleFiling", type = HttpParamType.COMMON, description = "司机认证") PincheVehicleFiling pincheVehicleFiling,
+						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+	@HttpMethod(description = "审核")
+	public Boolean audit(@NotNull @HttpParam(name = "pincheVehicleFiling", type = HttpParamType.COMMON, description = "司机认证") PincheVehicleFiling pincheVehicleFiling,
+						  @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId)throws ServiceException;
+
+	@HttpMethod(description = "查询", permission = "admin:unimall:pincheVehicleFiling:get",permissionParentName = "宠物管理", permissionName = "司机认证管理")
+	public PincheVehicleFiling get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
+	
+	@HttpMethod(description = "导出excl表", permission = "admin:unimall:pincheVehicleFiling:export",permissionParentName = "宠物管理", permissionName = "司机认证管理")
+	public String export(
+								@HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
+							@HttpParam(name = "dept", type = HttpParamType.COMMON, description = "部门") String dept,
+							@HttpParam(name = "driverName", type = HttpParamType.COMMON, description = "姓名") String driverName,
+							@HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
+							@HttpParam(name = "employeeNo", type = HttpParamType.COMMON, description = "员工号") String employeeNo,
+							@HttpParam(name = "carNo", type = HttpParamType.COMMON, description = "车牌号") String carNo,
+							@HttpParam(name = "pinpai", type = HttpParamType.COMMON, description = "品牌") String pinpai,
+							@HttpParam(name = "color", type = HttpParamType.COMMON, description = "颜色") String color,
+							@HttpParam(name = "jiashiben", type = HttpParamType.COMMON, description = "驾驶本") String jiashiben,
+							@HttpParam(name = "xingshiben", type = HttpParamType.COMMON, description = "行驶本") String xingshiben,
+							@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;
+	
+}

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

@@ -8,11 +8,13 @@ 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 com.iotechn.unimall.data.util.LocalUploadImageUtils;
 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 org.springframework.web.multipart.MultipartFile;
 
 import java.util.Date;
 import java.util.List;
@@ -28,6 +30,19 @@ public class PincheRoutePriceAppServiceImpl implements IPincheRoutePriceAppServi
     @Autowired
     private PincheRoutePriceMapper pincheRoutePriceMapper;
 
+    @Override
+    public String UploadPicture(MultipartFile file) {
+
+        String fileName = file.getOriginalFilename();
+
+        System.out.println(fileName);
+
+        //调用工具类的方法
+        String imageFile = LocalUploadImageUtils.uploadImageFile(file, fileName);
+        return imageFile;
+    }
+
+
     @Override
     public Boolean add(PincheRoutePrice pincheRoutePrice, Long adminId) throws ServiceException {
         Date now = new Date();

+ 215 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/pinche/impl/PincheVehicleFilingAppServiceImpl.java

@@ -0,0 +1,215 @@
+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.IPincheVehicleFilingAppService;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.PincheVehicleFiling;
+import com.iotechn.unimall.data.mapper.PincheVehicleFilingMapper;
+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 2023-02-17
+ */
+@Service
+public class PincheVehicleFilingAppServiceImpl implements IPincheVehicleFilingAppService {
+    @Autowired
+    private PincheVehicleFilingMapper pincheVehicleFilingMapper;
+
+    @Override
+    public Boolean add(PincheVehicleFiling pincheVehicleFiling, Long adminId) throws ServiceException {
+        Date now = new Date();
+		pincheVehicleFiling.setStatus("待管理员审核");
+        pincheVehicleFiling.setGmtCreate(now);
+        pincheVehicleFiling.setGmtUpdate(now);
+        pincheVehicleFiling.setAdminId(adminId);
+        return pincheVehicleFilingMapper.insert(pincheVehicleFiling) > 0;
+    }
+
+    @Override
+    public Page<PincheVehicleFiling> list(Long companyId, String dept, String driverName, String phone, String employeeNo, String carNo, String pinpai, String color, String jiashiben, String xingshiben, 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<PincheVehicleFiling> wrapper = new EntityWrapper<PincheVehicleFiling>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(dept)) {
+            wrapper.eq("dept", dept);
+        }
+        if (!StringUtils.isEmpty(driverName)) {
+            wrapper.eq("driver_name", driverName);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(employeeNo)) {
+            wrapper.eq("employee_no", employeeNo);
+        }
+        if (!StringUtils.isEmpty(carNo)) {
+            wrapper.eq("car_no", carNo);
+        }
+        if (!StringUtils.isEmpty(pinpai)) {
+            wrapper.eq("pinpai", pinpai);
+        }
+        if (!StringUtils.isEmpty(color)) {
+            wrapper.eq("color", color);
+        }
+        if (!StringUtils.isEmpty(jiashiben)) {
+            wrapper.eq("jiashiben", jiashiben);
+        }
+        if (!StringUtils.isEmpty(xingshiben)) {
+            wrapper.eq("xingshiben", xingshiben);
+        }
+        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<PincheVehicleFiling> list = pincheVehicleFilingMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = pincheVehicleFilingMapper.selectCount(wrapper);
+        return new Page<PincheVehicleFiling>(list, page, limit, count);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(String id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            PincheVehicleFiling tmp = pincheVehicleFilingMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1l);
+                pincheVehicleFilingMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public Boolean update(PincheVehicleFiling pincheVehicleFiling, Long adminId) throws ServiceException {
+        Date now = new Date();
+		pincheVehicleFiling.setStatus("待管理员审核");
+        pincheVehicleFiling.setGmtUpdate(now);
+        pincheVehicleFiling.setAdminId(adminId);
+        return pincheVehicleFilingMapper.updateById(pincheVehicleFiling) > 0;
+    }
+
+
+	@Override
+	public Boolean audit(PincheVehicleFiling pincheVehicleFiling, Long adminId) throws ServiceException {
+		PincheVehicleFiling pincheVehicleFiling1 = pincheVehicleFilingMapper.selectById(pincheVehicleFiling.getId());
+    	if("1".equals(pincheVehicleFiling.getFlag())){
+			pincheVehicleFiling1.setStatus("审核通过");
+		}
+    	else{
+			pincheVehicleFiling1.setStatus("审核未通过");
+		}
+		Date now = new Date();
+		pincheVehicleFiling1.setGmtUpdate(now);
+		pincheVehicleFiling1.setAdminId(adminId);
+		return pincheVehicleFilingMapper.updateById(pincheVehicleFiling1) > 0;
+	}
+
+    @Override
+    public PincheVehicleFiling get(Long id) throws ServiceException {
+        return pincheVehicleFilingMapper.selectById(id);
+    }
+
+    @Override
+    public String export(Long companyId, String dept, String driverName, String phone, String employeeNo, String carNo, String pinpai, String color, String jiashiben, String xingshiben, 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<PincheVehicleFiling> wrapper = new EntityWrapper<PincheVehicleFiling>();
+        if (!StringUtils.isEmpty(companyId)) {
+            wrapper.eq("company_id", companyId);
+        }
+        if (!StringUtils.isEmpty(dept)) {
+            wrapper.eq("dept", dept);
+        }
+        if (!StringUtils.isEmpty(driverName)) {
+            wrapper.eq("driver_name", driverName);
+        }
+        if (!StringUtils.isEmpty(phone)) {
+            wrapper.eq("phone", phone);
+        }
+        if (!StringUtils.isEmpty(employeeNo)) {
+            wrapper.eq("employee_no", employeeNo);
+        }
+        if (!StringUtils.isEmpty(carNo)) {
+            wrapper.eq("car_no", carNo);
+        }
+        if (!StringUtils.isEmpty(pinpai)) {
+            wrapper.eq("pinpai", pinpai);
+        }
+        if (!StringUtils.isEmpty(color)) {
+            wrapper.eq("color", color);
+        }
+        if (!StringUtils.isEmpty(jiashiben)) {
+            wrapper.eq("jiashiben", jiashiben);
+        }
+        if (!StringUtils.isEmpty(xingshiben)) {
+            wrapper.eq("xingshiben", xingshiben);
+        }
+        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<PincheVehicleFiling> list = pincheVehicleFilingMapper.selectList(wrapper);
+        ExcelUtil<PincheVehicleFiling> util = new ExcelUtil<PincheVehicleFiling>(PincheVehicleFiling.class);
+        return util.exportExcel(list, "操作日志");
+    }
+}

+ 9 - 1
unimall-data/pom.xml

@@ -138,6 +138,14 @@
 			<groupId>com.squareup.okhttp3</groupId>
 			<artifactId>okhttp</artifactId>
 		</dependency>
-	</dependencies>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+        </dependency>
+    </dependencies>
 
 </project>

+ 154 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/PincheVehicleFiling.java

@@ -0,0 +1,154 @@
+package com.iotechn.unimall.data.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel.ColumnType;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Data;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.enums.FieldFill;
+import com.iotechn.unimall.core.util.StringUtils;
+import java.util.Date;
+
+/**
+ * 司机认证对象 pinche_vehicle_filing
+ * 
+ * @author jlb
+ * @date 2023-02-17
+ */
+@Data
+@TableName("pinche_vehicle_filing")
+public class PincheVehicleFiling extends SuperDO{
+    private static final long serialVersionUID = 1L;
+
+    /**  */
+    @TableId("id")
+    private Long id;
+
+    /**  */
+    @Excel(name = "")
+    @TableField("company_id")
+    private Long companyId;
+
+    /** 部门 */
+    @Excel(name = "部门")
+    @TableField("dept")
+    private String dept;
+
+    /** 姓名 */
+    @Excel(name = "姓名")
+    @TableField("driver_name")
+    private String driverName;
+
+    /** 手机号 */
+    @Excel(name = "手机号")
+    @TableField("phone")
+    private String phone;
+
+    /** 员工号 */
+    @Excel(name = "员工号")
+    @TableField("employee_no")
+    private String employeeNo;
+
+    /** 车牌号 */
+    @Excel(name = "车牌号")
+    @TableField("car_no")
+    private String carNo;
+
+    /** 品牌 */
+    @Excel(name = "品牌")
+    @TableField("pinpai")
+    private String pinpai;
+
+    /** 颜色 */
+    @Excel(name = "颜色")
+    @TableField("color")
+    private String color;
+
+    /** 驾驶本 */
+    @Excel(name = "驾驶本")
+    @TableField("jiashiben")
+    private String jiashiben;
+
+    /** 行驶本 */
+    @Excel(name = "行驶本")
+    @TableField("xingshiben")
+    private String xingshiben;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    @TableField("status")
+    private String status;
+
+    /** 备注1 */
+    @Excel(name = "备注1")
+    @TableField("remark1")
+    private String remark1;
+
+    /** 备注2 */
+    @Excel(name = "备注2")
+    @TableField("remark2")
+    private String remark2;
+
+    /** 备注3 */
+    @Excel(name = "备注3")
+    @TableField("remark3")
+    private String remark3;
+
+    /** 0:否(默认) 1:是 */
+    @Excel(name = "0:否", readConverterExp = "默=认")
+    @TableField("delete_flag")
+    private Long deleteFlag;
+
+    /**  */
+    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("gmt_create")
+    private Date gmtCreate;
+
+    /**  */
+    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("gmt_update")
+    private Date gmtUpdate;
+
+    /**  */
+    @Excel(name = "")
+    @TableField("user_id")
+    private Long userId;
+
+    /**  */
+    @Excel(name = "")
+    @TableField("admin_id")
+    private Long adminId;
+    /**  */
+    @TableField(exist = false)
+    private String flag;
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("companyId", getCompanyId())
+            .append("dept", getDept())
+            .append("driverName", getDriverName())
+            .append("phone", getPhone())
+            .append("employeeNo", getEmployeeNo())
+            .append("carNo", getCarNo())
+            .append("pinpai", getPinpai())
+            .append("color", getColor())
+            .append("jiashiben", getJiashiben())
+            .append("xingshiben", getXingshiben())
+            .append("status", getStatus())
+            .append("remark1", getRemark1())
+            .append("remark2", getRemark2())
+            .append("remark3", getRemark3())
+            .append("deleteFlag", getDeleteFlag())
+            .append("gmtCreate", getGmtCreate())
+            .append("gmtUpdate", getGmtUpdate())
+            .append("userId", getUserId())
+            .append("adminId", getAdminId())
+            .toString();
+    }
+}

+ 14 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/mapper/PincheVehicleFilingMapper.java

@@ -0,0 +1,14 @@
+package com.iotechn.unimall.data.mapper;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.iotechn.unimall.data.domain.PincheVehicleFiling;
+
+/**
+ * 司机认证Mapper接口
+ * 
+ * @author jlb
+ * @date 2023-02-17
+ */
+public interface PincheVehicleFilingMapper extends BaseMapper<PincheVehicleFiling>{
+
+}

+ 199 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/util/LocalUploadImageUtils.java

@@ -0,0 +1,199 @@
+package com.iotechn.unimall.data.util;
+
+
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.UUID;
+
+import java.io.*;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.util.*;
+
+/**
+ * Excel相关处理
+ *
+ * @author jlb
+ */
+public class LocalUploadImageUtils<T> {
+
+
+    /**
+     * 上传图片到服务器,默认保存在image文件夹下,文件名前默认加上uuid
+     *
+     * @param file 上传图片
+     * @return 文件访问路径
+     */
+    public static String uploadImageFile(MultipartFile file) {
+
+        String newFileName = getNewFileNameByUuid(file.getOriginalFilename());
+
+//        String finalPath = ConfigFileMessageUtils.IMAGE_ALL_DIR+"/www/server/nginx/adminHtml/img/" + newFileName;
+//        String finalPath = "https://pinche.cspc.cn:10443/img/"+ newFileName;
+        String finalPath = "https://pinche.cspc.cn:10443/www/server/nginx/adminHtml/img/" + newFileName;
+
+        String url = "https://pinche.cspc.cn:10443/img/"+ newFileName;
+//        String url = "http://"
+//                + ConfigFileMessageUtils.LOCAL_IP + ":"
+//                + ConfigFileMessageUtils.SERVER_PORT + "/"
+//                + ConfigFileMessageUtils.IMAGE_DIR_NAME + "/"
+//                + newFileName;
+
+        boolean flag = upload(file, finalPath);
+
+        if (!flag) {
+            throw new RuntimeException("图片上传失败");
+        }
+
+        return url;
+    }
+
+    /**
+     * 上传图片到本地服务器,文件名自定义
+     *
+     * @param file     图片文件
+     * @param fileName 自定义文件名
+     * @return 文件访问路径
+     */
+    public static String uploadImageFile(MultipartFile file, String fileName) {
+
+//        String finalPath = ConfigFileMessageUtils.IMAGE_ALL_DIR + fileName;
+        String finalPath = "/www/server/nginx/adminHtml/img/" + fileName;
+//        String finalPath = "https://pinche.cspc.cn:10443/img/"+ fileName;
+
+//        String url = ConfigFileMessageUtils.IMAGE_ALL_DIR + fileName;
+        String url = "https://pinche.cspc.cn:10443/img/" + fileName;
+
+        boolean flag = upload(file, finalPath);
+
+        if (!flag) {
+            throw new RuntimeException("图片上传失败");
+        }
+        return url;
+    }
+
+    /**
+     * 为文件名添加前缀c
+     *
+     * @param fix      需添加的前缀
+     * @param fileName 文件名
+     * @return 新的文件名
+     */
+    public static String addFixForFileName(String fix, String fileName) {
+        return fix + getFileSuffix(fileName);
+    }
+
+    /**
+     * 上传文件到服务器
+     *
+     * @param file      需要上传的文件
+     * @param finalPath 文件存放的服务器路径
+     * @return 上传成功返回true,失败返回false
+     */
+    private static boolean upload(MultipartFile file, String finalPath) {
+
+        File dest = new File(finalPath);
+
+        //判断文件父目录是否存在
+        if (!dest.getParentFile().exists()) {
+            dest.getParentFile().mkdir();
+        }
+        //上传文件到服务器,相当于将内存的文件输出到服务器,OutputStream,需要try....catch....
+        try {
+            //保存文件
+            //transferTo(dest)方法将上传文件写到服务器上指定的文件
+            file.transferTo(dest);
+            return true;
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            return false;
+        }
+
+    }
+
+    private static String getNewFileNameByUuid(String fileName) {
+        return getUUID() + getFileSuffix(fileName);
+    }
+
+    private static String getUUID() {
+        return UUID.randomUUID().toString().replace("-", "");
+    }
+
+    private static String getFileSuffix(String fileName) {
+        return fileName.substring(fileName.lastIndexOf("."));
+    }
+
+}
+
+/**
+ * 读取图片所需基本信息
+ */
+@Component
+class ConfigFileMessageUtils implements InitializingBean {
+
+    @Value("${server.port}")
+    private String serverPort;
+    /**
+     * 本机IP地址
+     */
+    public static String LOCAL_IP;
+    /**
+     * 本机服务器端口号
+     */
+    public static String SERVER_PORT;
+    /**
+     * 保存图片目录名,默认resources/static下
+     */
+    public static String IMAGE_DIR_NAME = "img";
+    /**
+     * 图片存放的全路径名
+     */
+    public static String IMAGE_ALL_DIR;
+
+    /**
+     * 该方法在服务器加载时被调用
+     *
+     * @throws Exception
+     */
+    @Override
+    public void afterPropertiesSet() throws Exception {
+
+        SERVER_PORT = this.serverPort;
+
+        LOCAL_IP = InetAddress.getLocalHost().getHostAddress();
+
+//        IMAGE_ALL_DIR = System.getProperty("user.dir") +"/";
+        IMAGE_ALL_DIR = System.getProperty("user.dir") +"/";
+
+    }
+}
+
+/**
+ * 释放static下保存文件的目录可被访问
+ */
+@Configuration
+@EnableWebMvc
+class ImageWebMvcConfigurerAdapter implements WebMvcConfigurer {
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        //访问映射,请求放行处理
+        registry.addResourceHandler("" + ConfigFileMessageUtils.IMAGE_DIR_NAME + "//**")
+                .addResourceLocations("file:" + ConfigFileMessageUtils.IMAGE_ALL_DIR);
+        registry.addResourceHandler("/webjars/**")
+                .addResourceLocations(
+                        "classpath:/META-INF/resources/webjars/");
+    }
+}

+ 2 - 2
unimall-data/src/main/java/com/iotechn/unimall/data/util/WeiXinQiYeUtil.java

@@ -30,8 +30,8 @@ public class WeiXinQiYeUtil {
         //缓存access_token
         if (StringUtils.isEmpty(stringRedisTemplate.opsForValue().get("qiyeweixin_access_token"))) {
             //获取企业Id和凭证
-            String corpId = "ww758b780ef84a1f29";
-            String corpSecret = "nfTpvPWo6Qam_bBOS7-vQYcE2JRZozDwuGZLy0QugFk";
+            String corpId = "ww7beb2b180d97789b";
+            String corpSecret = "GzcqQ7lRDxQ3C446HI7hXJeXvZeNdNA0KFykEoOkOMI";
 
             //拼接调用企业微信SDK
             String qyAccessTokenUrl = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + corpId + "&corpsecret=" + corpSecret;

+ 9 - 0
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/PincheVehicleFilingMapper.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.iotechn.unimall.data.mapper.PincheVehicleFilingMapper">
+    
+
+
+</mapper>

+ 3 - 1
unimall-launcher/src/main/java/com/iotechn/unimall/launcher/controller/ApiController.java

@@ -48,7 +48,9 @@ import java.util.concurrent.TimeUnit;
  * 下午11:00
  */
 @Controller
-@RequestMapping("/m.api")
+//@RequestMapping("/m.api")
+@RequestMapping(value = "/m.api",produces = {"application/json;charset=UTF-8"})
+@ResponseBody
 public class ApiController {
 
 	private static final Logger logger = LoggerFactory.getLogger(ApiController.class);

+ 8 - 12
unimall-launcher/src/main/java/com/iotechn/unimall/launcher/controller/FileUploadController.java

@@ -5,6 +5,7 @@ import com.aliyun.oss.OSSClient;
 import com.aliyun.oss.common.utils.BinaryUtil;
 import com.aliyun.oss.model.*;
 import com.iotechn.unimall.core.util.GeneratorUtil;
+import com.iotechn.unimall.data.util.LocalUploadImageUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -115,18 +116,13 @@ public class FileUploadController implements InitializingBean {
     @PostMapping("/admin")
     @ResponseBody
     public Object create(@RequestParam("file") MultipartFile file) throws IOException {
-        ObjectMetadata objectMetadata = new ObjectMetadata();
-        objectMetadata.setContentLength(file.getSize());
-        objectMetadata.setContentType(file.getContentType());
-        String ext = FilenameUtils.getExtension(file.getOriginalFilename());
-        String uuid = GeneratorUtil.genFileName();
-        PutObjectRequest putObjectRequest = new PutObjectRequest(bucket, "bg/" + uuid+"."+ext, file.getInputStream(), objectMetadata);
-        ossClient.putObject(putObjectRequest);
-        Map<String, Object> data = new HashMap<>();
-        data.put("url", baseUrl + "bg/" + uuid +"."+ext);
-        data.put("errno", 200);
-        data.put("errmsg", "成功");
-        return data;
+        String fileName = file.getOriginalFilename();
+
+        System.out.println(fileName);
+
+        //调用工具类的方法
+        String imageFile = LocalUploadImageUtils.uploadImageFile(file, fileName);
+        return imageFile;
     }
 
 

+ 3 - 1
unimall-launcher/src/main/resources/application.properties

@@ -10,9 +10,11 @@ logging.level.root=debug
 ###MySql (MySqlConfiguration)
 ########################################################
 spring.druid.driverClassName=com.mysql.jdbc.Driver
+#spring.druid.url=jdbc:mysql://123.56.171.94/pinche?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&useSSL=false
 spring.druid.url=jdbc:mysql://172.16.5.244/pinche?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&useSSL=false
 spring.druid.username=root
-spring.druid.password=cb0ab252fdb14548
+#spring.druid.password=B27czfiN3ZeLLxL6
+spring.druid.password=313cc9b218a72c14
 spring.druid.maxActive=30
 spring.druid.minIdle=5
 spring.druid.maxWait=10000