Browse Source

添加devOps

jaikuai 3 years ago
parent
commit
28ac426adf
35 changed files with 1044 additions and 81 deletions
  1. 61 0
      src/main/java/cn/fastfun/controller/api/ApiAppDeviceController.java
  2. 62 0
      src/main/java/cn/fastfun/controller/api/ApiAppHandleFormController.java
  3. 60 0
      src/main/java/cn/fastfun/controller/api/ApiAppLibraryLogController.java
  4. 62 0
      src/main/java/cn/fastfun/controller/api/ApiAppTransferLogController.java
  5. 0 81
      src/main/java/cn/fastfun/controller/api/ApiSysUserController.java
  6. 85 0
      src/main/java/cn/fastfun/controller/api/SysController.java
  7. 17 0
      src/main/java/cn/fastfun/controller/dto/Option.java
  8. 24 0
      src/main/java/cn/fastfun/controller/param/DeviceQueryParam.java
  9. 20 0
      src/main/java/cn/fastfun/controller/param/DictQueryParam.java
  10. 18 0
      src/main/java/cn/fastfun/controller/param/LibraryQueryParam.java
  11. 53 0
      src/main/java/cn/fastfun/service/entity/AppDevice.java
  12. 57 0
      src/main/java/cn/fastfun/service/entity/AppHandleForm.java
  13. 78 0
      src/main/java/cn/fastfun/service/entity/AppLibraryLog.java
  14. 58 0
      src/main/java/cn/fastfun/service/entity/AppTransferLog.java
  15. 48 0
      src/main/java/cn/fastfun/service/entity/SysDict.java
  16. 48 0
      src/main/java/cn/fastfun/service/entity/SysRole.java
  17. 36 0
      src/main/java/cn/fastfun/service/entity/SysRoleComponent.java
  18. 36 0
      src/main/java/cn/fastfun/service/entity/SysUserRole.java
  19. 15 0
      src/main/java/cn/fastfun/service/impl/AppDeviceServiceImp.java
  20. 15 0
      src/main/java/cn/fastfun/service/impl/AppHandleFormServiceImp.java
  21. 15 0
      src/main/java/cn/fastfun/service/impl/AppLibraryLogServiceImp.java
  22. 15 0
      src/main/java/cn/fastfun/service/impl/AppTransferLogServiceImp.java
  23. 15 0
      src/main/java/cn/fastfun/service/impl/SysDictServiceImp.java
  24. 15 0
      src/main/java/cn/fastfun/service/impl/SysRoleComponentServiceImp.java
  25. 15 0
      src/main/java/cn/fastfun/service/impl/SysRoleServiceImp.java
  26. 15 0
      src/main/java/cn/fastfun/service/impl/SysUserRoleServiceImp.java
  27. 12 0
      src/main/java/cn/fastfun/service/repository/AppDeviceRepository.java
  28. 12 0
      src/main/java/cn/fastfun/service/repository/AppHandleFormRepository.java
  29. 12 0
      src/main/java/cn/fastfun/service/repository/AppLibraryLogRepository.java
  30. 12 0
      src/main/java/cn/fastfun/service/repository/AppTransferLogRepository.java
  31. 12 0
      src/main/java/cn/fastfun/service/repository/SysDictRepository.java
  32. 12 0
      src/main/java/cn/fastfun/service/repository/SysRoleComponentRepository.java
  33. 12 0
      src/main/java/cn/fastfun/service/repository/SysRoleRepository.java
  34. 12 0
      src/main/java/cn/fastfun/service/repository/SysUserRoleRepository.java
  35. 5 0
      src/main/resources/application-dev.yml

+ 61 - 0
src/main/java/cn/fastfun/controller/api/ApiAppDeviceController.java

