Merge pull request 'feat():优化' (#29) from dev.saas.yp into dev.saas

Reviewed-on: #29
dev.saas
yangpeng 2024-09-30 14:44:23 +08:00
commit 535eae941e
5 changed files with 3 additions and 61 deletions

View File

@ -32,8 +32,6 @@ public class MiddleController {
@Autowired
private CarFenceServiceMybaits carFenceServiceMybaits;
/**
*
*/
@ -57,18 +55,6 @@ public class MiddleController {
return Result.success();
}
/**
*
*/
@PutMapping("/activate")
@Operation(summary = "启动围栏状态",description = "启动围栏状态")
public Result activate(@RequestBody FenceGroupUpdateReq fenceGroupUpdateReq){
Integer states = 0;
FenceGroup fenceGroup = FenceGroup.carFenceUpdateById(states, fenceGroupUpdateReq);
boolean b = carFenceServiceMybaits.updateById(fenceGroup);
return Result.success("成功");
}
/**
* id

View File

@ -33,17 +33,6 @@ public interface CarFenceServiceMybaitsMapper extends BaseMapper<CarMiddle> {
*/
Integer addFenceGroup(@Param("fenceGroupId") Integer fenceGroupId, @Param("id") Integer id);
/**
*
* @param groupId
* @return
*/
void updateFenceGroupById(@Param("groupId") Integer groupId);
/**
*
*/
void activate(@Param("groupId") Integer groupId);
/**
* id

View File

@ -41,7 +41,7 @@ public interface CarFenceServiceMybaits extends IService<CarMiddle> {
*
*/
Object activate(Integer groupId);
boolean updateById(FenceGroup FenceGroup);
/**
* id
*/

View File

@ -54,30 +54,8 @@ public class CarFenceServiceMybaitsImpl extends ServiceImpl<CarFenceServiceMybai
}
/**
*
* @param groupId
* @return
*/
@Override
public Object updateFenceGroupById(Integer groupId) {
carFenceServiceMybaitsMapper.updateFenceGroupById(groupId);
return null;
}
/**
*
*/
@Override
public Object activate(Integer groupId) {
carFenceServiceMybaitsMapper.activate(groupId);
return null;
}
// @Override
// public void updateById(FenceGroup groupId) {
//
// this.updateById(groupId);
// }
/**
* id
@ -122,13 +100,7 @@ public class CarFenceServiceMybaitsImpl extends ServiceImpl<CarFenceServiceMybai
return fenceGroups;
}
@Override
public boolean updateById(FenceGroup fenceGroup) {
Long groupId = fenceGroup.getGroupId();
boolean b = this.updateById(fenceGroup);
return b;
}
}

View File

@ -17,12 +17,7 @@
<insert id="addFenceGroupAddCarMiddle">
insert into car_group_middle values (0,#{id},#{groupId})
</insert>
<update id="updateFenceGroupById">
update fence_group set group_states = 1 where group_id = #{groupId}
</update>
<update id="activate">
update fence_group set group_states = 0 where group_id = #{groupId}
</update>
<!--根据围栏组的id查询绑定的围栏的中间表-->
<select id="BoundFenceGroup" resultType="com.muyu.domain.CarMiddle">
select * from car_middle where car_group_id = #{groupId}