11 changed files with 218 additions and 17 deletions
@ -0,0 +1,107 @@ |
|||||
|
package com.elink.esua.epdc.dto.epdc.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 移动端完善用户信息 |
||||
|
* |
||||
|
* @author work@yujt.net.cn |
||||
|
* @date 2019/10/26 10:56 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EpdcCompleteVolunteerInfoFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 7848126935041704928L; |
||||
|
|
||||
|
/** |
||||
|
* 用户Id |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 真实姓名 |
||||
|
*/ |
||||
|
@NotBlank(message = "真实姓名不能为空") |
||||
|
private String realName; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
@NotBlank(message = "手机号不能为空") |
||||
|
private String mobile; |
||||
|
|
||||
|
@NotBlank(message = "党员标识不能为空") |
||||
|
private String partyFlag; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号码 |
||||
|
*/ |
||||
|
private String identityNo; |
||||
|
|
||||
|
/** |
||||
|
* 所在道路 |
||||
|
*/ |
||||
|
@NotBlank(message = "所在道路不能为空") |
||||
|
private String road; |
||||
|
|
||||
|
/** |
||||
|
* 小区名 |
||||
|
*/ |
||||
|
private String villageName; |
||||
|
|
||||
|
/** |
||||
|
* 住处(楼栋-单元-房间) |
||||
|
*/ |
||||
|
private String dwellingPlace; |
||||
|
|
||||
|
/** |
||||
|
* 居住网格id |
||||
|
*/ |
||||
|
private Long gridId; |
||||
|
|
||||
|
/** |
||||
|
* 微信code |
||||
|
*/ |
||||
|
private String wxCode; |
||||
|
|
||||
|
/** |
||||
|
* 用户信息 |
||||
|
*/ |
||||
|
private String encryptedData; |
||||
|
|
||||
|
/** |
||||
|
* 加密算法的初始向量 |
||||
|
*/ |
||||
|
private String iv; |
||||
|
|
||||
|
/** |
||||
|
* 自我介绍 |
||||
|
*/ |
||||
|
private String introduce; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/*----------------------用户认证所需字段-----------------------------*/ |
||||
|
|
||||
|
/** |
||||
|
* 短信验证码 |
||||
|
*/ |
||||
|
@NotBlank(message = "短信验证码不能为空") |
||||
|
private String smsCode; |
||||
|
/** |
||||
|
* 0女,1男 |
||||
|
*/ |
||||
|
@NotBlank(message = "性别不能为空") |
||||
|
private String sex; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
package com.elink.esua.epdc.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.constant.Constant; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO; |
||||
|
import com.elink.esua.epdc.service.VolunteerInfoService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* 对移动端开放 |
||||
|
* |
||||
|
* @author wanggongfeng |
||||
|
* @date 2019/9/6 20:31 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping(Constant.EPDC_APP + "volunteerinfo") |
||||
|
public class EpdcAppVolunteerInfoController { |
||||
|
@Autowired |
||||
|
private VolunteerInfoService volunteerInfoService; |
||||
|
|
||||
|
/** |
||||
|
* 根据用户id 进行志愿者认证 |
||||
|
* @param userId |
||||
|
* @author wanggongfeng |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("getVolunteerCountById/{userId}") |
||||
|
public Result<Integer> getVolunteerCountById(@PathVariable("userId") String userId) { |
||||
|
return volunteerInfoService.getVolunteerCountById(userId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 插入一条志愿者数据 |
||||
|
* @param epdcCompleteVolunteerInfoFormDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("insertVolunteerInfo") |
||||
|
public Result<Integer> insertVolunteerInfo(EpdcCompleteVolunteerInfoFormDTO epdcCompleteVolunteerInfoFormDTO) { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(epdcCompleteVolunteerInfoFormDTO, UpdateGroup.class, DefaultGroup.class); |
||||
|
Result<Integer> result = volunteerInfoService.insertVolunteerInfo(epdcCompleteVolunteerInfoFormDTO); |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue