Browse Source

Merge branch 'dev' of suhaiwen/wlyy2.0 into dev

huangwenjie 5 years ago
parent
commit
e264c8914e

+ 3 - 3
svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotDeviceSimController.java

@ -54,11 +54,11 @@ public class IotDeviceSimController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.DeviceSim.addSIM)
    @ApiOperation(value = "添加SIM卡", notes = "添加SIM卡")
    public MixEnvelop<IotOrderVO, IotOrderVO> addSIM(@ApiParam(name = "json", value = "json", defaultValue = "")
                                                      @RequestParam(value = "json",required = true) String json) {
    public MixEnvelop<IotOrderVO, IotOrderVO> addSIM(@ApiParam(name = "jsonData", value = "jsonData", defaultValue = "")
                                                      @RequestParam(value = "jsonData",required = true) String jsonData) {
        try {
            return iotDeviceSimService.addSIM(json);
            return iotDeviceSimService.addSIM(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError(e.getMessage());

+ 3 - 3
svr/svr-iot/src/main/java/com/yihu/iot/controller/platform/IotInterfaceAuditController.java

@ -32,11 +32,11 @@ public class IotInterfaceAuditController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.InterfaceAudit.addInterfaceApplyFor)
    @ApiOperation(value = "新增应用接口权限申请",notes = "新增应用接口权限申请")
    public MixEnvelop<IotInterfaceAuditDO,IotInterfaceAuditDO> addInterfaceApplyFor(@ApiParam(name = "JSON",value = "接口JSON串") @RequestParam(value = "JSON",required = true)String json,
                                                                                 @ApiParam(name = "ids",value = "共享接口IDS") @RequestBody List<String> ids){
    public MixEnvelop<IotInterfaceAuditDO,IotInterfaceAuditDO> addInterfaceApplyFor(@ApiParam(name = "jsonData",value = "接口jsonDataN串") @RequestParam(value = "jsonData",required = true)String jsonData,
                                                                                 @ApiParam(name = "ids",value = "共享接口IDS") @RequestParam String ids){
        try {
            iotInterfaceAuditService.addInterfaceApplyFor(json,ids);
            iotInterfaceAuditService.addInterfaceApplyFor(jsonData,ids);
            return MixEnvelop.getSuccess(IotRequestMapping.InterfaceAudit.message_success_apply_for);
        } catch (Exception e) {
            e.printStackTrace();

+ 5 - 5
svr/svr-iot/src/main/java/com/yihu/iot/controller/platform/IotInterfaceController.java

@ -46,10 +46,10 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.Platform.addInterface)
    @ApiOperation(value = "新增共享接口",notes = "新增共享接口")
    public MixEnvelop<IotShareInterfaceDO,IotShareInterfaceDO> addInterface(@ApiParam(name = "jsonData",value = "接口JSON串") @RequestParam(value = "jsonData",required = true)String json){
    public MixEnvelop<IotShareInterfaceDO,IotShareInterfaceDO> addInterface(@ApiParam(name = "jsonData",value = "接口JSON串") @RequestParam(value = "jsonData",required = true)String jsonData){
        try {
            iotShareInterfaceService.addInterface(json);
            iotShareInterfaceService.addInterface(jsonData);
            return MixEnvelop.getSuccess(IotRequestMapping.Platform.message_success_add);
        } catch (Exception e) {
            e.printStackTrace();
@ -60,10 +60,10 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.Platform.editInterface)
    @ApiOperation(value = "编辑共享接口",notes = "编辑共享接口")
    public MixEnvelop<IotShareInterfaceDO,IotShareInterfaceDO> editInterface(@ApiParam(name = "jsonData",value = "接口JSON串") @RequestParam(value = "jsonData",required = true)String json){
    public MixEnvelop<IotShareInterfaceDO,IotShareInterfaceDO> editInterface(@ApiParam(name = "jsonData",value = "接口JSON串") @RequestParam(value = "jsonData",required = true)String jsonData){
        try {
            iotShareInterfaceService.editInterface(json);
            iotShareInterfaceService.editInterface(jsonData);
            return MixEnvelop.getSuccess(IotRequestMapping.Platform.message_success_edit);
        } catch (Exception e) {
            e.printStackTrace();
@ -251,7 +251,7 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.Platform.allotInterface)
    @ApiOperation(value = "分配接口", notes = "分配接口")
    public MixEnvelop<IotCompanyAppInterfaceDO, IotCompanyAppInterfaceDO> allotInterface(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
    public MixEnvelop<IotCompanyAppInterfaceDO, IotCompanyAppInterfaceDO> allotInterface(@ApiParam(name = "jsonData", value = "jsonData", defaultValue = "")
                                                             @RequestParam(value = "jsonData", required = true)String jsonData,
                                                                             @ApiParam(name = "ids", value = "IDS", defaultValue = "")
                                                             @RequestParam(value = "ids",required = true) String ids) {

+ 4 - 4
svr/svr-iot/src/main/java/com/yihu/iot/controller/workType/IotWorkTypeController.java

@ -28,8 +28,8 @@ public class IotWorkTypeController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.WorkType.addType)
    @ApiOperation(value = "添加业务类型",notes = "添加业务类型")
    public MixEnvelop<IotWorkTypeDO,IotWorkTypeDO> addType(@ApiParam(name = "JSON",value = "JSON串")
                                                           @RequestParam(value = "JSON",required = true)String json){
    public MixEnvelop<IotWorkTypeDO,IotWorkTypeDO> addType(@ApiParam(name = "jsonData",value = "jsonData")
                                                           @RequestParam(value = "jsonData",required = true)String json){
        try {
            iotWorkTypeService.addType(json);
@ -44,8 +44,8 @@ public class IotWorkTypeController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.WorkType.editType)
    @ApiOperation(value = "编辑业务类型",notes = "编辑业务类型")
    public MixEnvelop<IotWorkTypeDO,IotWorkTypeDO> editType(@ApiParam(name = "JSON",value = "JSON串")
                                                            @RequestParam(value = "JSON",required = true)String json){
    public MixEnvelop<IotWorkTypeDO,IotWorkTypeDO> editType(@ApiParam(name = "jsonData",value = "jsonData串")
                                                            @RequestParam(value = "jsonData",required = true)String json){
        try {
            iotWorkTypeService.editType(json);

+ 4 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/platform/IotInterfaceAuditService.java

@ -59,12 +59,14 @@ public class IotInterfaceAuditService  extends BaseJpaService<IotInterfaceAuditD
     * 应用接口申请
     * @param json
     */
    public void addInterfaceApplyFor(String json, List<String> ids) {
    public void addInterfaceApplyFor(String json, String ids) {
        IotInterfaceAuditDO iotInterfaceAuditDO = JSONObject.parseObject(json, IotInterfaceAuditDO.class);
        iotInterfaceAuditDO.setTime(DateUtil.getNowDate());
        iotInterfaceAuditDao.save(iotInterfaceAuditDO);
        ids.forEach(one->{
        List<String> list = JSONObject.parseObject(ids, List.class);
        list.forEach(one->{
            IotInterfaceAuditDetailDO iotInterfaceAuditDetailDO = new IotInterfaceAuditDetailDO();
            iotInterfaceAuditDetailDO.setInterfaceId(iotInterfaceAuditDO.getId());