pull/1/head
parent
be3a11adc1
commit
531a3cf88d
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
package com.xmomen.module.pick.entity.mapper;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xmomen.framework.mybatis.dao.MybatisDao;
|
||||
import com.xmomen.framework.web.exceptions.ArgumentValidException;
|
||||
import com.xmomen.module.logger.Log;
|
||||
import com.xmomen.module.pick.model.CreateMember;
|
||||
import com.xmomen.module.pick.model.PickVo;
|
||||
import com.xmomen.module.pick.service.PickService;
|
||||
|
||||
@RestController
|
||||
@Validated // 添加 @Validated 注解,启用全局验证功能
|
||||
public class PickController {
|
||||
|
||||
@Autowired
|
||||
private PickService pickService;
|
||||
|
||||
@Autowired
|
||||
private MybatisDao mybatisDao;
|
||||
|
||||
@RequestMapping(value = "/pick/settleAccounts", method = RequestMethod.PUT)
|
||||
@Log(actionName = "采摘结算")
|
||||
public void settleAccounts(@RequestBody @Valid PickVo pickVo, BindingResult bindingResult) throws ArgumentValidException {
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new ArgumentValidException(bindingResult);
|
||||
}
|
||||
pickService.pick(pickVo);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/pick/pickCard", method = RequestMethod.PUT)
|
||||
@Log(actionName = "办新卡")
|
||||
public void pickCard(@RequestBody @Valid CreateMember createMember, BindingResult bindingResult) throws ArgumentValidException {
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new ArgumentValidException(bindingResult);
|
||||
}
|
||||
pickService.pickCard(createMember);
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
package com.xmomen.module.pick.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class CreateMember {
|
||||
private String newCouponNo;
|
||||
private String newPassword;
|
||||
private Integer memberType;
|
||||
private String name;
|
||||
private String phoneNumber;
|
||||
private String spareName;
|
||||
private String spareName2;
|
||||
private String spareTel;
|
||||
private String spareTel2;
|
||||
private String telNumber;
|
||||
private String officeTel;
|
||||
private String address;
|
||||
private String spareAddress;
|
||||
private String spareAddress2;
|
||||
private Integer cdCompanyId;
|
||||
private Integer cdUserId;
|
||||
private BigDecimal userPrice;
|
||||
|
||||
// Getters and Setters
|
||||
public String getNewCouponNo() {
|
||||
return newCouponNo;
|
||||
}
|
||||
|
||||
public void setNewCouponNo(String newCouponNo) {
|
||||
this.newCouponNo = newCouponNo;
|
||||
}
|
||||
|
||||
public String getNewPassword() {
|
||||
return newPassword;
|
||||
}
|
||||
|
||||
public void setNewPassword(String newPassword) {
|
||||
this.newPassword = newPassword;
|
||||
}
|
||||
|
||||
public Integer getMemberType() {
|
||||
return memberType;
|
||||
}
|
||||
|
||||
public void setMemberType(Integer memberType) {
|
||||
this.memberType = memberType;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public String getSpareName() {
|
||||
return spareName;
|
||||
}
|
||||
|
||||
public void setSpareName(String spareName) {
|
||||
this.spareName = spareName;
|
||||
}
|
||||
|
||||
public String getSpareName2() {
|
||||
return spareName2;
|
||||
}
|
||||
|
||||
public void setSpareName2(String spareName2) {
|
||||
this.spareName2 = spareName2;
|
||||
}
|
||||
|
||||
public String getSpareTel() {
|
||||
return spareTel;
|
||||
}
|
||||
|
||||
public void setSpareTel(String spareTel) {
|
||||
this.spareTel = spareTel;
|
||||
}
|
||||
|
||||
public String getSpareTel2() {
|
||||
return spareTel2;
|
||||
}
|
||||
|
||||
public void setSpareTel2(String spareTel2) {
|
||||
this.spareTel2 = spareTel2;
|
||||
}
|
||||
|
||||
public String getTelNumber() {
|
||||
return telNumber;
|
||||
}
|
||||
|
||||
public void setTelNumber(String telNumber) {
|
||||
this.telNumber = telNumber;
|
||||
}
|
||||
|
||||
public String getOfficeTel() {
|
||||
return officeTel;
|
||||
}
|
||||
|
||||
public void setOfficeTel(String officeTel) {
|
||||
this.officeTel = officeTel;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getSpareAddress() {
|
||||
return spareAddress;
|
||||
}
|
||||
|
||||
public void setSpareAddress(String spareAddress) {
|
||||
this.spareAddress = spareAddress;
|
||||
}
|
||||
|
||||
public String getSpareAddress2() {
|
||||
return spareAddress2;
|
||||
}
|
||||
|
||||
public void setSpareAddress2(String spareAddress2) {
|
||||
this.spareAddress2 = spareAddress2;
|
||||
}
|
||||
|
||||
public Integer getCdCompanyId() {
|
||||
return cdCompanyId;
|
||||
}
|
||||
|
||||
public void setCdCompanyId(Integer cdCompanyId) {
|
||||
this.cdCompanyId = cdCompanyId;
|
||||
}
|
||||
|
||||
public Integer getCdUserId() {
|
||||
return cdUserId;
|
||||
}
|
||||
|
||||
public void setCdUserId(Integer cdUserId) {
|
||||
this.cdUserId = cdUserId;
|
||||
}
|
||||
|
||||
public BigDecimal getUserPrice() {
|
||||
return userPrice;
|
||||
}
|
||||
|
||||
public void setUserPrice(BigDecimal userPrice) {
|
||||
this.userPrice = userPrice;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue