Commit d3a3af1f authored by libin's avatar libin

会员

parent 814a7951
package com.github.wxiaoqi.security.admin.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/7/11 10:39
*/
@Data
public class UserMemberSaveDTO {
@ApiModelProperty(value = "手机号")
private String phone;
@ApiModelProperty(value = "会员名")
private String username;
/**
* 会员等级
*/
@ApiModelProperty(value = "会员等级")
private Integer memberLevel;
/**
* 赠送总天数
*/
@ApiModelProperty(value = "赠送总天数")
private Integer totalNumber;
/**
* 剩余天数
*/
@ApiModelProperty(value = "剩余天数")
private Integer rentFreeDays;
}
package com.github.wxiaoqi.security.admin.rest.admin;
import com.github.wxiaoqi.security.admin.biz.BaseUserMemberExportBiz;
import com.github.wxiaoqi.security.admin.dto.UserMemberSaveDTO;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/7/11 9:58
*/
@RestController
@RequestMapping("/admin/member")
public class UserMemberAdminController {
@Autowired
private BaseUserMemberExportBiz baseUserMemberExportBiz;
@PostMapping("/save")
public ObjectRestResponse<Void> saveUserMember(@RequestBody UserMemberSaveDTO userMemberSaveDTO) {
baseUserMemberExportBiz.saveUserMember(userMemberSaveDTO);
return ObjectRestResponse.succ();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment