diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java b/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java index 05bbddb..53ef57a 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java @@ -26,13 +26,12 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import net.shapelight.modules.ten.entity.*; import net.shapelight.modules.ten.service.*; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.vo.TenCelldeptWeVo; import net.shapelight.modules.vo.TenDeviceVo; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.FilenameUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentApiController.java b/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentApiController.java index 6887dac..439f64a 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentApiController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentApiController.java @@ -21,12 +21,11 @@ import net.shapelight.modules.sys.service.SysDeviceAppService; import net.shapelight.modules.sys.service.SysUserService; import net.shapelight.modules.ten.entity.*; import net.shapelight.modules.ten.service.*; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.vo.SchoolNameVo; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.FilenameUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentWxController.java b/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentWxController.java index fd1a031..0c4c098 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentWxController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/appparent/controller/AppParentWxController.java @@ -9,7 +9,7 @@ import net.shapelight.common.utils.IpUtils; import net.shapelight.common.utils.SnowflakeIdWorker; import net.shapelight.modules.app.annotation.Login; import net.shapelight.modules.app.annotation.LoginUser; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.mobile.entity.MobilePackage; import net.shapelight.modules.mobile.entity.MobilePackageOrder; import net.shapelight.modules.mobile.service.MobilePackageOrderService; @@ -40,7 +40,7 @@ public class AppParentWxController { MobilePackageService packageService; @Autowired GlobalValue globalValue; - @Qualifier("net.shapelight.modules.fegin.OpFeignClient") + @Qualifier("net.shapelight.modules.fegin.client.OpFeignClient") @Autowired private OpFeignClient opFeignClient; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/DataSync.java b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/DataSync.java index 929c26f..43ed3dd 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/DataSync.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/DataSync.java @@ -2,6 +2,7 @@ package net.shapelight.modules.fegin; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.job.entity.KeysEntity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpFeignClient.java b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/client/OpFeignClient.java similarity index 85% rename from shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpFeignClient.java rename to shapelight-admin/src/main/java/net/shapelight/modules/fegin/client/OpFeignClient.java index c74e645..724926b 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpFeignClient.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/client/OpFeignClient.java @@ -1,6 +1,7 @@ -package net.shapelight.modules.fegin; +package net.shapelight.modules.fegin.client; import com.alibaba.fastjson.JSONObject; +import net.shapelight.modules.fegin.hystrix.OpHystrix; import net.shapelight.modules.fegin.config.OpFeignConfig; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.stereotype.Component; @@ -15,7 +16,7 @@ import java.util.Map; * path 指定调用接口所在Controller的@RequestMapping对应路径,没有则不填 * 青桔话务平台 */ -@FeignClient(name = "operator-service", url = "${global.qingju.url}",configuration = OpFeignConfig.class) +@FeignClient(name = "operator-service", url = "${global.qingju.url}",configuration = OpFeignConfig.class,fallbackFactory = OpHystrix.class) @Component public interface OpFeignClient { diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/WxFeignClient.java b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/client/WxFeignClient.java similarity index 96% rename from shapelight-admin/src/main/java/net/shapelight/modules/fegin/WxFeignClient.java rename to shapelight-admin/src/main/java/net/shapelight/modules/fegin/client/WxFeignClient.java index 6c68867..f323f85 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/WxFeignClient.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/client/WxFeignClient.java @@ -1,4 +1,4 @@ -package net.shapelight.modules.fegin; +package net.shapelight.modules.fegin.client; import com.alibaba.fastjson.JSONObject; import net.shapelight.modules.fegin.config.OpFeignConfig; @@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; -import javax.annotation.PostConstruct; import java.util.Map; /* diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/config/OpFeignConfig.java b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/config/OpFeignConfig.java index f119fba..e16c183 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/config/OpFeignConfig.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/config/OpFeignConfig.java @@ -2,7 +2,7 @@ package net.shapelight.modules.fegin.config; import feign.Logger; import feign.Request; -import net.shapelight.modules.fegin.OpFeignInterceptor; +import net.shapelight.modules.fegin.interceptor.OpFeignInterceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpHystrix.java b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/hystrix/OpHystrix.java similarity index 90% rename from shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpHystrix.java rename to shapelight-admin/src/main/java/net/shapelight/modules/fegin/hystrix/OpHystrix.java index e8c52e5..0bdcc7f 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpHystrix.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/hystrix/OpHystrix.java @@ -1,9 +1,10 @@ -package net.shapelight.modules.fegin; +package net.shapelight.modules.fegin.hystrix; import com.alibaba.fastjson.JSONObject; import feign.hystrix.FallbackFactory; +import net.shapelight.modules.fegin.client.OpFeignClient; import org.springframework.stereotype.Component; import java.util.Map; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpFeignInterceptor.java b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/interceptor/OpFeignInterceptor.java similarity index 92% rename from shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpFeignInterceptor.java rename to shapelight-admin/src/main/java/net/shapelight/modules/fegin/interceptor/OpFeignInterceptor.java index 4251578..1bb0c27 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/fegin/OpFeignInterceptor.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/fegin/interceptor/OpFeignInterceptor.java @@ -1,4 +1,4 @@ -package net.shapelight.modules.fegin; +package net.shapelight.modules.fegin.interceptor; import feign.RequestInterceptor; import feign.RequestTemplate; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/EmpowerTask.java b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/EmpowerTask.java index 6db4138..e7f9f85 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/EmpowerTask.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/EmpowerTask.java @@ -3,7 +3,7 @@ package net.shapelight.modules.job.task; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import net.shapelight.modules.job.entity.KeysEntity; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/TerminalListSyncTask.java b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/TerminalListSyncTask.java index 798aa1f..adef14e 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/job/task/TerminalListSyncTask.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/job/task/TerminalListSyncTask.java @@ -1,25 +1,41 @@ package net.shapelight.modules.job.task; import com.alibaba.fastjson.JSONObject; -import net.shapelight.modules.fegin.OpFeignClient; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import net.shapelight.common.handler.CustomizeTableNameHandler; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.job.entity.KeysEntity; +import net.shapelight.modules.mobile.entity.MobileDevice; import net.shapelight.modules.mobile.entity.MobileDeviceGroup; +import net.shapelight.modules.mobile.service.MobileDeviceGroupService; +import net.shapelight.modules.mobile.service.MobileDeviceService; +import net.shapelight.modules.sys.controller.AbstractController; +import net.shapelight.modules.ten.entity.TenUserScopeEntity; +import net.shapelight.modules.ten.service.impl.TenUserScopeServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.util.HashMap; +import java.util.List; import java.util.Map; @Component -public class TerminalListSyncTask implements ITask { +public class TerminalListSyncTask extends AbstractController implements ITask { @Autowired private OpFeignClient feignClient; + @Autowired + private MobileDeviceGroupService mobileDeviceGroupService; + @Autowired + private MobileDeviceService mobileDeviceService; + @Value("${global.qingju.accountNumber}") String accountNumber; @Value("${global.qingju.empowerKey}") String empowerKey; + @Autowired + private TenUserScopeServiceImpl tenUserScopeService; @Override public void run(String params) throws Exception { @@ -37,10 +53,16 @@ public class TerminalListSyncTask implements ITask { queryParams.put("otherSchoolCode", "xtzg"); params.put("queryParams",queryParams); JSONObject jsonObject = feignClient.getData(params); + TenUserScopeEntity tenUserScopeEntity = tenUserScopeService.getOne(new LambdaQueryWrapper() + .eq(TenUserScopeEntity::getUserId,getUserId())); if(jsonObject.getString("shrgStatus").equals("S")) { - jsonObject.getJSONArray("list").forEach(item -> { + List list = jsonObject.getJSONArray("list").toJavaList(JSONObject.class); + list.forEach(item -> { MobileDeviceGroup mdg = new MobileDeviceGroup(); - //mdg.setOpenId() + mdg.setOpenId(item.getString("terminalGroupUuid")); + mdg.setGroupName(item.getString("terminalGroupName")); + mdg.setDeviceCount(item.getInteger("terminalCount")); + mobileDeviceGroupService.save(mdg); }); } } @@ -53,7 +75,25 @@ public class TerminalListSyncTask implements ITask { params.put("passKey", KeysEntity.passKey); Map queryParams = feignClient.getData(params); queryParams.put("otherSchoolCode", "xtzg"); - params.put("queryParams",queryParams); - feignClient.getData(params); + //params.put("queryParams",queryParams); + JSONObject jsonObject = feignClient.getData(params); + TenUserScopeEntity tenUserScopeEntity = tenUserScopeService.getOne(new LambdaQueryWrapper() + .eq(TenUserScopeEntity::getUserId,getUserId())); + if(jsonObject.getString("shrgStatus").equals("S")) { + List list = jsonObject.getJSONArray("list").toJavaList(JSONObject.class); + + CustomizeTableNameHandler.setData(tenUserScopeEntity.getTenantId().toString()); + list.forEach(item -> { + MobileDevice mobileDevice = new MobileDevice(); + mobileDevice.setOpenId(item.getString("terminalGroupUuid")); + mobileDevice.setName(item.getString("terminalName")); + mobileDevice.setSn(item.getString("terminalSn")); + mobileDevice.setKey(item.getString("key")); + mobileDevice.setGroupName(item.getString("terminalGroupName")); + //mobileDevice.setGroupId(item.getString("")) + mobileDeviceService.save(mobileDevice); + }); + CustomizeTableNameHandler.removeData(); + } } } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceClientController.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceClientController.java new file mode 100644 index 0000000..2ba945a --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceClientController.java @@ -0,0 +1,23 @@ +package net.shapelight.modules.mobile.controler; + +import io.swagger.annotations.Api; +import net.shapelight.common.utils.R; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; + +@RestController +@RequestMapping("ghAppController") +@Api(value = "设备接口",tags = "设备接口") +public class DeviceClientController { + + public R getData(@RequestBody Map params) { + + + + return R.ok().put("data", params.get("data")); + } + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceController.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceController.java index d047089..7a660fa 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceController.java @@ -3,31 +3,24 @@ package net.shapelight.modules.mobile.controler; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import net.shapelight.common.handler.CustomizeTableNameHandler; -import net.shapelight.common.utils.PageUtils; import net.shapelight.common.utils.R; -import net.shapelight.common.utils.SnowflakeIdWorker; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.job.entity.KeysEntity; import net.shapelight.modules.mobile.dto.mobileDevice.MobileDeviceAddDto; import net.shapelight.modules.mobile.dto.mobileDevice.MobileDeviceQueryDto; import net.shapelight.modules.mobile.entity.MobileDevice; -import net.shapelight.modules.mobile.entity.MobileDeviceGroup; import net.shapelight.modules.mobile.service.MobileDeviceService; import net.shapelight.modules.sys.controller.AbstractController; import net.shapelight.modules.ten.entity.TenUserScopeEntity; import net.shapelight.modules.ten.service.impl.TenUserScopeServiceImpl; -import org.apache.ibatis.annotations.Delete; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceGroupController.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceGroupController.java index 42031de..b7db73e 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceGroupController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/controler/DeviceGroupController.java @@ -8,11 +8,10 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import net.shapelight.common.utils.BeanUtils; //import net.shapelight.common.utils.ExcelUtils; import net.shapelight.common.utils.ExcelUtils; import net.shapelight.common.utils.R; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.job.entity.KeysEntity; import net.shapelight.modules.mobile.dto.mobileDeviceGroup.MobileDeviceGruopQueryDto; import net.shapelight.modules.mobile.dto.mobileDeviceGroup.MobileDeviceGroupAddDto; @@ -75,7 +74,7 @@ public class DeviceGroupController extends AbstractController { TenUserScopeEntity tenUserScopeEntity = tenUserScopeService.getOne(new LambdaQueryWrapper().eq(TenUserScopeEntity::getUserId,getUserId())); queryParams.put("otherSchoolCode", tenUserScopeEntity.getCellId().toString()); params.put("queryParams",queryParams); - queryParams.put("otherSchoolCode", tenUserScopeEntity.getCellId()); + queryParams.put("otherSchoolCode", tenUserScopeEntity.getCellId().toString()); params.put("queryParams",queryParams); JSONObject jsonObject = feignClient.getData(params); if(jsonObject.getString("shrgStatus").equals("S")) { diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDevice.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDevice.java index 0311f64..4063f19 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDevice.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDevice.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.experimental.Accessors; +import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; @@ -121,5 +122,92 @@ public class MobileDevice implements Serializable { @TableLogic private Integer deleteFlag; + /** + * 三方ID + */ + @Size(max= 50,message="编码长度不能超过50") + @ApiModelProperty("三方ID") + @Length(max= 50,message="编码长度不能超过50") + private String openId; + /** + * 心跳频率(毫秒) + */ + @ApiModelProperty("心跳频率(毫秒)") + private Integer heartbeatFrequency; + /** + * 单次通话时长 + */ + @NotNull(message="[单次通话时长]不能为空") + @ApiModelProperty("单次通话时长") + private Integer callTime; + /** + * 开机时间 + */ + @ApiModelProperty("开机时间") + private Date timeOn; + /** + * 关机时间 + */ + @ApiModelProperty("关机时间") + private Date timeOff; + /** + * 禁拨电话 + */ + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("禁拨电话") + @Length(max= 255,message="编码长度不能超过255") + private String forbidPhone; + /** + * 拨号方式(all:视频+语音video:视频sim:语音) + */ + @NotBlank(message="[拨号方式(all:视频+语音video:视频sim:语音)]不能为空") + @Size(max= 10,message="编码长度不能超过10") + @ApiModelProperty("拨号方式(all:视频+语音video:视频sim:语音)") + @Length(max= 10,message="编码长度不能超过10") + private String phoneType; + /** + * 是否显示留言按钮(Y:显示N不显示) + */ + @NotBlank(message="[是否显示留言按钮(Y:显示N不显示)]不能为空") + @Size(max= 2,message="编码长度不能超过2") + @ApiModelProperty("是否显示留言按钮(Y:显示N不显示)") + @Length(max= 2,message="编码长度不能超过2") + private String messageFlag; + /** + * 拔打SOS电话是否要人 + 脸认证(Y:要人脸认证N不要人脸认证。) + */ + @NotBlank(message="[拔打SOS电话是否要人 脸认证(Y:要人脸认证N不要人脸认证。)]不能为空") + @Size(max= 2,message="编码长度不能超过2") + @ApiModelProperty("拔打SOS电话是否要人 脸认证(Y:要人脸认证N不要人脸认证。)") + @Length(max= 2,message="编码长度不能超过2") + private String checkSosPhone; + /** + * 是否显示成绩查询按钮(Y显示N不显示) + */ + @NotBlank(message="[是否显示成绩查询按钮(Y显示N不显示)]不能为空") + @Size(max= 2,message="编码长度不能超过2") + @ApiModelProperty("是否显示成绩查询按钮(Y显示N不显示)") + @Length(max= 2,message="编码长度不能超过2") + private String achievementFlag; + /** + * 预警通话时长 + */ + @NotNull(message="[预警通话时长]不能为空") + @ApiModelProperty("预警通话时长") + private Integer warningCallTime; + /** + * 是否显示请假按钮(Y显示N不显示) + */ + @NotBlank(message="[是否显示请假按钮(Y显示N不显示)]不能为空") + @Size(max= 2,message="编码长度不能超过2") + @ApiModelProperty("是否显示请假按钮(Y显示N不显示)") + @Length(max= 2,message="编码长度不能超过2") + private String userLeaveFlag; + + private String key; + + private String groupName; + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDeviceGroup.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDeviceGroup.java index 92610d8..27d1fe4 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDeviceGroup.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileDeviceGroup.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.Id; import java.io.Serializable; import java.util.Date; @@ -24,7 +25,7 @@ public class MobileDeviceGroup implements Serializable { /** * 设备组id */ - @TableId + @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(name = "设备组ID") private Long groupId; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenBuildController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenBuildController.java index 35b1882..3eb7c72 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenBuildController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenBuildController.java @@ -16,10 +16,9 @@ import net.shapelight.modules.ten.entity.TenUserScopeEntity; import net.shapelight.modules.ten.service.TenCellService; import net.shapelight.modules.ten.service.TenPersonService; import net.shapelight.modules.ten.service.TenUserScopeService; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java index 3d0d5b1..b4c2633 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java @@ -17,11 +17,10 @@ import net.shapelight.modules.ten.entity.TenParent; import net.shapelight.modules.ten.entity.TenRelation; import net.shapelight.modules.ten.service.TenParentService; import net.shapelight.modules.ten.service.TenRelationService; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.vo.ParentVo; import org.apache.commons.codec.digest.DigestUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java index 95b33a1..e6b5823 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenPersonController.java @@ -38,13 +38,12 @@ import net.shapelight.modules.sys.service.SysUserService; import net.shapelight.modules.sys.service.impl.SysDictServiceImpl; import net.shapelight.modules.ten.entity.*; import net.shapelight.modules.ten.service.*; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.vo.TenDeviceVo; import net.shapelight.modules.vo.TenPersonOperationVo; import org.apache.commons.io.FilenameUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java index 20eaaf6..e24fca2 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java @@ -13,9 +13,8 @@ import net.shapelight.modules.ten.entity.TenUserScopeEntity; import net.shapelight.modules.ten.service.TenParentService; import net.shapelight.modules.ten.service.TenRelationService; import net.shapelight.modules.ten.service.TenUserScopeService; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.bind.annotation.*; import java.util.*; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRoomController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRoomController.java index 14cdce9..d23e894 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRoomController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRoomController.java @@ -16,11 +16,10 @@ import net.shapelight.modules.sys.entity.SysUserEntity; import net.shapelight.modules.sys.service.SysUserRoleService; import net.shapelight.modules.ten.entity.*; import net.shapelight.modules.ten.service.*; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.vo.TenPersonOperationVo; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java index 88c716d..a267c03 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java @@ -33,7 +33,7 @@ import net.shapelight.modules.sys.service.impl.SysDictServiceImpl; import net.shapelight.modules.ten.dao.TenRelationMapper; import net.shapelight.modules.ten.entity.*; import net.shapelight.modules.ten.service.*; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import net.shapelight.modules.vo.*; import org.apache.commons.codec.digest.DigestUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRoomServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRoomServiceImpl.java index 5727dae..2d6d857 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRoomServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenRoomServiceImpl.java @@ -5,7 +5,7 @@ import net.shapelight.modules.ten.entity.TenAddressEntity; import net.shapelight.modules.ten.entity.TenBuildEntity; import net.shapelight.modules.ten.entity.TenCellEntity; import net.shapelight.modules.ten.service.*; -import net.shapelight.modules.fegin.OpFeignClient; +import net.shapelight.modules.fegin.client.OpFeignClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable;