| | |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | getLoginUserInfo() |
| | | if(StringUtils.isEmpty(communityId)) |
| | | { |
| | | communityId=getLoginUserInfo().getCommunityId()+""; |
| | |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getUserId())) |
| | | { |
| | | return R.fail("用户id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getActivityId())) |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getVolunteerId())) |
| | | { |
| | | return R.fail("志愿者id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getCommunityId())) |
| | |
| | | @ApiModelProperty("区域划分") |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty("爱心积分") |
| | | private String loveIntegral; |
| | | |
| | | @ApiModelProperty("是否单位管理员 1是 0否") |
| | | private Integer isCheckUnitAdmin; |
| | | |
| | |
| | | @ApiModelProperty("志愿者id") |
| | | private String volunteerId; |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty("发放积分") |
| | | private String grantIntegral="0"; |
| | | |
| | |
| | | private String volunteerId; |
| | | |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("路北社区积分记录明细") |
| | | public class VolunteerIntegralRecordVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "1志愿者活动 2 社区兑换 3商家抵扣") |
| | | private String iType; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String creationTime; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String updateTime; |
| | | |
| | | @ApiModelProperty(value = "积分数量") |
| | | private String integral; |
| | | |
| | | @ApiModelProperty(value = "志愿者id") |
| | | private String volunteerId; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private String userId; |
| | | |
| | | } |
| | |
| | | @PostMapping("/grantIntegral") |
| | | public R grantIntegral(@RequestBody GrantIntegral grantIntegral); |
| | | |
| | | /************************************************************************************************************** |
| | | * |
| | | * |
| | | * 积分明细记录 |
| | | * |
| | | *****************************************************************************************************************/ |
| | | /** |
| | | * 获取单个详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerIntegralRecord/getId") |
| | | public R VolunteerIntegralRecordGetId(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerIntegralRecord/getId") |
| | | public R VolunteerIntegralRecordGetList(int pageNum, int pageSize, |
| | | @RequestParam("userId") String userId); |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerIntegralRecord/insertVolunteer") |
| | | public R VolunteerIntegralRecordInsertVolunteer(@RequestBody() VolunteerIntegralRecordVO volunteerIntegralRecordVO); |
| | | |
| | | /** |
| | | * 便捷 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerIntegralRecord/updateId") |
| | | public R VolunteerIntegralRecordUpdateId(@RequestBody() VolunteerIntegralRecordVO volunteerIntegralRecordVO); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/VolunteerIntegralRecord/deleteId") |
| | | public R VolunteerIntegralRecordDeleteId(@RequestParam("id") String id); |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/Volunteer") |
| | | public class VolunteerActivityApi |
| | | public class VolunteerActivityApi extends BaseController |
| | | { |
| | | @Resource |
| | | private CommunityService communityService; |
| | |
| | | @PostMapping("/insertVolunteer") |
| | | R insertVolunteer(@RequestBody VolunteerActivityVO volunteerActivityVO) |
| | | { |
| | | if(StringUtils.isNotEmpty(volunteerActivityVO.getCommunityId())) |
| | | { |
| | | volunteerActivityVO.setCommunityId(getLoginUserInfo().getCommunityId()+""); |
| | | } |
| | | return communityService.insertVolunteer(volunteerActivityVO); |
| | | } |
| | | |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.GrantIntegral; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.service.VolunteerActivitiesPeopleService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(grantIntegral.getUserId())) |
| | | { |
| | | return R.fail("用户id不能为空"); |
| | | } |
| | | |
| | | if(grantIntegral.getPeopleAndGranList()==null || grantIntegral.getPeopleAndGranList().size()<=0 ) |
| | | { |
| | | return R.fail("奖励积分人员不能为空"); |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerIntegralRecordVO; |
| | | import com.panzhihua.service_community.service.VolunteerIntegralRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/VolunteerIntegralRecord") |
| | | public class VolunteerIntegralRecordApi |
| | | { |
| | | |
| | | @Resource |
| | | private VolunteerIntegralRecordService volunteerIntegralRecordService; |
| | | |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getId") |
| | | public R VolunteerIntegralRecordGetId(@RequestParam("id") String id) |
| | | { |
| | | return volunteerIntegralRecordService.getId(id); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/getId") |
| | | public R VolunteerIntegralRecordGetList(int pageNum, int pageSize, |
| | | @RequestParam("userId") String userId) |
| | | { |
| | | return volunteerIntegralRecordService.getList(pageNum,pageSize,userId); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/insertVolunteer") |
| | | public R VolunteerIntegralRecordInsertVolunteer(@RequestBody() VolunteerIntegralRecordVO volunteerIntegralRecordVO) |
| | | { |
| | | return volunteerIntegralRecordService.insertVolunteer(volunteerIntegralRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 便捷 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateId") |
| | | public R VolunteerIntegralRecordUpdateId(@RequestBody() VolunteerIntegralRecordVO volunteerIntegralRecordVO) |
| | | { |
| | | return volunteerIntegralRecordService.updateId(volunteerIntegralRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/deleteId") |
| | | public R VolunteerIntegralRecordDeleteId(@RequestParam("id") String id) |
| | | { |
| | | return volunteerIntegralRecordService.deleteId(id); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerIntegralRecordVO; |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | import com.panzhihua.service_community.entity.VolunteerIntegralRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface VolunteerIntegralRecordDao extends BaseMapper<VolunteerIntegralRecord> |
| | | { |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerIntegralRecord getId(@Param("id") String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<VolunteerIntegralRecord> getList(Page page, |
| | | @Param("userId") String userId); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int insertVolunteer(@Param("volunteerIntegralRecordVO") VolunteerIntegralRecordVO volunteerIntegralRecordVO); |
| | | |
| | | |
| | | int updateId(@Param("volunteerIntegralRecordVO") VolunteerIntegralRecordVO volunteerIntegralRecordVO); |
| | | |
| | | |
| | | int deleteId(@Param("id") String id); |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "绑定单位") |
| | | private String relationName; |
| | | |
| | | @ApiModelProperty(value = "爱心积分") |
| | | private String loveIntegral; |
| | | |
| | | private String appId; |
| | | /** |
| | | * 启用状态(1.启用 2.禁用) |
| | |
| | | private String volunteerId; |
| | | |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @TableField(exist = false) |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("路北社区积分记录明细") |
| | | public class VolunteerIntegralRecord implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "1志愿者活动 2 社区兑换 3商家抵扣") |
| | | private String iType; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String creationTime; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String updateTime; |
| | | |
| | | @ApiModelProperty(value = "积分数量") |
| | | private String integral; |
| | | |
| | | @ApiModelProperty(value = "志愿者id") |
| | | private String volunteerId; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private String userId; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerIntegralRecordVO; |
| | | import com.panzhihua.service_community.entity.VolunteerIntegralRecord; |
| | | |
| | | public interface VolunteerIntegralRecordService extends IService<VolunteerIntegralRecord> { |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getId(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | R getList(int pageNum, int pageSize,String userId); |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | R insertVolunteer(VolunteerIntegralRecordVO volunteerIntegralRecordVO); |
| | | |
| | | |
| | | R updateId(VolunteerIntegralRecordVO volunteerIntegralRecordVO); |
| | | |
| | | |
| | | R deleteId(String id); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.community.GrantIntegral; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.VolunteerActivitiesPeopleDao; |
| | | import com.panzhihua.service_community.entity.SysUser; |
| | | import com.panzhihua.service_community.entity.VolunteerActivitiesPeople; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerMngService; |
| | | import com.panzhihua.service_community.service.VolunteerActivitiesPeopleService; |
| | | import com.panzhihua.service_community.service.VolunteerActivityService; |
| | | import com.panzhihua.service_community.service.VolunteerIntegralRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | public class VolunteerActivitiesPeopleServiceImpl extends ServiceImpl<VolunteerActivitiesPeopleDao, |
| | | VolunteerActivitiesPeople> implements VolunteerActivitiesPeopleService |
| | | { |
| | | |
| | | @Resource |
| | | private ComMngVolunteerMngService comMngVolunteerMngService; |
| | | |
| | | @Resource |
| | | private VolunteerActivityService volunteerActivityService; |
| | | |
| | | @Resource |
| | | private VolunteerIntegralRecordService volunteerIntegralRecordService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | |
| | | @Override |
| | |
| | | vla.setIssueStatus("1"); |
| | | baseMapper.vapUpdate(vla); |
| | | |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setId(Long.valueOf(item.getVolunteerId())); |
| | | |
| | | LoginUserInfoVO sysUser=userService.getUserInfoByUserId(item.getUserId()).getData(); |
| | | int grant=0; |
| | | if(!StringUtils.isNotEmpty(comMngVolunteerMngVO.getLoveIntegral())) |
| | | if(!StringUtils.isNotEmpty(sysUser.getLoveIntegral())) |
| | | { |
| | | grant=Integer.valueOf(comMngVolunteerMngVO.getLoveIntegral()); |
| | | grant=Integer.valueOf(sysUser.getLoveIntegral()); |
| | | } |
| | | grant+=Integer.valueOf(item.getGrantIntegral()); |
| | | sysUser.setLoveIntegral(grant+""); |
| | | userService.putUser(sysUser); |
| | | |
| | | comMngVolunteerMngVO.setLoveIntegral(grant+""); |
| | | //新增积分记录 |
| | | VolunteerIntegralRecordVO volunteerIntegralRecordVO=new VolunteerIntegralRecordVO(); |
| | | volunteerIntegralRecordVO.setIntegral(item.getGrantIntegral()); |
| | | volunteerIntegralRecordVO.setVolunteerId(item.getVolunteerId()); |
| | | volunteerIntegralRecordVO.setUserId(item.getUserId()); |
| | | volunteerIntegralRecordVO.setIType("1"); |
| | | volunteerIntegralRecordService.insertVolunteer(volunteerIntegralRecordVO); |
| | | |
| | | comMngVolunteerMngService.putVolunteer(comMngVolunteerMngVO); |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerIntegralRecordVO; |
| | | import com.panzhihua.service_community.dao.VolunteerIntegralRecordDao; |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | import com.panzhihua.service_community.entity.VolunteerIntegralRecord; |
| | | import com.panzhihua.service_community.service.VolunteerIntegralRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class VolunteerIntegralRecordServiceImpl extends ServiceImpl<VolunteerIntegralRecordDao, |
| | | VolunteerIntegralRecord> implements VolunteerIntegralRecordService |
| | | { |
| | | |
| | | |
| | | @Override |
| | | public R getId(String id) { |
| | | return R.ok(baseMapper.getId(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R getList(int pageNum, int pageSize, String userId) |
| | | { |
| | | Page page = new Page<VolunteerActivity>(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,userId)); |
| | | } |
| | | |
| | | @Override |
| | | public R insertVolunteer(VolunteerIntegralRecordVO volunteerIntegralRecordVO) |
| | | { |
| | | int num= baseMapper.insertVolunteer(volunteerIntegralRecordVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R updateId(VolunteerIntegralRecordVO volunteerIntegralRecordVO) { |
| | | int num= baseMapper.updateId(volunteerIntegralRecordVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteId(String id) { |
| | | int num= baseMapper.deleteId(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | } |
| | |
| | | <result property="plaintextPassword" column="plaintext_password"/> |
| | | <result property="streetId" column="street_id"/> |
| | | <result property="relationName" column="relation_name"/> |
| | | <result property="loveIntegral" column="love_integral"/> |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultMap="SysUserMap"> |
| | | select |
| | | user_id, account, password, openid, session_key, unionid, phone, nick_name, name, community_id, sex, id_card, birthday, image_url, type, job, is_volunteer, is_partymember, status, create_at, last_login_time, tags, family_id, face_url, face_state, reject_reson, area_id, card_photo_front, card_photo_back, family_book, continuous_landing_days, is_tips, work_status, work_start_time, work_end_time, big_age_tips, plaintext_password |
| | | user_id, account, password, openid, session_key, unionid, phone, nick_name, name, |
| | | community_id, sex, id_card, birthday, image_url, type, job, is_volunteer, is_partymember, |
| | | status, create_at, last_login_time, tags, family_id, face_url, face_state, reject_reson, |
| | | area_id, card_photo_front, card_photo_back, family_book, continuous_landing_days, is_tips, |
| | | work_status, work_start_time, work_end_time, big_age_tips, plaintext_password,love_integral |
| | | from sys_user |
| | | where user_id = #{userId} |
| | | </select> |
| | |
| | | select |
| | | user_id, account, password, openid, session_key, unionid, phone, nick_name, name, community_id, sex, id_card, |
| | | birthday, image_url, type, job, is_volunteer, is_partymember, status, create_at, last_login_time, tags, |
| | | family_id, face_url, face_state, reject_reson, area_id, card_photo_front, card_photo_back, family_book, |
| | | family_id, face_url, face_state, reject_reson, area_id, card_photo_front, card_photo_back, family_book,love_integral, |
| | | continuous_landing_days, is_tips, work_status, work_start_time, work_end_time, big_age_tips, plaintext_password |
| | | from sys_user |
| | | <where> |
| | |
| | | select |
| | | user_id, account, password, openid, session_key, unionid, phone, nick_name, name, community_id, sex, id_card, |
| | | birthday, image_url, type, job, is_volunteer, is_partymember, status, create_at, last_login_time, tags, |
| | | family_id, face_url, face_state, reject_reson, area_id, card_photo_front, card_photo_back, family_book, |
| | | family_id, face_url, face_state, reject_reson, area_id, card_photo_front, card_photo_back, family_book,love_integral, |
| | | continuous_landing_days, is_tips, work_status, work_start_time, work_end_time, big_age_tips, plaintext_password |
| | | from sys_user |
| | | <where> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="communityId" column="community_id" /> |
| | | <result property="activityId" column="activity_id" /> |
| | | <result property="userId" column="user_id" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | volunteer_id, |
| | | issue_status, |
| | | issue_points, |
| | | (select cmvm.name from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactName, |
| | | (select cmvm.phone from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactPhone, |
| | | (select cmvm.name from sys_user cmvm where cmvm.user_id=user_id) as contactName, |
| | | (select cmvm.phone from sys_user cmvm where cmvm.user_id=user_id) as contactPhone, |
| | | creation_time, |
| | | activity_id, |
| | | user_id, |
| | | update_time |
| | | from volunteer_activities_people_involved |
| | | where id= #{id} |
| | |
| | | volunteer_id, |
| | | issue_status, |
| | | issue_points, |
| | | (select cmvm.name from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactName, |
| | | (select cmvm.phone from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactPhone, |
| | | (select cmvm.name from sys_user cmvm where cmvm.user_id=user_id) as contactName, |
| | | (select cmvm.phone from sys_user cmvm where cmvm.user_id=user_id) as contactPhone, |
| | | creation_time, |
| | | activity_id, |
| | | user_id, |
| | | update_time |
| | | from volunteer_activities_people_involved |
| | | <where> |
| | |
| | | <if test="volunteerActivitiesPeopleVO.activityId != null"> |
| | | activity_id, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.userId != null"> |
| | | user_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.activityId != null"> |
| | | #{volunteerActivitiesPeopleVO.activityId}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.userId != null"> |
| | | #{volunteerActivitiesPeopleVO.userId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | |
| | | <if test="volunteerActivitiesPeopleVO.activityId != null"> |
| | | activity_id=#{volunteerActivitiesPeopleVO.activityId}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.userId != null"> |
| | | user_id=#{volunteerActivitiesPeopleVO.userId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{volunteerActivitiesPeopleVO.id} |
New file |
| | |
| | | <?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.panzhihua.service_community.dao.VolunteerIntegralRecordDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.VolunteerIntegralRecord" id="VolunteerIntegralRecordMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="iType" column="i_type" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="integral" column="integral" /> |
| | | <result property="volunteerId" column="volunteer_id" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="userId" column="user_id" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="getId" resultMap="VolunteerIntegralRecordMap"> |
| | | select |
| | | id, |
| | | i_type, |
| | | creation_time, |
| | | integral, |
| | | update_time, |
| | | user_id, |
| | | volunteer_id |
| | | from volunteer_integral_record |
| | | where id= #{id} |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="VolunteerIntegralRecordMap"> |
| | | select |
| | | id, |
| | | i_type, |
| | | creation_time, |
| | | update_time, |
| | | integral, |
| | | user_id, |
| | | volunteer_id |
| | | from volunteer_integral_record |
| | | <where> |
| | | <if test="userId!=null"> |
| | | user_id=#{userId} |
| | | </if> |
| | | </where> |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | <insert id="insertVolunteer"> |
| | | insert into volunteer_integral_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerIntegralRecordVO.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.id != null"> |
| | | i_type, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.id != null"> |
| | | integral, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.id != null"> |
| | | volunteer_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerIntegralRecordVO.id != null"> |
| | | #{volunteerIntegralRecordVO.id}, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.iType != null"> |
| | | #{volunteerIntegralRecordVO.iType}, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.integral != null"> |
| | | #{volunteerIntegralRecordVO.integral}, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.volunteerId != null"> |
| | | #{volunteerIntegralRecordVO.volunteerId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateId"> |
| | | update volunteer_integral_record |
| | | <set> |
| | | <if test="volunteerIntegralRecordVO.id != null"> |
| | | id=#{volunteerIntegralRecordVO.id}, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.iType != null"> |
| | | i_type=#{volunteerIntegralRecordVO.iType}, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.integral != null"> |
| | | integral=#{volunteerIntegralRecordVO.integral}, |
| | | </if> |
| | | <if test="volunteerIntegralRecordVO.volunteerId != null"> |
| | | volunteer_id=#{volunteerIntegralRecordVO.volunteerId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{volunteerIntegralRecordVO.id} |
| | | |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteId" parameterType="String"> |
| | | delete from volunteer_integral_record where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | </mapper> |