@@ -0,0 +1,61 @@
+package cn.fastfun.controller.api;
+
+import cn.fastfun.controller.param.DeviceQueryParam;
+import cn.fastfun.service.entity.AppDevice;
+import com.bridge.dto.ApiDTO;
+import com.bridge.dto.ApiPageDTO;
+import com.bridge.dto.IdParam;
+import com.bridge.service.JpaService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+
+/**
+* @author Bridge AutoGen
+*
+*/
+@Api(tags = { "设备信息" })
+@RestController
+@RequestMapping("/api/v1/appdevice")
+public class ApiAppDeviceController {
+    //业务类
+	@Resource(name = "appDeviceService")
+	JpaService<AppDevice, String> appDeviceService;
+
+    
+	/**
+	 * 数据保存
+	 */
+	@ApiOperation(value = "保存信息")
+	@RequestMapping(value = "save", method = RequestMethod.POST)
+	public ApiDTO save(@RequestBody @ApiParam(name = "设备信息对象", value = "传入json格式", required = true) AppDevice entity) {
+		return ApiDTO.ok("保存成功", appDeviceService.save(entity));
+	}
+
+    @ApiOperation(value = "查询信息")
+	@RequestMapping(value = "get", method = RequestMethod.POST)
+	public ApiDTO get(@RequestBody @ApiParam(name = "设备信息id", required = true) IdParam param) {
+		return ApiDTO.ok("查询成功!", appDeviceService.get(param.getId()));
+	}
+
+    @ApiOperation(value = "删除信息")
+	@RequestMapping(value = "delete", method = RequestMethod.POST)
+	public ApiDTO delete(@RequestBody @ApiParam(name = "设备信息id", required = true) IdParam param) {
+		appDeviceService.delete(Arrays.asList(param.getId().split(",")));
+		return ApiDTO.ok("删除成功!");
+	}
+
+	@ApiOperation(value = "分页搜索")
+    @RequestMapping(value = "pageQuery", method = RequestMethod.POST)
+    public ApiPageDTO pageQuery(@RequestBody DeviceQueryParam param) {
+        return new ApiPageDTO(null, appDeviceService.findByParam(param));
+    }
+
+}

+ 62 - 0
src/main/java/cn/fastfun/controller/api/ApiAppHandleFormController.java

@@ -0,0 +1,62 @@
+package cn.fastfun.controller.api;
+
+import cn.fastfun.service.entity.AppHandleForm;
+import com.bridge.dto.ApiDTO;
+import com.bridge.dto.ApiPageDTO;
+import com.bridge.dto.IdParam;
+import com.bridge.dto.QueryParam;
+import com.bridge.service.JpaService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+
+/**
+* @author Bridge AutoGen
+*
+*/
+@Api(tags = { "设备处置单" })
+@RestController
+@RequestMapping("/api/v1/apphandleform")
+public class ApiAppHandleFormController {
+    //业务类
+	@Resource(name = "appHandleFormService")
+	JpaService<AppHandleForm, String> appHandleFormService;
+
+    
+	/**
+	 * 数据保存
+	 */
+	@ApiOperation(value = "保存信息")
+	@RequestMapping(value = "save", method = RequestMethod.POST)
+	public ApiDTO save(@RequestBody @ApiParam(name = "设备处置单对象", value = "传入json格式", required = true) AppHandleForm entity) {
+		return ApiDTO.ok("保存成功", appHandleFormService.save(entity));
+	}
+
+    @ApiOperation(value = "查询信息")
+	@RequestMapping(value = "get", method = RequestMethod.POST)
+	public ApiDTO get(@RequestBody @ApiParam(name = "设备处置单id", required = true) IdParam param) {
+		return ApiDTO.ok("查询成功!", appHandleFormService.get(param.getId()));
+	}
+
+    @ApiOperation(value = "删除信息")
+	@RequestMapping(value = "delete", method = RequestMethod.POST)
+	public ApiDTO delete(@RequestBody @ApiParam(name = "设备处置单id", required = true) IdParam param) {
+		appHandleFormService.delete(Arrays.asList(param.getId().split(",")));
+		return ApiDTO.ok("删除成功!");
+	}
+
+	@ApiOperation(value = "分页搜索")
+    @RequestMapping(value = "pageQuery", method = RequestMethod.POST)
+    public ApiPageDTO pageQuery(@RequestBody QueryParam param) {
+        
+        return new ApiPageDTO(null, appHandleFormService.findByParam(param));
+    }
+
+}

+ 60 - 0
src/main/java/cn/fastfun/controller/api/ApiAppLibraryLogController.java

@@ -0,0 +1,60 @@
+package cn.fastfun.controller.api;
+
+import cn.fastfun.controller.param.LibraryQueryParam;
+import cn.fastfun.service.entity.AppLibraryLog;
+import com.bridge.dto.ApiDTO;
+import com.bridge.dto.ApiPageDTO;
+import com.bridge.dto.IdParam;
+import com.bridge.service.JpaService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+
+/**
+ * @author Bridge AutoGen
+ */
+@Api(tags = {"设备出入库记录"})
+@RestController
+@RequestMapping("/api/v1/applibrarylog")
+public class ApiAppLibraryLogController {
+    //业务类
+    @Resource(name = "appLibraryLogService")
+    JpaService<AppLibraryLog, String> appLibraryLogService;
+
+
+    /**
+     * 数据保存
+     */
+    @ApiOperation(value = "保存信息")
+    @RequestMapping(value = "save", method = RequestMethod.POST)
+    public ApiDTO save(@RequestBody @ApiParam(name = "设备出入库记录对象", value = "传入json格式", required = true) AppLibraryLog entity) {
+        return ApiDTO.ok("保存成功", appLibraryLogService.save(entity));
+    }
+
+    @ApiOperation(value = "查询信息")
+    @RequestMapping(value = "get", method = RequestMethod.POST)
+    public ApiDTO get(@RequestBody @ApiParam(name = "设备出入库记录id", required = true) IdParam param) {
+        return ApiDTO.ok("查询成功!", appLibraryLogService.get(param.getId()));
+    }
+
+    @ApiOperation(value = "删除信息")
+    @RequestMapping(value = "delete", method = RequestMethod.POST)
+    public ApiDTO delete(@RequestBody @ApiParam(name = "设备出入库记录id", required = true) IdParam param) {
+        appLibraryLogService.delete(Arrays.asList(param.getId().split(",")));
+        return ApiDTO.ok("删除成功!");
+    }
+
+    @ApiOperation(value = "分页搜索")
+    @RequestMapping(value = "pageQuery", method = RequestMethod.POST)
+    public ApiPageDTO pageQuery(@RequestBody LibraryQueryParam param) {
+        return new ApiPageDTO(null, appLibraryLogService.findByParam(param));
+    }
+
+}

+ 62 - 0
src/main/java/cn/fastfun/controller/api/ApiAppTransferLogController.java

@@ -0,0 +1,62 @@
+package cn.fastfun.controller.api;
+
+import cn.fastfun.service.entity.AppTransferLog;
+import com.bridge.dto.ApiDTO;
+import com.bridge.dto.ApiPageDTO;
+import com.bridge.dto.IdParam;
+import com.bridge.dto.QueryParam;
+import com.bridge.service.JpaService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+
+/**
+* @author Bridge AutoGen
+*
+*/
+@Api(tags = { "调拨日志" })
+@RestController
+@RequestMapping("/api/v1/apptransferlog")
+public class ApiAppTransferLogController {
+    //业务类
+	@Resource(name = "appTransferLogService")
+	JpaService<AppTransferLog, String> appTransferLogService;
+
+    
+	/**
+	 * 数据保存
+	 */
+	@ApiOperation(value = "保存信息")
+	@RequestMapping(value = "save", method = RequestMethod.POST)
+	public ApiDTO save(@RequestBody @ApiParam(name = "调拨日志对象", value = "传入json格式", required = true) AppTransferLog entity) {
+		return ApiDTO.ok("保存成功", appTransferLogService.save(entity));
+	}
+
+    @ApiOperation(value = "查询信息")
+	@RequestMapping(value = "get", method = RequestMethod.POST)
+	public ApiDTO get(@RequestBody @ApiParam(name = "调拨日志id", required = true) IdParam param) {
+		return ApiDTO.ok("查询成功!", appTransferLogService.get(param.getId()));
+	}
+
+    @ApiOperation(value = "删除信息")
+	@RequestMapping(value = "delete", method = RequestMethod.POST)
+	public ApiDTO delete(@RequestBody @ApiParam(name = "调拨日志id", required = true) IdParam param) {
+		appTransferLogService.delete(Arrays.asList(param.getId().split(",")));
+		return ApiDTO.ok("删除成功!");
+	}
+
+	@ApiOperation(value = "分页搜索")
+    @RequestMapping(value = "pageQuery", method = RequestMethod.POST)
+    public ApiPageDTO pageQuery(@RequestBody QueryParam param) {
+        
+        return new ApiPageDTO(null, appTransferLogService.findByParam(param));
+    }
+
+}

+ 0 - 81
src/main/java/cn/fastfun/controller/api/ApiSysUserController.java

@@ -1,81 +0,0 @@
-package cn.fastfun.controller.api;
-
-import cn.fastfun.controller.param.UserPassWordParam;
-import cn.fastfun.service.SysUserService;
-import cn.fastfun.service.UtilService;
-import cn.fastfun.service.entity.SysUser;
-import com.bridge.dto.*;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.util.DigestUtils;
-import org.springframework.util.StringUtils;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.Date;
-
-/**
- * @author Bridge AutoGen
- */
-@Api(tags = {"系统账号"})
-@RestController
-@RequestMapping("/api/v1/sysuser")
-public class ApiSysUserController {
-    //业务类
-    @Resource
-    SysUserService sysUserService;
-
-    @Resource
-    UtilService utilService;
-
-    /**
-     * 数据保存
-     */
-    @ApiOperation(value = "保存信息")
-    @RequestMapping(value = "save", method = RequestMethod.POST)
-    public ApiDTO save(@RequestBody @ApiParam(name = "系统账号对象", value = "传入json格式", required = true) SysUser entity) {
-        SysUser tmp = sysUserService.save(entity);
-        return ApiDTO.ok("保存成功", tmp);
-    }
-
-    @ApiOperation(value = "查询信息")
-    @RequestMapping(value = "get", method = RequestMethod.POST)
-    public ApiDTO get(@RequestBody @ApiParam(name = "系统账号id", required = true) IdParam param) {
-        return ApiDTO.ok("查询成功!", sysUserService.get(param.getId()));
-    }
-
-    @ApiOperation(value = "修改账号密码")
-    @PostMapping("update/password")
-    public ApiDTO updatePassWord(@Validated @RequestBody UserPassWordParam param) {
-        if (StringUtils.isEmpty(param.getId())) return ApiDTO.error("账号ID错误");
-        if (!param.getNewPassWord().equals(param.getConfirmPasWord()))
-            return ApiDTO.error("修改密码和确认密码不一致!");
-
-        SysUser sysUser = sysUserService.getOne(QueryParamExp.eq("id", param.getId()));
-        if (!sysUser.getUserPass().equals(DigestUtils.md5DigestAsHex(param.getOldPassWord().getBytes())))
-            return ApiDTO.error("当前密码错误!");
-        sysUser.setUserPass(DigestUtils.md5DigestAsHex(param.getNewPassWord().getBytes()));
-        sysUserService.save(sysUser);
-        if (param.getId().equals(utilService.getUserId()))
-            utilService.resetLoginUser(sysUser, new Date());
-        return ApiDTO.ok("密码修改成功!");
-    }
-
-    @ApiOperation(value = "删除信息")
-    @RequestMapping(value = "delete", method = RequestMethod.POST)
-    public ApiDTO delete(@RequestBody @ApiParam(name = "系统账号id", required = true) IdParam param) {
-        String id = param.getId();
-        sysUserService.delete(Arrays.asList(id.split(",")));
-        return ApiDTO.ok();
-    }
-
-    @ApiOperation(value = "分页搜索")
-    @RequestMapping(value = "pageQuery", method = RequestMethod.POST)
-    public ApiPageDTO pageQuery(@RequestBody QueryParam param) {
-        return new ApiPageDTO(null, sysUserService.findByParam(param));
-    }
-
-}

+ 85 - 0
src/main/java/cn/fastfun/controller/api/SysController.java

@@ -0,0 +1,85 @@
+package cn.fastfun.controller.api;
+
+
+import cn.fastfun.controller.dto.Option;
+import cn.fastfun.controller.param.DictQueryParam;
+import cn.fastfun.service.entity.SysDict;
+import com.bridge.dto.ApiDTO;
+import com.bridge.dto.ApiPageDTO;
+import com.bridge.dto.IdParam;
+import com.bridge.dto.QueryParamExp;
+import com.bridge.service.JpaService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+@Api(tags = {"1.1 系统管理"})
+@RestController
+@Slf4j
+@RequestMapping("/api/v1/sys")
+public class SysController {
+
+    //业务类
+    @Resource(name = "sysDictService")
+    JpaService<SysDict, String> sysDictService;
+
+    /**
+     * 数据保存
+     */
+    @ApiOperation(value = "保存信息")
+    @RequestMapping(value = "dict/save", method = RequestMethod.POST)
+    public ApiDTO save(@RequestBody @ApiParam(name = "字典表对象", value = "传入json格式", required = true) SysDict entity) {
+        return ApiDTO.ok("保存成功", sysDictService.save(entity));
+    }
+
+    @ApiOperation(value = "查询信息")
+    @RequestMapping(value = "dict/get", method = RequestMethod.POST)
+    public ApiDTO get(@RequestBody @ApiParam(name = "字典表id", required = true) IdParam param) {
+        return ApiDTO.ok("查询成功!", sysDictService.get(param.getId()));
+    }
+
+    @ApiOperation(value = "删除信息")
+    @RequestMapping(value = "dict/delete", method = RequestMethod.POST)
+    public ApiDTO delete(@RequestBody @ApiParam(name = "字典表id", required = true) IdParam param) {
+        sysDictService.delete(Arrays.asList(param.getId().split(",")));
+        return ApiDTO.ok("删除成功!");
+    }
+
+    @ApiOperation(value = "分页搜索")
+    @RequestMapping(value = "dict/pageQuery", method = RequestMethod.POST)
+    public ApiPageDTO pageQuery(@RequestBody DictQueryParam param) {
+        return new ApiPageDTO(null, sysDictService.findByParam(param));
+    }
+
+    @ApiOperation(value = "下拉选择")
+    @RequestMapping(value = "dict/select", method = RequestMethod.POST)
+    public ApiDTO select(@RequestBody DictQueryParam param) {
+        List<Option> options = new ArrayList<>();
+        List<SysDict> list = sysDictService.findAll(param.getParam());
+        if (!CollectionUtils.isEmpty(list))
+            list.forEach(p -> options.add(new Option(p.getValue(), p.getName())));
+        return ApiDTO.ok(options);
+    }
+
+    @ApiOperation(value = "所有")
+    @RequestMapping(value = "dict/select/group", method = RequestMethod.POST)
+    public ApiDTO selectGroup() {
+        List<Option> options = new ArrayList<>();
+        List<SysDict> list = sysDictService.findAll(QueryParamExp.desc("groupTitle"), QueryParamExp.group("groupName"));
+        if (!CollectionUtils.isEmpty(list))
+            list.forEach(p -> options.add(new Option(p.getGroupTitle(), p.getGroupName())));
+        return ApiDTO.ok(options);
+    }
+
+}

+ 17 - 0
src/main/java/cn/fastfun/controller/dto/Option.java

@@ -0,0 +1,17 @@
+package cn.fastfun.controller.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Setter
+@Getter
+public class Option {
+
+    private String label;
+
+    private String value;
+}

+ 24 - 0
src/main/java/cn/fastfun/controller/param/DeviceQueryParam.java

@@ -0,0 +1,24 @@
+package cn.fastfun.controller.param;
+
+import com.bridge.dto.QueryParam;
+import com.bridge.dto.QueryParamExp;
+import org.springframework.util.StringUtils;
+
+public class DeviceQueryParam extends QueryParam {
+
+    public void setSn(String sn) {
+        if (!StringUtils.isEmpty(sn))
+            addParam(QueryParamExp.like("sn", "%".concat(sn).concat("%")));
+    }
+
+    public void setImei(String imei) {
+        if (!StringUtils.isEmpty(imei))
+            addParam(QueryParamExp.like("imei", "%".concat(imei).concat("%")));
+    }
+
+    public void setBatchNum(String batchNum) {
+        if (!StringUtils.isEmpty(batchNum))
+            addParam(QueryParamExp.like("batchNum", "%".concat(batchNum).concat("%")));
+    }
+
+}

+ 20 - 0
src/main/java/cn/fastfun/controller/param/DictQueryParam.java

@@ -0,0 +1,20 @@
+package cn.fastfun.controller.param;
+
+import com.bridge.dto.QueryParam;
+import com.bridge.dto.QueryParamExp;
+import org.springframework.util.StringUtils;
+
+public class DictQueryParam extends QueryParam {
+
+    public void setName(String name) {
+        if (!StringUtils.isEmpty(name)) addParam(new QueryParamExp("name", name));
+    }
+
+    public void setValue(String name) {
+        if (!StringUtils.isEmpty(name)) addParam(QueryParamExp.like("value", "%" + name + "%"));
+    }
+
+    public void setGroupName(String groupName) {
+        if (!StringUtils.isEmpty(groupName)) addParam(QueryParamExp.eq("groupName", groupName));
+    }
+}

+ 18 - 0
src/main/java/cn/fastfun/controller/param/LibraryQueryParam.java

