| | |
| | | @ApiModel("新增志愿者组织队伍表请求参数") |
| | | public class AddComMngVolunteerOrgTeamDto { |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 社区id |
| | |
| | | public class AddComMngVolunteerServiceTypeDto { |
| | | |
| | | |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | | */ |
| | |
| | | @Data |
| | | @TableName("com_mng_volunteer_org_team") |
| | | public class ComMngVolunteerOrgTeam implements Serializable { |
| | | private static final long serialVersionUID = -87266346603371467L; |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 主键id |
| | | */ |
| | |
| | | @Data |
| | | @TableName("com_mng_volunteer_service_type") |
| | | public class ComMngVolunteerServiceType implements Serializable { |
| | | private static final long serialVersionUID = 884034720723106601L; |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 主键id |
| | | */ |
| | |
| | | * @author lyq |
| | | * @since 2021-10-30 16:32:54 |
| | | */ |
| | | @Service("comMngVolunteerOrgTeamService") |
| | | @Service |
| | | public class ComMngVolunteerOrgTeamServiceImpl extends ServiceImpl<ComMngVolunteerOrgTeamMapper, ComMngVolunteerOrgTeam> implements ComMngVolunteerOrgTeamService { |
| | | |
| | | @Resource |
| | |
| | | public R insert(AddComMngVolunteerOrgTeamDto comMngVolunteerOrgTeam) { |
| | | ComMngVolunteerOrgTeam entity = new ComMngVolunteerOrgTeam(); |
| | | BeanUtils.copyProperties(comMngVolunteerOrgTeam, entity); |
| | | entity.setId(Snowflake.getId()); |
| | | if (this.baseMapper.insert(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | |
| | | * @author lyq |
| | | * @since 2021-10-30 16:47:10 |
| | | */ |
| | | @Service("comMngVolunteerServiceTypeService") |
| | | @Service |
| | | public class ComMngVolunteerServiceTypeServiceImpl extends ServiceImpl<ComMngVolunteerServiceTypeMapper, ComMngVolunteerServiceType> implements ComMngVolunteerServiceTypeService { |
| | | |
| | | @Resource |
| | |
| | | public R insert(AddComMngVolunteerServiceTypeDto comMngVolunteerServiceType) { |
| | | ComMngVolunteerServiceType entity = new ComMngVolunteerServiceType(); |
| | | BeanUtils.copyProperties(comMngVolunteerServiceType, entity); |
| | | entity.setId(Snowflake.getId()); |
| | | entity.setCreateAt(new Date()); |
| | | entity.setCreateBy(comMngVolunteerServiceType.getUserId()); |
| | | if (this.baseMapper.insert(entity) > 0) { |
| | |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <!--新增所有列--> |
| | | <insert id="insert" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_org_team(community_id, name, parent_id, service_type_id, create_at, update_at) |
| | | values (#{communityId}, #{name}, #{parentId}, #{serviceTypeId}, #{createAt}, #{updateAt}) |
| | | </insert> |
| | | |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_org_team(community_id, name, parent_id, service_type_id, create_at, update_at) |
| | | values |
| | |
| | | </select> |
| | | |
| | | <!--新增所有列--> |
| | | <insert id="insert" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_service_type(community_id, name, remark, create_at, create_by, update_at, update_by) |
| | | values (#{communityId}, #{name}, #{remark}, #{createAt}, #{createBy}, #{updateAt}, #{updateBy}) |
| | | </insert> |
| | | |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into com_mng_volunteer_service_type(community_id, name, remark, create_at, create_by, update_at, |