2 Commits

Author SHA1 Message Date
0fa0e4ab1b 帐号状态(0正常 1停用) 2025-07-18 10:36:02 +08:00
e321dcd652 修改客户状态 2025-07-18 10:23:04 +08:00
7 changed files with 26 additions and 25 deletions

View File

@ -6,18 +6,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="queryAppFileList" resultType="com.fuyuanshen.app.domain.vo.AppFileVo">
select a.id,a.business_id,a.file_id,b.file_name,b.url fileUrl from app_business_file a left join sys_oss b on a.file_id = b.oss_id
where 1=1
where
<if test="businessId != null">
and a.business_id = #{businessId}
</if>
<if test="fileId != null">
and a.file_id = #{fileId}
</if>
<if test="fileType != null">
and a.file_type = #{fileType}
</if>
<if test="createBy != null">
and a.create_by = #{createBy}
a.create_by = #{createBy}
</if>
order by a.create_time desc
</select>

View File

@ -58,6 +58,12 @@ public class ConsumerVo extends TenantEntity {
@Schema(name = "是否启用")
private Boolean enabled;
/**
* 帐号状态0正常 1停用
*/
@Schema(name = "帐号状态0正常 1停用")
private String status;
@Schema(name = "是否为admin账号", hidden = true)
private Boolean isAdmin = false;

View File

@ -112,6 +112,11 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
@Override
@Transactional(rollbackFor = Exception.class)
public void updateCustomer(Customer resources) throws Exception {
if (resources.getEnabled()) {
resources.setStatus("0");
} else {
resources.setStatus("1");
}
saveOrUpdate(resources);
}

View File

@ -94,7 +94,7 @@
<!-- 分页查询客户 -->
<select id="findCustomers" resultType="com.fuyuanshen.customer.domain.Customer">
select
u.user_id as customerId, u.nick_name , u.user_name, u.enabled, u.create_time
u.user_id as customerId, u.nick_name , u.user_name, u.enabled, u.create_time,u.status
from sys_user u
<where>
<if test="criteria.ids != null and !criteria.ids.isEmpty()">

View File

@ -9,8 +9,6 @@ import com.fuyuanshen.common.tenant.core.TenantEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Date;
/**
* @Description: 设备表
* @Author: WY
@ -116,6 +114,4 @@ public class Device extends TenantEntity {
private String createByName;
private Long bindingUserId;
private Date bindingTime;
}

View File

@ -533,9 +533,8 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
UpdateWrapper<Device> deviceUpdateWrapper = new UpdateWrapper<>();
deviceUpdateWrapper.eq("id", device.getId())
.set("binding_status", BindingStatusEnum.BOUND.getCode())
.set("binding_user_id", userId)
.set("binding_time", new Date());
.set("binding_user_id", userId);
;
return baseMapper.update(null, deviceUpdateWrapper);
} else if (mode == CommunicationModeEnum.BLUETOOTH.getValue()) {
@ -553,8 +552,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
UpdateWrapper<Device> deviceUpdateWrapper = new UpdateWrapper<>();
deviceUpdateWrapper.eq("id", device.getId())
.set("binding_status", BindingStatusEnum.BOUND.getCode())
.set("binding_user_id", userId)
.set("binding_time", new Date());
.set("binding_user_id", userId);
return baseMapper.update(null, deviceUpdateWrapper);
} else {
throw new RuntimeException("通讯方式错误");
@ -573,8 +571,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
UpdateWrapper<Device> deviceUpdateWrapper = new UpdateWrapper<>();
deviceUpdateWrapper.eq("id", device.getId())
.set("binding_status", BindingStatusEnum.UNBOUND.getCode())
.set("binding_user_id", null)
.set("binding_time", null);
.set("binding_user_id", null);
return baseMapper.update(null, deviceUpdateWrapper);
}

16
pom.xml
View File

@ -81,10 +81,10 @@
<monitor.username>fys</monitor.username>
<monitor.password>123456</monitor.password>
</properties>
<!-- <activation> -->
<!-- &lt;!&ndash; 默认环境 &ndash;&gt; -->
<!-- <activeByDefault>true</activeByDefault> -->
<!-- </activation> -->
<activation>
<!-- 默认环境 -->
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>prod</id>
@ -94,10 +94,10 @@
<monitor.username>fys</monitor.username>
<monitor.password>123456</monitor.password>
</properties>
<activation>
<!-- 默认环境 -->
<activeByDefault>true</activeByDefault>
</activation>
<!-- <activation> -->
<!-- &lt;!&ndash; 默认环境 &ndash;&gt; -->
<!-- <activeByDefault>true</activeByDefault> -->
<!-- </activation> -->
</profile>
</profiles>