@@ -0,0 +1,18 @@
+package cn.fastfun.controller.param;
+
+import com.bridge.dto.QueryParam;
+import com.bridge.dto.QueryParamExp;
+import org.springframework.util.StringUtils;
+
+public class LibraryQueryParam extends QueryParam {
+
+    public void setSn(String sn) {
+        if (!StringUtils.isEmpty(sn))
+            addParam(QueryParamExp.like("sn", "%".concat(sn).concat("%")));
+    }
+
+    public void setStatus(Integer status) {
+        if (!StringUtils.isEmpty(status))
+            addParam(QueryParamExp.eq("status", status));
+    }
+}

+ 53 - 0
src/main/java/cn/fastfun/service/entity/AppDevice.java

@@ -0,0 +1,53 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.DateEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.util.Date;
+
+
+@Entity
+@Table(name = "app_device")
+@Setter
+@Getter
+public class AppDevice extends DateEntity {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @ApiModelProperty(value = "SN号", name = "sn", required = true)
+    @Column(name = "sn")
+    private String sn;
+
+
+    @ApiModelProperty(value = "IMEI", name = "imei", required = true)
+    @Column(name = "imei")
+    private String imei;
+
+
+    @ApiModelProperty(value = "批次号", name = "batchNum", required = true)
+    @Column(name = "batch_num")
+    private String batchNum;
+
+
+    @ApiModelProperty(value = "状态", name = "status", required = true)
+    @Column(name = "status")
+    private Integer status;
+
+
+    @ApiModelProperty(value = "发货时间", name = "deliverTime", required = true)
+    @DateTimeFormat(pattern = "yyyy-MM-dd ")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Column(name = "deliver_time")
+    private Date deliverTime;
+
+
+}

+ 57 - 0
src/main/java/cn/fastfun/service/entity/AppHandleForm.java

@@ -0,0 +1,57 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.DateEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.util.Date;
+
+
+@Entity
+@Table(name = "app_handle_form")
+@Setter
+@Getter
+public class AppHandleForm extends DateEntity{
+
+	private static final long serialVersionUID = 1L;
+	
+
+	
+	   
+	   @ApiModelProperty(value="设备编号", name="sn", required=true)
+	   @Column(name = "sn")
+	   private String sn;
+
+	
+	   
+	   @ApiModelProperty(value="处置类型", name="eventType", required=true)
+	   @Column(name = "event_type")
+	   private Integer eventType;
+
+	
+	   
+	   @ApiModelProperty(value="处置时间", name="handleTime", required=true)
+	   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	   @Column(name = "handle_time")
+	   private Date handleTime;
+
+	
+
+	
+
+	
+	   
+	   @ApiModelProperty(value="处置说明", name="handleContent", required=true)
+	   @Column(name = "handle_content")
+	   private String handleContent;
+
+	
+}

+ 78 - 0
src/main/java/cn/fastfun/service/entity/AppLibraryLog.java

@@ -0,0 +1,78 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.DateEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.util.Date;
+
+
+@Entity
+@Table(name = "app_library_log")
+@Setter
+@Getter
+public class AppLibraryLog extends DateEntity {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @ApiModelProperty(value = "城市", name = "city", required = true)
+    @Column(name = "city")
+    private String city;
+
+
+    @ApiModelProperty(value = "地址", name = "address", required = true)
+    @Column(name = "address")
+    private String address;
+
+
+    @ApiModelProperty(value = "批次编号", name = "pathNum", required = true)
+    @Column(name = "path_num")
+    private String pathNum;
+
+
+    @ApiModelProperty(value = "设备编号", name = "sn", required = true)
+    @Column(name = "sn")
+    private String sn;
+
+
+    @ApiModelProperty(value = "状态 ", name = "status", required = true)
+    @Column(name = "status")
+    private Integer status;
+
+
+    @ApiModelProperty(value = "入库时间", name = "inStorageTime", required = true)
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @Column(name = "in_storage_time")
+    private Date inStorageTime;
+
+
+    @ApiModelProperty(value = "出库类型", name = "outType", required = true)
+    @Column(name = "out_type")
+    private Integer outType;
+
+
+    @ApiModelProperty(value = "客户ID", name = "outCustomId", required = true)
+    @Column(name = "out_custom_id")
+    private String outCustomId;
+
+
+    @ApiModelProperty(value = "接收人姓名", name = "receiverName", required = true)
+    @Column(name = "receiver_name")
+    private String receiverName;
+
+
+    @ApiModelProperty(value = "接收人电话", name = "receiverPhone", required = true)
+    @Column(name = "receiver_phone")
+    private String receiverPhone;
+
+
+}

