forked from dyf/fys-Multi-tenant
app:查看APP客户设备绑定
This commit is contained in:
@ -6,8 +6,16 @@ import com.fuyuanshen.app.domain.APPDeviceType;
|
||||
import com.fuyuanshen.app.domain.dto.APPUnbindDTO;
|
||||
import com.fuyuanshen.app.domain.query.APPDeviceQueryCriteria;
|
||||
import com.fuyuanshen.app.service.equipment.APPDeviceService;
|
||||
import com.fuyuanshen.common.core.domain.R;
|
||||
import com.fuyuanshen.common.core.domain.ResponseVO;
|
||||
import com.fuyuanshen.common.core.validate.EditGroup;
|
||||
import com.fuyuanshen.common.idempotent.annotation.RepeatSubmit;
|
||||
import com.fuyuanshen.common.log.annotation.Log;
|
||||
import com.fuyuanshen.common.log.enums.BusinessType;
|
||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||
import com.fuyuanshen.common.web.core.BaseController;
|
||||
import com.fuyuanshen.equipment.domain.bo.UserAppBo;
|
||||
import com.fuyuanshen.equipment.service.AppUserService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -27,9 +35,10 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/app/device")
|
||||
public class APPDeviceController {
|
||||
public class APPDeviceController extends BaseController {
|
||||
|
||||
private final APPDeviceService appDeviceService;
|
||||
private final AppUserService appUserService;
|
||||
|
||||
|
||||
@PostMapping(value = "/list")
|
||||
@ -76,4 +85,16 @@ public class APPDeviceController {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改APP用户信息
|
||||
*/
|
||||
// @SaCheckPermission("app:user:edit")
|
||||
@Log(title = "APP用户信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserAppBo bo) {
|
||||
return toAjax(appUserService.updateByBo(bo));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -79,17 +79,19 @@
|
||||
<if test="criteria.createTime != null and criteria.createTime.size() != 0">
|
||||
and d.create_time between #{criteria.createTime[0]} and #{criteria.createTime[1]}
|
||||
</if>
|
||||
<if test="criteria.tenantId != null">
|
||||
AND tenant_id = #{criteria.tenantId}
|
||||
</if>
|
||||
and d.customer_id = #{criteria.customerId}
|
||||
</where>
|
||||
order by d.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getTypeList" resultType="com.fuyuanshen.app.domain.vo.APPDeviceTypeVo">
|
||||
SELECT dt.id, dt.type_name, dt.communication_mode FROM device_type dt
|
||||
WHERE EXISTS(select 1 from device d where d.device_type = dt.id and d.binding_user_id = #{userId} AND d.binding_status = 1 )
|
||||
SELECT dt.id, dt.type_name, dt.communication_mode
|
||||
FROM device_type dt
|
||||
WHERE EXISTS(select 1
|
||||
from device d
|
||||
where d.device_type = dt.id
|
||||
and d.binding_user_id = #{userId}
|
||||
AND d.binding_status = 1)
|
||||
</select>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user