feat:围栏,围栏组,高德

master
hbr 2024-06-02 15:12:18 +08:00
parent 0b3d79d7d7
commit 58333c29eb
14 changed files with 560 additions and 80 deletions

View File

@ -105,20 +105,23 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business>
.userType(String.valueOf(business.getId()))
.build();
Result add = remoteUserService.add(sysUser);
httpConnectMysql(business);
if (redisTemplate.hasKey(business.getId()+business.getName())){
httpConnectMysql(business);
}else{
redisTemplate.opsForValue().set(business.getId()+business.getName(),String.valueOf(3306+business.getId()));
}
// redisTemplate.opsForValue().set(business.getName()+""+business.getId(),);
return i;
}
public void httpConnectMysql(Business business){
if (business.getBusinessStates().equals(2) ) {
if (!redisTemplate.hasKey(business.getId()+business.getName())){
redisTemplate.opsForValue().set(business.getId()+business.getName(),String.valueOf(3306+business.getId()));
extracted(business);
}
}
}
private static void extracted(Business business) {
String postUrl="http://122.51.111.225:10006/webhook/%E6%96%B0%E5%BB%BA%E4%BC%81%E4%B8%9A%E6%95%B0%E6%8D%AE%E6%BA%90";
HashMap<String, String> hashMap = new HashMap<>();
hashMap.put("businessId",business.getId()+business.getName());
hashMap.put("mysqlPort",String.valueOf(3306+business.getId()));
hashMap.put("businessId", business.getId()+ business.getName());
hashMap.put("mysqlPort",String.valueOf(3306+ business.getId()));
String json = JSON.toJSONString(hashMap);
// 3.创建连接与设置连接参数
URL urlObj = null;
@ -163,6 +166,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business>
public int updateBusiness(Business business)
{
business.setUpdateTime(DateUtils.getNowDate());
httpConnectMysql(business);
return businessMapper.updateBusiness(business);
}

View File

@ -13,6 +13,7 @@ import com.zhiLian.common.log.enums.BusinessType;
import com.zhiLian.common.security.annotation.RequiresPermissions;
import com.zhiLian.vehicle.domain.Fence;
import com.zhiLian.vehicle.service.IFenceService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -32,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RestController
@RequestMapping("/fence")
@Log4j2
public class FenceController extends BaseController
{
@Autowired
@ -46,6 +48,7 @@ public class FenceController extends BaseController
{
startPage();
List<Fence> list = fenceService.selectFenceList(fence);
log.info("list:{}",list);
return getDataTable(list);
}

View File

@ -0,0 +1,105 @@
package com.zhiLian.vehicle.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.zhiLian.common.core.domain.Result;
import com.zhiLian.common.core.utils.poi.ExcelUtil;
import com.zhiLian.common.core.web.controller.BaseController;
import com.zhiLian.common.core.web.page.TableDataInfo;
import com.zhiLian.common.log.annotation.Log;
import com.zhiLian.common.log.enums.BusinessType;
import com.zhiLian.common.security.annotation.RequiresPermissions;
import com.zhiLian.vehicle.domain.Group;
import com.zhiLian.vehicle.service.IGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Controller
*
* @author muyu
* @date 2024-06-02
*/
@RestController
@RequestMapping("/group")
public class GroupController extends BaseController
{
@Autowired
private IGroupService groupService;
/**
*
*/
// @RequiresPermissions("system:group:list")
@GetMapping("/list")
public Result<TableDataInfo<Group>> list(Group group)
{
startPage();
List<Group> list = groupService.selectGroupList(group);
return getDataTable(list);
}
/**
*
*/
// @RequiresPermissions("system:group:export")
@Log(title = "围栏组", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Group group)
{
List<Group> list = groupService.selectGroupList(group);
ExcelUtil<Group> util = new ExcelUtil<Group>(Group.class);
util.exportExcel(response, list, "围栏组数据");
}
/**
*
*/
// @RequiresPermissions("system:group:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(groupService.selectGroupById(id));
}
/**
*
*/
// @RequiresPermissions("system:group:add")
@Log(title = "围栏组", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody Group group)
{
return toAjax(groupService.insertGroup(group));
}
/**
*
*/
// @RequiresPermissions("system:group:edit")
@Log(title = "围栏组", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody Group group)
{
return toAjax(groupService.updateGroup(group));
}
/**
*
*/
// @RequiresPermissions("system:group:remove")
@Log(title = "围栏组", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(groupService.deleteGroupByIds(ids));
}
}

View File

@ -1,10 +1,20 @@
package com.zhiLian.vehicle.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhiLian.common.core.annotation.Excel;
import com.zhiLian.common.core.web.domain.BaseEntity;
import com.zhiLian.vehicle.domain.vo.Path;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.List;
/**
@ -13,6 +23,12 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author muyu
* @date 2024-05-31
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("fence")
public class Fence extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -24,6 +40,12 @@ public class Fence extends BaseEntity
@Excel(name = "围栏名称")
private String name;
@Excel(name = "围栏组ID")
private Long groupId;
/** 围栏经纬集合 */
@TableField(exist = false)
private List<Path> path;
/** 围栏经纬 */
@Excel(name = "围栏经纬")
private String fenceLongitudeLatitude;
@ -31,6 +53,13 @@ public class Fence extends BaseEntity
/** 围栏备注 */
@Excel(name = "围栏备注")
private String fenceDescription;
/** 半径 */
@Excel(name = "半径")
private Double radius;
/** 驶入,驶出 */
@Excel(name = "驶入,驶出")
private String eventType;
/** 是否删除 0 不删除 1删除 */
@Excel(name = "是否删除 0 不删除 1删除")
@ -40,75 +69,6 @@ public class Fence extends BaseEntity
@Excel(name = "围栏状态")
private String fenceState;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setFenceLongitudeLatitude(String fenceLongitudeLatitude)
{
this.fenceLongitudeLatitude = fenceLongitudeLatitude;
}
public String getFenceLongitudeLatitude()
{
return fenceLongitudeLatitude;
}
public void setFenceDescription(String fenceDescription)
{
this.fenceDescription = fenceDescription;
}
public String getFenceDescription()
{
return fenceDescription;
}
public void setIsDelete(String isDelete)
{
this.isDelete = isDelete;
}
public String getIsDelete()
{
return isDelete;
}
public void setFenceState(String fenceState)
{
this.fenceState = fenceState;
}
public String getFenceState()
{
return fenceState;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("fenceLongitudeLatitude", getFenceLongitudeLatitude())
.append("fenceDescription", getFenceDescription())
.append("isDelete", getIsDelete())
.append("fenceState", getFenceState())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,47 @@
package com.zhiLian.vehicle.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhiLian.common.core.annotation.Excel;
import com.zhiLian.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* group
*
* @author muyu
* @date 2024-06-02
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("group")
public class Group extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 围栏组ID */
private Long id;
/** 围栏组名称 */
@Excel(name = "围栏组名称")
private String groupName;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateTime;
}

View File

@ -62,4 +62,7 @@ public class Vehicle extends BaseEntity
@Excel(name = "企业ID")
private Long businessId;
@Excel(name="围栏组ID")
private Long groupId;
}

View File

@ -0,0 +1,25 @@
package com.zhiLian.vehicle.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* BingRui.Hou
*
* @Description
* @ClassName Path
* @Date 2024/06/02 10:48
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Path {
private String Q;
private String R;
private String lng;
private String lat;
}

View File

@ -0,0 +1,64 @@
package com.zhiLian.vehicle.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhiLian.vehicle.domain.Group;
import java.util.List;
/**
* Mapper
*
* @author muyu
* @date 2024-06-02
*/
public interface GroupMapper extends BaseMapper<Group>
{
/**
*
*
* @param id
* @return
*/
public Group selectGroupById(Long id);
/**
*
*
* @param group
* @return
*/
public List<Group> selectGroupList(Group group);
/**
*
*
* @param group
* @return
*/
public int insertGroup(Group group);
/**
*
*
* @param group
* @return
*/
public int updateGroup(Group group);
/**
*
*
* @param id
* @return
*/
public int deleteGroupById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteGroupByIds(Long[] ids);
}

View File

@ -0,0 +1,65 @@
package com.zhiLian.vehicle.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhiLian.vehicle.domain.Fence;
import com.zhiLian.vehicle.domain.Group;
import java.util.List;
/**
* Service
*
* @author muyu
* @date 2024-06-02
*/
public interface IGroupService extends IService<Group>
{
/**
*
*
* @param id
* @return
*/
public Group selectGroupById(Long id);
/**
*
*
* @param group
* @return
*/
public List<Group> selectGroupList(Group group);
/**
*
*
* @param group
* @return
*/
public int insertGroup(Group group);
/**
*
*
* @param group
* @return
*/
public int updateGroup(Group group);
/**
*
*
* @param ids
* @return
*/
public int deleteGroupByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteGroupById(Long id);
}

View File

@ -2,6 +2,7 @@ package com.zhiLian.vehicle.service.impl;
import java.util.List;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhiLian.common.core.utils.DateUtils;
import com.zhiLian.vehicle.domain.Fence;
@ -60,6 +61,9 @@ public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fence>
@Override
public int insertFence(Fence fence)
{
// String jsonString = JSON.toJSONString(fence.getPath());
String string = fence.getPath().toString();
fence.setFenceLongitudeLatitude(string);
fence.setCreateTime(DateUtils.getNowDate());
return fenceMapper.insertFence(fence);
}

View File

@ -0,0 +1,103 @@
package com.zhiLian.vehicle.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhiLian.common.core.utils.DateUtils;
import com.zhiLian.vehicle.domain.Fence;
import com.zhiLian.vehicle.domain.Group;
import com.zhiLian.vehicle.mapper.FenceMapper;
import com.zhiLian.vehicle.mapper.GroupMapper;
import com.zhiLian.vehicle.service.IFenceService;
import com.zhiLian.vehicle.service.IGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author muyu
* @date 2024-06-02
*/
@Service
public class GroupServiceImpl extends ServiceImpl<GroupMapper, Group>
implements IGroupService
{
@Autowired
private GroupMapper groupMapper;
/**
*
*
* @param id
* @return
*/
@Override
public Group selectGroupById(Long id)
{
return groupMapper.selectGroupById(id);
}
/**
*
*
* @param group
* @return
*/
@Override
public List<Group> selectGroupList(Group group)
{
return groupMapper.selectGroupList(group);
}
/**
*
*
* @param group
* @return
*/
@Override
public int insertGroup(Group group)
{
group.setCreateTime(DateUtils.getNowDate());
return groupMapper.insertGroup(group);
}
/**
*
*
* @param group
* @return
*/
@Override
public int updateGroup(Group group)
{
return groupMapper.updateGroup(group);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteGroupByIds(Long[] ids)
{
return groupMapper.deleteGroupByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteGroupById(Long id)
{
return groupMapper.deleteGroupById(id);
}
}

View File

@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.zhiLian.vehicle.domain.Fence" id="FenceResult">
<result property="id" column="id" />
<result property="groupId" column="group_id" />
<result property="name" column="name" />
<result property="fenceLongitudeLatitude" column="fenceLongitudeLatitude" />
<result property="fenceDescription" column="fenceDescription" />
@ -16,16 +17,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="radius" column="radius" />
<result property="eventType" column="event_type" />
</resultMap>
<sql id="selectFenceVo">
select id, name, fenceLongitudeLatitude, fenceDescription, isDelete, fenceState, remark, create_by, create_time, update_by, update_time from fence
select id,group_id, name,radius,event_type, fenceLongitudeLatitude, fenceDescription, isDelete, fenceState, remark, create_by, create_time, update_by, update_time from fence
</sql>
<select id="selectFenceList" parameterType="com.zhiLian.vehicle.domain.Fence" resultMap="FenceResult">
<include refid="selectFenceVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="groupId != null and groupId != ''"> and group_id like concat('%', #{groupId}, '%')</if>
<if test="radius != null and radius != ''"> and radius like concat('%', #{radius}, '%')</if>
<if test="eventType != null and eventType != ''"> and event_type like concat('%', #{eventType}, '%')</if>
<if test="fenceLongitudeLatitude != null and fenceLongitudeLatitude != ''"> and fenceLongitudeLatitude = #{fenceLongitudeLatitude}</if>
<if test="fenceDescription != null and fenceDescription != ''"> and fenceDescription = #{fenceDescription}</if>
<if test="isDelete != null and isDelete != ''"> and isDelete = #{isDelete}</if>
@ -42,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into fence
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="groupId != null">group_id,</if>
<if test="radius != null">radius,</if>
<if test="eventType != null">event_type,</if>
<if test="fenceLongitudeLatitude != null">fenceLongitudeLatitude,</if>
<if test="fenceDescription != null">fenceDescription,</if>
<if test="isDelete != null">isDelete,</if>
@ -54,6 +63,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="groupId != null">#{groupId},</if>
<if test="radius != null">#{radius},</if>
<if test="eventType != null">#{eventType},</if>
<if test="fenceLongitudeLatitude != null">#{fenceLongitudeLatitude},</if>
<if test="fenceDescription != null">#{fenceDescription},</if>
<if test="isDelete != null">#{isDelete},</if>
@ -70,6 +82,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update fence
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="groupId != null">group_id = #{groupId},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="radius != null">radius = #{radius},</if>
<if test="fenceLongitudeLatitude != null">fenceLongitudeLatitude = #{fenceLongitudeLatitude},</if>
<if test="fenceDescription != null">fenceDescription = #{fenceDescription},</if>
<if test="isDelete != null">isDelete = #{isDelete},</if>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhiLian.vehicle.mapper.GroupMapper">
<resultMap type="com.zhiLian.vehicle.domain.Group" id="GroupResult">
<result property="id" column="id" />
<result property="groupName" column="group_name" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectGroupVo">
select id, group_name, remark, create_by, create_time, update_by, update_time from `group`
</sql>
<select id="selectGroupList" parameterType="com.zhiLian.vehicle.domain.Group" resultMap="GroupResult">
<include refid="selectGroupVo"/>
<where>
<if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
</where>
</select>
<select id="selectGroupById" parameterType="Long" resultMap="GroupResult">
<include refid="selectGroupVo"/>
where id = #{id}
</select>
<insert id="insertGroup" parameterType="com.zhiLian.vehicle.domain.Group" useGeneratedKeys="true" keyProperty="id">
insert into `group`
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="groupName != null">group_name,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="groupName != null">#{groupName},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateGroup" parameterType="com.zhiLian.vehicle.domain.Group">
update `group`
<trim prefix="SET" suffixOverrides=",">
<if test="groupName != null">group_name = #{groupName},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteGroupById" parameterType="Long">
delete from `group` where id = #{id}
</delete>
<delete id="deleteGroupByIds" parameterType="String">
delete from `group` where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -19,10 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="groupId" column="group_id" />
</resultMap>
<sql id="selectVehicleVo">
select id, number, type_id, electonic_id, motor, battery, motor_number, battery_number, business_id, remark, create_by, create_time, update_by, update_time from vehicle
select id, number,group_id, type_id, electonic_id, motor, battery, motor_number, battery_number, business_id, remark, create_by, create_time, update_by, update_time from vehicle
</sql>
<select id="selectVehicleList" parameterType="com.zhiLian.vehicle.domain.Vehicle" resultMap="VehicleResult">
@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="motorNumber != null "> and motor_number = #{motorNumber}</if>
<if test="batteryNumber != null "> and battery_number = #{batteryNumber}</if>
<if test="businessId != null "> and business_id = #{businessId}</if>
<if test="groupId != null "> and group_id = #{groupId}</if>
</where>
</select>
@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="groupId != null">group_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -78,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="groupId != null">#{groupId},</if>
</trim>
</insert>
@ -97,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="groupId != null">group_id = #{groupId},</if>
</trim>
where id = #{id}
</update>