+ 58 - 0
src/main/java/cn/fastfun/service/entity/AppTransferLog.java

@@ -0,0 +1,58 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.DateEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+
+@Entity
+@Table(name = "app_transfer_log")
+@Setter
+@Getter
+public class AppTransferLog extends DateEntity{
+
+	private static final long serialVersionUID = 1L;
+	
+
+	
+	   
+	   @ApiModelProperty(value="设备编号", name="sn", required=true)
+	   @Column(name = "sn")
+	   private String sn;
+
+	
+	   
+	   @ApiModelProperty(value="设备类型", name="deviceType", required=true)
+	   @Column(name = "device_type")
+	   private String deviceType;
+
+	
+	   
+	   @ApiModelProperty(value="客户", name="customId", required=true)
+	   @Column(name = "custom_id")
+	   private String customId;
+
+	
+	   
+	   @ApiModelProperty(value="状态", name="status", required=true)
+	   @Column(name = "status")
+	   private Integer status;
+
+	
+
+	
+
+	
+	   
+	   @ApiModelProperty(value="批次号", name="pathNum", required=true)
+	   @Column(name = "path_num")
+	   private String pathNum;
+
+	
+}

+ 48 - 0
src/main/java/cn/fastfun/service/entity/SysDict.java

@@ -0,0 +1,48 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.IdEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+
+@Entity
+@Table(name = "sys_dict")
+@Setter
+@Getter
+public class SysDict extends IdEntity {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @ApiModelProperty(value = "分组", name = "groupName", required = true)
+    @Column(name = "group_name")
+    private String groupName;
+
+
+    @ApiModelProperty(value = "分组名称", name = "groupTitle", required = true)
+    @Column(name = "group_title")
+    private String groupTitle;
+
+
+    @ApiModelProperty(value = "名称", name = "name", required = true)
+    @Column(name = "name")
+    private String name;
+
+
+    @ApiModelProperty(value = "值", name = "value", required = true)
+    @Column(name = "value")
+    private String value;
+
+
+    @ApiModelProperty(value = "排序", name = "sort", required = true)
+    @Column(name = "sort")
+    private Integer sort;
+
+
+}

+ 48 - 0
src/main/java/cn/fastfun/service/entity/SysRole.java

@@ -0,0 +1,48 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.IdEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+
+@Entity
+@Table(name = "sys_role")
+@Setter
+@Getter
+public class SysRole extends IdEntity{
+
+	private static final long serialVersionUID = 1L;
+	
+
+	
+	   
+	   @ApiModelProperty(value="标题", name="title", required=true)
+	   @Column(name = "title")
+	   private String title;
+
+	
+	   
+	   @ApiModelProperty(value="编码", name="code", required=true)
+	   @Column(name = "code")
+	   private String code;
+
+	
+	   
+	   @ApiModelProperty(value="机构", name="orgId", required=true)
+	   @Column(name = "org_id")
+	   private String orgId;
+
+	
+	   
+	   @ApiModelProperty(value="状态0待审,1正常 9停用", name="status", required=true)
+	   @Column(name = "status")
+	   private Integer status;
+
+	
+}

+ 36 - 0
src/main/java/cn/fastfun/service/entity/SysRoleComponent.java

@@ -0,0 +1,36 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.IdEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+
+@Entity
+@Table(name = "sys_role_component")
+@Setter
+@Getter
+public class SysRoleComponent extends IdEntity{
+
+	private static final long serialVersionUID = 1L;
+	
+
+	
+	   
+	   @ApiModelProperty(value="角色编码", name="roleCode", required=true)
+	   @Column(name = "role_code")
+	   private String roleCode;
+
+	
+	   
+	   @ApiModelProperty(value="组件", name="componentId", required=true)
+	   @Column(name = "component_id")
+	   private String componentId;
+
+	
+}

+ 36 - 0
src/main/java/cn/fastfun/service/entity/SysUserRole.java

@@ -0,0 +1,36 @@
+package cn.fastfun.service.entity;
+
+
+import com.bridge.entity.IdEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+
+@Entity
+@Table(name = "sys_user_role")
+@Setter
+@Getter
+public class SysUserRole extends IdEntity{
+
+	private static final long serialVersionUID = 1L;
+	
+
+	
+	   
+	   @ApiModelProperty(value="用户", name="userId", required=true)
+	   @Column(name = "user_id")
+	   private String userId;
+
+	
+	   
+	   @ApiModelProperty(value="角色Code", name="roleCode", required=true)
+	   @Column(name = "role_code")
+	   private String roleCode;
+
+	
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/AppDeviceServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.AppDevice;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("appDeviceService")
+public class AppDeviceServiceImp extends JpaServiceImp<AppDevice, String> implements JpaService<AppDevice, String> {
+
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/AppHandleFormServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.AppHandleForm;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("appHandleFormService")
+public class AppHandleFormServiceImp extends JpaServiceImp<AppHandleForm, String> implements JpaService<AppHandleForm, String> {
+
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/AppLibraryLogServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.AppLibraryLog;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("appLibraryLogService")
+public class AppLibraryLogServiceImp extends JpaServiceImp<AppLibraryLog, String> implements JpaService<AppLibraryLog, String> {
+
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/AppTransferLogServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.AppTransferLog;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("appTransferLogService")
+public class AppTransferLogServiceImp extends JpaServiceImp<AppTransferLog, String> implements JpaService<AppTransferLog, String> {
+
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/SysDictServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.SysDict;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("sysDictService")
+public class SysDictServiceImp extends JpaServiceImp<SysDict, String> implements JpaService<SysDict, String> {
+
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/SysRoleComponentServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.SysRoleComponent;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("sysRoleComponentService")
+public class SysRoleComponentServiceImp extends JpaServiceImp<SysRoleComponent, String> implements JpaService<SysRoleComponent, String> {
+
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/SysRoleServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.SysRole;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("sysRoleService")
+public class SysRoleServiceImp extends JpaServiceImp<SysRole, String> implements JpaService<SysRole, String> {
+
+}

+ 15 - 0
src/main/java/cn/fastfun/service/impl/SysUserRoleServiceImp.java

@@ -0,0 +1,15 @@
+package cn.fastfun.service.impl;
+
+import cn.fastfun.service.entity.SysUserRole;
+import com.bridge.service.JpaService;
+import com.bridge.service.impl.JpaServiceImp;
+import org.springframework.stereotype.Service;
+
+/**
+* 服务实现类
+* Created by Bridge.
+*/
+@Service("sysUserRoleService")
+public class SysUserRoleServiceImp extends JpaServiceImp<SysUserRole, String> implements JpaService<SysUserRole, String> {
+
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/AppDeviceRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.AppDevice;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface AppDeviceRepository extends JpaRepository<AppDevice, String>, JpaSpecificationExecutor<AppDevice> {
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/AppHandleFormRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.AppHandleForm;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface AppHandleFormRepository extends JpaRepository<AppHandleForm, String>, JpaSpecificationExecutor<AppHandleForm> {
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/AppLibraryLogRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.AppLibraryLog;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface AppLibraryLogRepository extends JpaRepository<AppLibraryLog, String>, JpaSpecificationExecutor<AppLibraryLog> {
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/AppTransferLogRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.AppTransferLog;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface AppTransferLogRepository extends JpaRepository<AppTransferLog, String>, JpaSpecificationExecutor<AppTransferLog> {
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/SysDictRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.SysDict;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface SysDictRepository extends JpaRepository<SysDict, String>, JpaSpecificationExecutor<SysDict> {
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/SysRoleComponentRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.SysRoleComponent;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface SysRoleComponentRepository extends JpaRepository<SysRoleComponent, String>, JpaSpecificationExecutor<SysRoleComponent> {
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/SysRoleRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.SysRole;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface SysRoleRepository extends JpaRepository<SysRole, String>, JpaSpecificationExecutor<SysRole> {
+}

+ 12 - 0
src/main/java/cn/fastfun/service/repository/SysUserRoleRepository.java

@@ -0,0 +1,12 @@
+package cn.fastfun.service.repository;
+
+import cn.fastfun.service.entity.SysUserRole;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* Created by Eye
+* @Author Bridge
+*/
+public interface SysUserRoleRepository extends JpaRepository<SysUserRole, String>, JpaSpecificationExecutor<SysUserRole> {
+}

+ 5 - 0
src/main/resources/application-dev.yml

@@ -18,3 +18,8 @@ logging:
     com.bridge: debug
     root: info
     io.lettuce.core.protocol: error
+
+
+project:
+  token-time: 360000
+  secret-key: pdms-oss-api