注释 #5

Merged
pzobk9anl merged 1 commits from fl into qwer 2 months ago

@ -17,11 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid; import javax.validation.Valid;
/**
* PickController
* 使 Spring @RestController RESTful
* HTTP JSON
*/
@RestController @RestController
public class PickController { public class PickController {
@ -33,16 +29,7 @@ public class PickController {
@Autowired @Autowired
MybatisDao mybatisDao; MybatisDao mybatisDao;
/**
* PUT "/pick/settleAccounts"
*
*
* @param pickVo @RequestBody
* 使 @Valid
* @param bindingResult
* @return PickService
* @throws ArgumentValidException bindingResult
*/
@RequestMapping(value = "/pick/settleAccounts", method = RequestMethod.PUT) @RequestMapping(value = "/pick/settleAccounts", method = RequestMethod.PUT)
// 使用自定义日志注解记录操作名称 // 使用自定义日志注解记录操作名称
@Log(actionName = "采摘结算") @Log(actionName = "采摘结算")
@ -56,16 +43,7 @@ public class PickController {
pickService.pick(pickVo); pickService.pick(pickVo);
} }
/**
* PUT "/pick/pickCard"
*
*
* @param createMember @RequestBody
* 使 @Valid
* @param bindingResult
* @return PickService
* @throws ArgumentValidException bindingResult
*/
@RequestMapping(value = "/pick/pickCard", method = RequestMethod.PUT) @RequestMapping(value = "/pick/pickCard", method = RequestMethod.PUT)
// 使用自定义日志注解记录操作名称 // 使用自定义日志注解记录操作名称
@Log(actionName = "办新卡") @Log(actionName = "办新卡")

@ -4,10 +4,7 @@ import com.xmomen.framework.mybatis.model.BaseMybatisExample;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
* TbExchangeCardLogExample TbExchangeCardLog
* BaseMybatisExample SQL WHERE
*/
public class TbExchangeCardLogExample extends BaseMybatisExample { public class TbExchangeCardLogExample extends BaseMybatisExample {
// 用于指定查询结果的排序规则,例如 "ID ASC" // 用于指定查询结果的排序规则,例如 "ID ASC"
protected String orderByClause; protected String orderByClause;
@ -16,75 +13,49 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
// 存储多个查询条件集合,每个 Criteria 代表一组 AND 条件,多个 Criteria 之间是 OR 关系 // 存储多个查询条件集合,每个 Criteria 代表一组 AND 条件,多个 Criteria 之间是 OR 关系
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
/**
* oredCriteria
*/
public TbExchangeCardLogExample() { public TbExchangeCardLogExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<Criteria>();
} }
/**
*
* @param orderByClause "ID ASC"
*/
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause; this.orderByClause = orderByClause;
} }
/**
*
* @return
*/
public String getOrderByClause() { public String getOrderByClause() {
return orderByClause; return orderByClause;
} }
/**
*
* @param distinct
*/
public void setDistinct(boolean distinct) { public void setDistinct(boolean distinct) {
this.distinct = distinct; this.distinct = distinct;
} }
/**
*
* @return
*/
public boolean isDistinct() { public boolean isDistinct() {
return distinct; return distinct;
} }
/**
*
* @return
*/
public List<Criteria> getOredCriteria() { public List<Criteria> getOredCriteria() {
return oredCriteria; return oredCriteria;
} }
/**
* OR
* @param criteria
*/
public void or(Criteria criteria) { public void or(Criteria criteria) {
oredCriteria.add(criteria); oredCriteria.add(criteria);
} }
/**
* OR
* @return
*/
public Criteria or() { public Criteria or() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria); oredCriteria.add(criteria);
return criteria; return criteria;
} }
/**
* oredCriteria
* @return
*/
public Criteria createCriteria() { public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) { if (oredCriteria.size() == 0) {
@ -93,67 +64,46 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
return criteria; return criteria;
} }
/**
*
* @return
*/
protected Criteria createCriteriaInternal() { protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(); Criteria criteria = new Criteria();
return criteria; return criteria;
} }
/**
*
*/
public void clear() { public void clear() {
oredCriteria.clear(); oredCriteria.clear();
orderByClause = null; orderByClause = null;
distinct = false; distinct = false;
} }
/**
* GeneratedCriteria
*/
protected abstract static class GeneratedCriteria { protected abstract static class GeneratedCriteria {
// 存储具体的查询条件 // 存储具体的查询条件
protected List<Criterion> criteria; protected List<Criterion> criteria;
/**
* criteria
*/
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<Criterion>();
} }
/**
*
* @return true false
*/
public boolean isValid() { public boolean isValid() {
return criteria.size() > 0; return criteria.size() > 0;
} }
/**
*
* @return
*/
public List<Criterion> getAllCriteria() { public List<Criterion> getAllCriteria() {
return criteria; return criteria;
} }
/**
*
* @return
*/
public List<Criterion> getCriteria() { public List<Criterion> getCriteria() {
return criteria; return criteria;
} }
/**
* "ID is null"
* @param condition
*/
protected void addCriterion(String condition) { protected void addCriterion(String condition) {
if (condition == null) { if (condition == null) {
throw new RuntimeException("Value for condition cannot be null"); throw new RuntimeException("Value for condition cannot be null");
@ -161,12 +111,7 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
criteria.add(new Criterion(condition)); criteria.add(new Criterion(condition));
} }
/**
* "ID = 1"
* @param condition
* @param value
* @param property
*/
protected void addCriterion(String condition, Object value, String property) { protected void addCriterion(String condition, Object value, String property) {
if (value == null) { if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null"); throw new RuntimeException("Value for " + property + " cannot be null");
@ -174,13 +119,7 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
criteria.add(new Criterion(condition, value)); criteria.add(new Criterion(condition, value));
} }
/**
* "ID between 1 and 10"
* @param condition
* @param value1
* @param value2
* @param property
*/
protected void addCriterion(String condition, Object value1, Object value2, String property) { protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) { if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null"); throw new RuntimeException("Between values for " + property + " cannot be null");
@ -190,29 +129,19 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
// 以下是针对各个字段的查询条件生成方法,例如判断字段是否为空、等于某个值、大于某个值等 // 以下是针对各个字段的查询条件生成方法,例如判断字段是否为空、等于某个值、大于某个值等
/**
* ID
* @return
*/
public Criteria andIdIsNull() { public Criteria andIdIsNull() {
addCriterion("ID is null"); addCriterion("ID is null");
return (Criteria) this; return (Criteria) this;
} }
/**
* ID
* @return
*/
public Criteria andIdIsNotNull() { public Criteria andIdIsNotNull() {
addCriterion("ID is not null"); addCriterion("ID is not null");
return (Criteria) this; return (Criteria) this;
} }
/**
* ID
* @param value
* @return
*/
public Criteria andIdEqualTo(Integer value) { public Criteria andIdEqualTo(Integer value) {
addCriterion("ID =", value, "id"); addCriterion("ID =", value, "id");
return (Criteria) this; return (Criteria) this;
@ -220,10 +149,7 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
// 其他针对 ID 字段的条件生成方法,如不等于、大于、小于等 // 其他针对 ID 字段的条件生成方法,如不等于、大于、小于等
/**
* OLD_COUPON_ID
* @return
*/
public Criteria andOldCouponIdIsNull() { public Criteria andOldCouponIdIsNull() {
addCriterion("OLD_COUPON_ID is null"); addCriterion("OLD_COUPON_ID is null");
return (Criteria) this; return (Criteria) this;
@ -235,22 +161,16 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
} }
/**
* Criteria GeneratedCriteria
*/
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
/**
*
*/
protected Criteria() { protected Criteria() {
super(); super();
} }
} }
/**
* Criterion
*/
public static class Criterion { public static class Criterion {
// 查询条件的字符串表示,例如 "ID = " // 查询条件的字符串表示,例如 "ID = "
private String condition; private String condition;
@ -269,74 +189,47 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
// 类型处理器,用于处理特殊类型的值 // 类型处理器,用于处理特殊类型的值
private String typeHandler; private String typeHandler;
/**
*
* @return
*/
public String getCondition() { public String getCondition() {
return condition; return condition;
} }
/**
*
* @return
*/
public Object getValue() { public Object getValue() {
return value; return value;
} }
/**
*
* @return
*/
public Object getSecondValue() { public Object getSecondValue() {
return secondValue; return secondValue;
} }
/**
*
* @return true false
*/
public boolean isNoValue() { public boolean isNoValue() {
return noValue; return noValue;
} }
/**
*
* @return true false
*/
public boolean isSingleValue() { public boolean isSingleValue() {
return singleValue; return singleValue;
} }
/**
*
* @return true false
*/
public boolean isBetweenValue() { public boolean isBetweenValue() {
return betweenValue; return betweenValue;
} }
/**
*
* @return true false
*/
public boolean isListValue() { public boolean isListValue() {
return listValue; return listValue;
} }
/**
*
* @return
*/
public String getTypeHandler() { public String getTypeHandler() {
return typeHandler; return typeHandler;
} }
/**
*
* @param condition
*/
protected Criterion(String condition) { protected Criterion(String condition) {
super(); super();
this.condition = condition; this.condition = condition;
@ -344,12 +237,7 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
this.noValue = true; this.noValue = true;
} }
/**
*
* @param condition
* @param value
* @param typeHandler
*/
protected Criterion(String condition, Object value, String typeHandler) { protected Criterion(String condition, Object value, String typeHandler) {
super(); super();
this.condition = condition; this.condition = condition;
@ -362,22 +250,12 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
} }
} }
/**
*
* @param condition
* @param value
*/
protected Criterion(String condition, Object value) { protected Criterion(String condition, Object value) {
this(condition, value, null); this(condition, value, null);
} }
/**
*
* @param condition
* @param value
* @param secondValue
* @param typeHandler
*/
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super(); super();
this.condition = condition; this.condition = condition;
@ -387,12 +265,7 @@ public class TbExchangeCardLogExample extends BaseMybatisExample {
this.betweenValue = true; this.betweenValue = true;
} }
/**
*
* @param condition
* @param value
* @param secondValue
*/
protected Criterion(String condition, Object value, Object secondValue) { protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null); this(condition, value, secondValue, null);
} }

@ -10,71 +10,51 @@ import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Version; import javax.persistence.Version;
/**
* TbPick tb_pick
* BaseMybatisModel
* 使 JPA 便
*/
@Entity @Entity
@Table(name = "tb_pick") @Table(name = "tb_pick")
public class TbPick extends BaseMybatisModel { public class TbPick extends BaseMybatisModel {
/**
* // 主键
*/
private Integer id; private Integer id;
/**
* // 优惠券编号
*/
private String couponNo; private String couponNo;
/**
* 使 BigDecimal // 拣货重量
*/
private BigDecimal pickWeight; private BigDecimal pickWeight;
/**
* // 拣货支付类型
* 1 -
* 2 - +
* 3 -
*/
private Integer pickPayType; private Integer pickPayType;
/**
* 使 BigDecimal // 拣货总价
*/
private BigDecimal pickTotalPrice; private BigDecimal pickTotalPrice;
/**
* 使使 BigDecimal // 拣货卡费
*/
private BigDecimal pickCradPrice; private BigDecimal pickCradPrice;
/**
* 使使 BigDecimal // 拣货箱费
*/
private BigDecimal pickCasePrice; private BigDecimal pickCasePrice;
/**
* // 拣货日期
*/
private Date pickDate; private Date pickDate;
/**
* // 拣货地点
*/
private Integer pickPlace; private Integer pickPlace;
/**
* // 拣货地点用户
*/
private Integer pickPlaceUser; private Integer pickPlaceUser;
/**
*
* @return
*/
@Column(name = "ID") @Column(name = "ID")
@Id @Id
@GeneratedValue(generator = "UUIDGenerator") @GeneratedValue(generator = "UUIDGenerator")
@ -82,12 +62,7 @@ public class TbPick extends BaseMybatisModel {
return id; return id;
} }
/**
*
* null
*
* @param id
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
if(id == null){ if(id == null){
@ -99,21 +74,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("id"); addValidField("id");
} }
/**
*
* @return
*/
@Column(name = "COUPON_NO") @Column(name = "COUPON_NO")
public String getCouponNo() { public String getCouponNo() {
return couponNo; return couponNo;
} }
/**
*
* null
*
* @param couponNo
*/
public void setCouponNo(String couponNo) { public void setCouponNo(String couponNo) {
this.couponNo = couponNo; this.couponNo = couponNo;
if(couponNo == null){ if(couponNo == null){
@ -125,21 +92,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("couponNo"); addValidField("couponNo");
} }
/**
*
* @return BigDecimal
*/
@Column(name = "PICK_WEIGHT") @Column(name = "PICK_WEIGHT")
public BigDecimal getPickWeight() { public BigDecimal getPickWeight() {
return pickWeight; return pickWeight;
} }
/**
*
* null
*
* @param pickWeight
*/
public void setPickWeight(BigDecimal pickWeight) { public void setPickWeight(BigDecimal pickWeight) {
this.pickWeight = pickWeight; this.pickWeight = pickWeight;
if(pickWeight == null){ if(pickWeight == null){
@ -151,21 +110,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("pickWeight"); addValidField("pickWeight");
} }
/**
*
* @return
*/
@Column(name = "PICK_PAY_TYPE") @Column(name = "PICK_PAY_TYPE")
public Integer getPickPayType() { public Integer getPickPayType() {
return pickPayType; return pickPayType;
} }
/**
*
* null
*
* @param pickPayType
*/
public void setPickPayType(Integer pickPayType) { public void setPickPayType(Integer pickPayType) {
this.pickPayType = pickPayType; this.pickPayType = pickPayType;
if(pickPayType == null){ if(pickPayType == null){
@ -177,21 +128,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("pickPayType"); addValidField("pickPayType");
} }
/**
*
* @return BigDecimal
*/
@Column(name = "PICK_TOTAL_PRICE") @Column(name = "PICK_TOTAL_PRICE")
public BigDecimal getPickTotalPrice() { public BigDecimal getPickTotalPrice() {
return pickTotalPrice; return pickTotalPrice;
} }
/**
*
* null
*
* @param pickTotalPrice
*/
public void setPickTotalPrice(BigDecimal pickTotalPrice) { public void setPickTotalPrice(BigDecimal pickTotalPrice) {
this.pickTotalPrice = pickTotalPrice; this.pickTotalPrice = pickTotalPrice;
if(pickTotalPrice == null){ if(pickTotalPrice == null){
@ -203,21 +146,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("pickTotalPrice"); addValidField("pickTotalPrice");
} }
/**
*
* @return BigDecimal
*/
@Column(name = "PICK_CRAD_PRICE") @Column(name = "PICK_CRAD_PRICE")
public BigDecimal getPickCradPrice() { public BigDecimal getPickCradPrice() {
return pickCradPrice; return pickCradPrice;
} }
/**
*
* null
*
* @param pickCradPrice
*/
public void setPickCradPrice(BigDecimal pickCradPrice) { public void setPickCradPrice(BigDecimal pickCradPrice) {
this.pickCradPrice = pickCradPrice; this.pickCradPrice = pickCradPrice;
if(pickCradPrice == null){ if(pickCradPrice == null){
@ -229,21 +164,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("pickCradPrice"); addValidField("pickCradPrice");
} }
/**
*
* @return BigDecimal
*/
@Column(name = "PICK_CASE_PRICE") @Column(name = "PICK_CASE_PRICE")
public BigDecimal getPickCasePrice() { public BigDecimal getPickCasePrice() {
return pickCasePrice; return pickCasePrice;
} }
/**
*
* null
*
* @param pickCasePrice
*/
public void setPickCasePrice(BigDecimal pickCasePrice) { public void setPickCasePrice(BigDecimal pickCasePrice) {
this.pickCasePrice = pickCasePrice; this.pickCasePrice = pickCasePrice;
if(pickCasePrice == null){ if(pickCasePrice == null){
@ -255,21 +182,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("pickCasePrice"); addValidField("pickCasePrice");
} }
/**
*
* @return Date
*/
@Column(name = "PICK_DATE") @Column(name = "PICK_DATE")
public Date getPickDate() { public Date getPickDate() {
return pickDate; return pickDate;
} }
/**
*
* null
*
* @param pickDate
*/
public void setPickDate(Date pickDate) { public void setPickDate(Date pickDate) {
this.pickDate = pickDate; this.pickDate = pickDate;
if(pickDate == null){ if(pickDate == null){
@ -281,21 +200,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("pickDate"); addValidField("pickDate");
} }
/**
*
* @return
*/
@Column(name = "PICK_PLACE") @Column(name = "PICK_PLACE")
public Integer getPickPlace() { public Integer getPickPlace() {
return pickPlace; return pickPlace;
} }
/**
*
* null
*
* @param pickPlace
*/
public void setPickPlace(Integer pickPlace) { public void setPickPlace(Integer pickPlace) {
this.pickPlace = pickPlace; this.pickPlace = pickPlace;
if(pickPlace == null){ if(pickPlace == null){
@ -307,21 +218,13 @@ public class TbPick extends BaseMybatisModel {
addValidField("pickPlace"); addValidField("pickPlace");
} }
/**
*
* @return
*/
@Column(name = "PICK_PLACE_USER") @Column(name = "PICK_PLACE_USER")
public Integer getPickPlaceUser() { public Integer getPickPlaceUser() {
return pickPlaceUser; return pickPlaceUser;
} }
/**
*
* null
*
* @param pickPlaceUser
*/
public void setPickPlaceUser(Integer pickPlaceUser) { public void setPickPlaceUser(Integer pickPlaceUser) {
this.pickPlaceUser = pickPlaceUser; this.pickPlaceUser = pickPlaceUser;
if(pickPlaceUser == null){ if(pickPlaceUser == null){

@ -19,75 +19,49 @@ public class TbPickExample extends BaseMybatisExample {
// 存储多个查询条件集合,每个 Criteria 代表一组 AND 条件,多个 Criteria 之间是 OR 关系 // 存储多个查询条件集合,每个 Criteria 代表一组 AND 条件,多个 Criteria 之间是 OR 关系
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
/**
* oredCriteria
*/
public TbPickExample() { public TbPickExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<Criteria>();
} }
/**
*
* @param orderByClause "ID ASC"
*/
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause; this.orderByClause = orderByClause;
} }
/**
*
* @return
*/
public String getOrderByClause() { public String getOrderByClause() {
return orderByClause; return orderByClause;
} }
/**
*
* @param distinct
*/
public void setDistinct(boolean distinct) { public void setDistinct(boolean distinct) {
this.distinct = distinct; this.distinct = distinct;
} }
/**
*
* @return
*/
public boolean isDistinct() { public boolean isDistinct() {
return distinct; return distinct;
} }
/**
*
* @return
*/
public List<Criteria> getOredCriteria() { public List<Criteria> getOredCriteria() {
return oredCriteria; return oredCriteria;
} }
/**
* OR
* @param criteria
*/
public void or(Criteria criteria) { public void or(Criteria criteria) {
oredCriteria.add(criteria); oredCriteria.add(criteria);
} }
/**
* OR
* @return
*/
public Criteria or() { public Criteria or() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria); oredCriteria.add(criteria);
return criteria; return criteria;
} }
/**
* oredCriteria
* @return
*/
public Criteria createCriteria() { public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) { if (oredCriteria.size() == 0) {
@ -96,67 +70,46 @@ public class TbPickExample extends BaseMybatisExample {
return criteria; return criteria;
} }
/**
*
* @return
*/
protected Criteria createCriteriaInternal() { protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(); Criteria criteria = new Criteria();
return criteria; return criteria;
} }
/**
*
*/
public void clear() { public void clear() {
oredCriteria.clear(); oredCriteria.clear();
orderByClause = null; orderByClause = null;
distinct = false; distinct = false;
} }
/**
* GeneratedCriteria
*/
protected abstract static class GeneratedCriteria { protected abstract static class GeneratedCriteria {
// 存储具体的查询条件 // 存储具体的查询条件
protected List<Criterion> criteria; protected List<Criterion> criteria;
/**
* criteria
*/
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<Criterion>();
} }
/**
*
* @return true false
*/
public boolean isValid() { public boolean isValid() {
return criteria.size() > 0; return criteria.size() > 0;
} }
/**
*
* @return
*/
public List<Criterion> getAllCriteria() { public List<Criterion> getAllCriteria() {
return criteria; return criteria;
} }
/**
*
* @return
*/
public List<Criterion> getCriteria() { public List<Criterion> getCriteria() {
return criteria; return criteria;
} }
/**
* "ID is null"
* @param condition
*/
protected void addCriterion(String condition) { protected void addCriterion(String condition) {
if (condition == null) { if (condition == null) {
throw new RuntimeException("Value for condition cannot be null"); throw new RuntimeException("Value for condition cannot be null");
@ -164,12 +117,7 @@ public class TbPickExample extends BaseMybatisExample {
criteria.add(new Criterion(condition)); criteria.add(new Criterion(condition));
} }
/**
* "ID = 1"
* @param condition
* @param value
* @param property
*/
protected void addCriterion(String condition, Object value, String property) { protected void addCriterion(String condition, Object value, String property) {
if (value == null) { if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null"); throw new RuntimeException("Value for " + property + " cannot be null");
@ -177,13 +125,7 @@ public class TbPickExample extends BaseMybatisExample {
criteria.add(new Criterion(condition, value)); criteria.add(new Criterion(condition, value));
} }
/**
* "ID between 1 and 10"
* @param condition
* @param value1
* @param value2
* @param property
*/
protected void addCriterion(String condition, Object value1, Object value2, String property) { protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) { if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null"); throw new RuntimeException("Between values for " + property + " cannot be null");
@ -193,29 +135,19 @@ public class TbPickExample extends BaseMybatisExample {
// 以下是针对 TbPick 表各个字段的查询条件生成方法 // 以下是针对 TbPick 表各个字段的查询条件生成方法
/**
* ID
* @return
*/
public Criteria andIdIsNull() { public Criteria andIdIsNull() {
addCriterion("ID is null"); addCriterion("ID is null");
return (Criteria) this; return (Criteria) this;
} }
/**
* ID
* @return
*/
public Criteria andIdIsNotNull() { public Criteria andIdIsNotNull() {
addCriterion("ID is not null"); addCriterion("ID is not null");
return (Criteria) this; return (Criteria) this;
} }
/**
* ID
* @param value
* @return
*/
public Criteria andIdEqualTo(Integer value) { public Criteria andIdEqualTo(Integer value) {
addCriterion("ID =", value, "id"); addCriterion("ID =", value, "id");
return (Criteria) this; return (Criteria) this;
@ -223,10 +155,7 @@ public class TbPickExample extends BaseMybatisExample {
// 其他针对 ID 字段的条件生成方法,如不等于、大于、小于等 // 其他针对 ID 字段的条件生成方法,如不等于、大于、小于等
/**
* COUPON_NO
* @return
*/
public Criteria andCouponNoIsNull() { public Criteria andCouponNoIsNull() {
addCriterion("COUPON_NO is null"); addCriterion("COUPON_NO is null");
return (Criteria) this; return (Criteria) this;
@ -238,22 +167,16 @@ public class TbPickExample extends BaseMybatisExample {
} }
/**
* Criteria GeneratedCriteria
*/
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
/**
*
*/
protected Criteria() { protected Criteria() {
super(); super();
} }
} }
/**
* Criterion
*/
public static class Criterion { public static class Criterion {
// 查询条件的字符串表示,例如 "ID = " // 查询条件的字符串表示,例如 "ID = "
private String condition; private String condition;
@ -272,74 +195,47 @@ public class TbPickExample extends BaseMybatisExample {
// 类型处理器,用于处理特殊类型的值 // 类型处理器,用于处理特殊类型的值
private String typeHandler; private String typeHandler;
/**
*
* @return
*/
public String getCondition() { public String getCondition() {
return condition; return condition;
} }
/**
*
* @return
*/
public Object getValue() { public Object getValue() {
return value; return value;
} }
/**
*
* @return
*/
public Object getSecondValue() { public Object getSecondValue() {
return secondValue; return secondValue;
} }
/**
*
* @return true false
*/
public boolean isNoValue() { public boolean isNoValue() {
return noValue; return noValue;
} }
/**
*
* @return true false
*/
public boolean isSingleValue() { public boolean isSingleValue() {
return singleValue; return singleValue;
} }
/**
*
* @return true false
*/
public boolean isBetweenValue() { public boolean isBetweenValue() {
return betweenValue; return betweenValue;
} }
/**
*
* @return true false
*/
public boolean isListValue() { public boolean isListValue() {
return listValue; return listValue;
} }
/**
*
* @return
*/
public String getTypeHandler() { public String getTypeHandler() {
return typeHandler; return typeHandler;
} }
/**
*
* @param condition
*/
protected Criterion(String condition) { protected Criterion(String condition) {
super(); super();
this.condition = condition; this.condition = condition;
@ -347,12 +243,7 @@ public class TbPickExample extends BaseMybatisExample {
this.noValue = true; this.noValue = true;
} }
/**
*
* @param condition
* @param value
* @param typeHandler
*/
protected Criterion(String condition, Object value, String typeHandler) { protected Criterion(String condition, Object value, String typeHandler) {
super(); super();
this.condition = condition; this.condition = condition;
@ -365,22 +256,12 @@ public class TbPickExample extends BaseMybatisExample {
} }
} }
/**
*
* @param condition
* @param value
*/
public Criterion(String condition, Object value) { public Criterion(String condition, Object value) {
this(condition, value, null); this(condition, value, null);
} }
/**
*
* @param condition
* @param value
* @param secondValue
* @param typeHandler
*/
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super(); super();
this.condition = condition; this.condition = condition;
@ -390,12 +271,7 @@ public class TbPickExample extends BaseMybatisExample {
this.betweenValue = true; this.betweenValue = true;
} }
/**
*
* @param condition
* @param value
* @param secondValue
*/
protected Criterion(String condition, Object value, Object secondValue) { protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null); this(condition, value, secondValue, null);
} }

@ -17,41 +17,25 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "tb_recharge_log") @Table(name = "tb_recharge_log")
public class TbRechargeLog extends BaseMybatisModel { public class TbRechargeLog extends BaseMybatisModel {
/**
*
*/
private Integer id; private Integer id;
/**
* 使
*/
private String couponNo; private String couponNo;
/**
* 使 BigDecimal
*/
private BigDecimal rechargePrice; private BigDecimal rechargePrice;
/**
*
*/
private Date rechargeDate; private Date rechargeDate;
/**
*
*/
private Integer rechargeUser; private Integer rechargeUser;
/**
*
*/
private Integer rechargePlace; private Integer rechargePlace;
/**
* ID
*
* @return ID
*/
@Column(name = "ID") @Column(name = "ID")
@Id @Id
@GeneratedValue(generator = "UUIDGenerator") @GeneratedValue(generator = "UUIDGenerator")
@ -59,13 +43,7 @@ public class TbRechargeLog extends BaseMybatisModel {
return id; return id;
} }
/**
* ID
* ID null
*
*
* @param id ID
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
if (id == null) { if (id == null) {
@ -77,23 +55,13 @@ public class TbRechargeLog extends BaseMybatisModel {
addValidField("id"); addValidField("id");
} }
/**
* 使
*
* @return 使
*/
@Column(name = "COUPON_NO") @Column(name = "COUPON_NO")
public String getCouponNo() { public String getCouponNo() {
return couponNo; return couponNo;
} }
/**
* 使
* null
*
*
* @param couponNo 使
*/
public void setCouponNo(String couponNo) { public void setCouponNo(String couponNo) {
this.couponNo = couponNo; this.couponNo = couponNo;
if (couponNo == null) { if (couponNo == null) {
@ -105,23 +73,13 @@ public class TbRechargeLog extends BaseMybatisModel {
addValidField("couponNo"); addValidField("couponNo");
} }
/**
*
*
* @return
*/
@Column(name = "RECHARGE_PRICE") @Column(name = "RECHARGE_PRICE")
public BigDecimal getRechargePrice() { public BigDecimal getRechargePrice() {
return rechargePrice; return rechargePrice;
} }
/**
*
* null
*
*
* @param rechargePrice
*/
public void setRechargePrice(BigDecimal rechargePrice) { public void setRechargePrice(BigDecimal rechargePrice) {
this.rechargePrice = rechargePrice; this.rechargePrice = rechargePrice;
if (rechargePrice == null) { if (rechargePrice == null) {
@ -133,23 +91,13 @@ public class TbRechargeLog extends BaseMybatisModel {
addValidField("rechargePrice"); addValidField("rechargePrice");
} }
/**
*
*
* @return
*/
@Column(name = "RECHARGE_DATE") @Column(name = "RECHARGE_DATE")
public Date getRechargeDate() { public Date getRechargeDate() {
return rechargeDate; return rechargeDate;
} }
/**
*
* null
*
*
* @param rechargeDate
*/
public void setRechargeDate(Date rechargeDate) { public void setRechargeDate(Date rechargeDate) {
this.rechargeDate = rechargeDate; this.rechargeDate = rechargeDate;
if (rechargeDate == null) { if (rechargeDate == null) {
@ -161,23 +109,13 @@ public class TbRechargeLog extends BaseMybatisModel {
addValidField("rechargeDate"); addValidField("rechargeDate");
} }
/**
*
*
* @return
*/
@Column(name = "RECHARGE_USER") @Column(name = "RECHARGE_USER")
public Integer getRechargeUser() { public Integer getRechargeUser() {
return rechargeUser; return rechargeUser;
} }
/**
*
* null
*
*
* @param rechargeUser
*/
public void setRechargeUser(Integer rechargeUser) { public void setRechargeUser(Integer rechargeUser) {
this.rechargeUser = rechargeUser; this.rechargeUser = rechargeUser;
if (rechargeUser == null) { if (rechargeUser == null) {
@ -189,23 +127,13 @@ public class TbRechargeLog extends BaseMybatisModel {
addValidField("rechargeUser"); addValidField("rechargeUser");
} }
/**
*
*
* @return
*/
@Column(name = "RECHARGE_PLACE") @Column(name = "RECHARGE_PLACE")
public Integer getRechargePlace() { public Integer getRechargePlace() {
return rechargePlace; return rechargePlace;
} }
/**
*
* null
*
*
* @param rechargePlace
*/
public void setRechargePlace(Integer rechargePlace) { public void setRechargePlace(Integer rechargePlace) {
this.rechargePlace = rechargePlace; this.rechargePlace = rechargePlace;
if (rechargePlace == null) { if (rechargePlace == null) {

@ -19,75 +19,49 @@ public class TbRechargeLogExample extends BaseMybatisExample {
// 存储多个查询条件集合,每个 Criteria 代表一组 AND 条件,多个 Criteria 之间是 OR 关系 // 存储多个查询条件集合,每个 Criteria 代表一组 AND 条件,多个 Criteria 之间是 OR 关系
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
/**
* oredCriteria
*/
public TbRechargeLogExample() { public TbRechargeLogExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<Criteria>();
} }
/**
*
* @param orderByClause "ID ASC"
*/
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause; this.orderByClause = orderByClause;
} }
/**
*
* @return
*/
public String getOrderByClause() { public String getOrderByClause() {
return orderByClause; return orderByClause;
} }
/**
*
* @param distinct
*/
public void setDistinct(boolean distinct) { public void setDistinct(boolean distinct) {
this.distinct = distinct; this.distinct = distinct;
} }
/**
*
* @return
*/
public boolean isDistinct() { public boolean isDistinct() {
return distinct; return distinct;
} }
/**
*
* @return
*/
public List<Criteria> getOredCriteria() { public List<Criteria> getOredCriteria() {
return oredCriteria; return oredCriteria;
} }
/**
* OR
* @param criteria
*/
public void or(Criteria criteria) { public void or(Criteria criteria) {
oredCriteria.add(criteria); oredCriteria.add(criteria);
} }
/**
* OR
* @return
*/
public Criteria or() { public Criteria or() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria); oredCriteria.add(criteria);
return criteria; return criteria;
} }
/**
* oredCriteria
* @return
*/
public Criteria createCriteria() { public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) { if (oredCriteria.size() == 0) {
@ -96,67 +70,46 @@ public class TbRechargeLogExample extends BaseMybatisExample {
return criteria; return criteria;
} }
/**
*
* @return
*/
protected Criteria createCriteriaInternal() { protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(); Criteria criteria = new Criteria();
return criteria; return criteria;
} }
/**
*
*/
public void clear() { public void clear() {
oredCriteria.clear(); oredCriteria.clear();
orderByClause = null; orderByClause = null;
distinct = false; distinct = false;
} }
/**
* GeneratedCriteria
*/
protected abstract static class GeneratedCriteria { protected abstract static class GeneratedCriteria {
// 存储具体的查询条件 // 存储具体的查询条件
protected List<Criterion> criteria; protected List<Criterion> criteria;
/**
* criteria
*/
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<Criterion>();
} }
/**
*
* @return true false
*/
public boolean isValid() { public boolean isValid() {
return criteria.size() > 0; return criteria.size() > 0;
} }
/**
*
* @return
*/
public List<Criterion> getAllCriteria() { public List<Criterion> getAllCriteria() {
return criteria; return criteria;
} }
/**
*
* @return
*/
public List<Criterion> getCriteria() { public List<Criterion> getCriteria() {
return criteria; return criteria;
} }
/**
* "ID is null"
* @param condition
*/
protected void addCriterion(String condition) { protected void addCriterion(String condition) {
if (condition == null) { if (condition == null) {
throw new RuntimeException("Value for condition cannot be null"); throw new RuntimeException("Value for condition cannot be null");
@ -164,12 +117,7 @@ public class TbRechargeLogExample extends BaseMybatisExample {
criteria.add(new Criterion(condition)); criteria.add(new Criterion(condition));
} }
/**
* "ID = 1"
* @param condition
* @param value
* @param property
*/
protected void addCriterion(String condition, Object value, String property) { protected void addCriterion(String condition, Object value, String property) {
if (value == null) { if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null"); throw new RuntimeException("Value for " + property + " cannot be null");
@ -177,13 +125,7 @@ public class TbRechargeLogExample extends BaseMybatisExample {
criteria.add(new Criterion(condition, value)); criteria.add(new Criterion(condition, value));
} }
/**
* "ID between 1 and 10"
* @param condition
* @param value1
* @param value2
* @param property
*/
protected void addCriterion(String condition, Object value1, Object value2, String property) { protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) { if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null"); throw new RuntimeException("Between values for " + property + " cannot be null");
@ -193,29 +135,19 @@ public class TbRechargeLogExample extends BaseMybatisExample {
// 以下是针对 TbRechargeLog 表各个字段的查询条件生成方法 // 以下是针对 TbRechargeLog 表各个字段的查询条件生成方法
/**
* ID
* @return
*/
public Criteria andIdIsNull() { public Criteria andIdIsNull() {
addCriterion("ID is null"); addCriterion("ID is null");
return (Criteria) this; return (Criteria) this;
} }
/**
* ID
* @return
*/
public Criteria andIdIsNotNull() { public Criteria andIdIsNotNull() {
addCriterion("ID is not null"); addCriterion("ID is not null");
return (Criteria) this; return (Criteria) this;
} }
/**
* ID
* @param value
* @return
*/
public Criteria andIdEqualTo(Integer value) { public Criteria andIdEqualTo(Integer value) {
addCriterion("ID =", value, "id"); addCriterion("ID =", value, "id");
return (Criteria) this; return (Criteria) this;
@ -223,10 +155,7 @@ public class TbRechargeLogExample extends BaseMybatisExample {
// 其他针对 ID 字段的条件生成方法,如不等于、大于、小于等 // 其他针对 ID 字段的条件生成方法,如不等于、大于、小于等
/**
* COUPON_NO
* @return
*/
public Criteria andCouponNoIsNull() { public Criteria andCouponNoIsNull() {
addCriterion("COUPON_NO is null"); addCriterion("COUPON_NO is null");
return (Criteria) this; return (Criteria) this;
@ -234,10 +163,7 @@ public class TbRechargeLogExample extends BaseMybatisExample {
// 其他针对 COUPON_NO 字段的条件生成方法 // 其他针对 COUPON_NO 字段的条件生成方法
/**
* RECHARGE_PRICE
* @return
*/
public Criteria andRechargePriceIsNull() { public Criteria andRechargePriceIsNull() {
addCriterion("RECHARGE_PRICE is null"); addCriterion("RECHARGE_PRICE is null");
return (Criteria) this; return (Criteria) this;
@ -245,10 +171,7 @@ public class TbRechargeLogExample extends BaseMybatisExample {
// 其他针对 RECHARGE_PRICE 字段的条件生成方法 // 其他针对 RECHARGE_PRICE 字段的条件生成方法
/**
* RECHARGE_DATE
* @return
*/
public Criteria andRechargeDateIsNull() { public Criteria andRechargeDateIsNull() {
addCriterion("RECHARGE_DATE is null"); addCriterion("RECHARGE_DATE is null");
return (Criteria) this; return (Criteria) this;
@ -256,10 +179,7 @@ public class TbRechargeLogExample extends BaseMybatisExample {
// 其他针对 RECHARGE_DATE 字段的条件生成方法 // 其他针对 RECHARGE_DATE 字段的条件生成方法
/**
* RECHARGE_USER
* @return
*/
public Criteria andRechargeUserIsNull() { public Criteria andRechargeUserIsNull() {
addCriterion("RECHARGE_USER is null"); addCriterion("RECHARGE_USER is null");
return (Criteria) this; return (Criteria) this;
@ -267,10 +187,7 @@ public class TbRechargeLogExample extends BaseMybatisExample {
// 其他针对 RECHARGE_USER 字段的条件生成方法 // 其他针对 RECHARGE_USER 字段的条件生成方法
/**
* RECHARGE_PLACE
* @return
*/
public Criteria andRechargePlaceIsNull() { public Criteria andRechargePlaceIsNull() {
addCriterion("RECHARGE_PLACE is null"); addCriterion("RECHARGE_PLACE is null");
return (Criteria) this; return (Criteria) this;
@ -280,22 +197,16 @@ public class TbRechargeLogExample extends BaseMybatisExample {
} }
/**
* Criteria GeneratedCriteria
*/
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
/**
*
*/
protected Criteria() { protected Criteria() {
super(); super();
} }
} }
/**
* Criterion
*/
public static class Criterion { public static class Criterion {
// 查询条件的字符串表示,例如 "ID = " // 查询条件的字符串表示,例如 "ID = "
private String condition; private String condition;

@ -3,22 +3,39 @@ package com.xmomen.module.pick.model;
import java.math.BigDecimal; import java.math.BigDecimal;
public class CreateMember { public class CreateMember {
// 新优惠券号
private String newCouponNo; private String newCouponNo;
// 新密码
private String newPassword; private String newPassword;
// 会员类型
private Integer memberType; private Integer memberType;
// 姓名
private String name; private String name;
// 电话号码
private String phoneNumber; private String phoneNumber;
// 备用姓名
private String spareName; private String spareName;
// 备用姓名2
private String spareName2; private String spareName2;
// 备用电话
private String spareTel; private String spareTel;
// 备用电话2
private String spareTel2; private String spareTel2;
// 固定电话
private String telNumber; private String telNumber;
// 办公电话
private String officeTel; private String officeTel;
// 地址
private String address; private String address;
// 备用地址
private String spareAddress; private String spareAddress;
// 备用地址2
private String spareAddress2; private String spareAddress2;
// 公司ID
private Integer cdCompanyId; private Integer cdCompanyId;
// 用户ID
private Integer cdUserId; private Integer cdUserId;
// 用户价格
private BigDecimal userPrice; private BigDecimal userPrice;
// Getters and Setters // Getters and Setters

@ -7,9 +7,14 @@ import lombok.Data;
public @Data public @Data
class PickVo implements Serializable{ class PickVo implements Serializable{
// 拣货重量
private BigDecimal pickWeight; private BigDecimal pickWeight;
// 拣货价格
private BigDecimal pickPrice; private BigDecimal pickPrice;
// 拣货支付类型
private Integer pickPayType; private Integer pickPayType;
// 拣货箱价
private BigDecimal pickCasePrice; private BigDecimal pickCasePrice;
// 优惠券编号
private String couponNo; private String couponNo;
} }

@ -47,15 +47,7 @@ public class TablePlanController {
@Autowired @Autowired
MybatisDao mybatisDao; MybatisDao mybatisDao;
/**
*
* @param limit
* @param offset
* @param id ID
* @param keyword
* @param phoneNumber
* @return
*/
@RequestMapping(value = "/tablePlan", method = RequestMethod.GET) @RequestMapping(value = "/tablePlan", method = RequestMethod.GET)
@Log(actionName = "查询餐桌信息") @Log(actionName = "查询餐桌信息")
public Page<TablePlanModel> getTablePlanList(@RequestParam(value = "limit") Integer limit, public Page<TablePlanModel> getTablePlanList(@RequestParam(value = "limit") Integer limit,
@ -84,12 +76,7 @@ public class TablePlanController {
return (Page<TablePlanModel>) mybatisDao.selectPage(TablePlanMapper.TablePlanMapperNameSpace + "getTablePlanList", map, limit, offset); return (Page<TablePlanModel>) mybatisDao.selectPage(TablePlanMapper.TablePlanMapperNameSpace + "getTablePlanList", map, limit, offset);
} }
/**
*
* @param createTablePlan
* @param bindingResult
* @throws ArgumentValidException
*/
@RequestMapping(value = "/tablePlan", method = RequestMethod.POST) @RequestMapping(value = "/tablePlan", method = RequestMethod.POST)
@Log(actionName = "新增餐桌") @Log(actionName = "新增餐桌")
public void createTablePlan(@RequestBody @Valid CreateTablePlan createTablePlan, BindingResult bindingResult) throws ArgumentValidException { public void createTablePlan(@RequestBody @Valid CreateTablePlan createTablePlan, BindingResult bindingResult) throws ArgumentValidException {
@ -102,11 +89,7 @@ public class TablePlanController {
tablePlanService.createTablePlan(createTablePlan); tablePlanService.createTablePlan(createTablePlan);
} }
/**
* ID
* @param id ID
* @return
*/
@RequestMapping(value = "/tablePlan/{id}", method = RequestMethod.GET) @RequestMapping(value = "/tablePlan/{id}", method = RequestMethod.GET)
@Log(actionName = "根据ID查询餐桌信息") @Log(actionName = "根据ID查询餐桌信息")
public TablePlanModel getTablePlan(@PathVariable(value = "id") Integer id) { public TablePlanModel getTablePlan(@PathVariable(value = "id") Integer id) {
@ -118,13 +101,7 @@ public class TablePlanController {
return mybatisDao.getSqlSessionTemplate().selectOne(TablePlanMapper.TablePlanMapperNameSpace + "getTablePlanList", map); return mybatisDao.getSqlSessionTemplate().selectOne(TablePlanMapper.TablePlanMapperNameSpace + "getTablePlanList", map);
} }
/**
*
* @param id ID
* @param updateTablePlan
* @param bindingResult
* @throws ArgumentValidException
*/
@RequestMapping(value = "/tablePlan/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/tablePlan/{id}", method = RequestMethod.PUT)
@Log(actionName = "修改餐桌信息") @Log(actionName = "修改餐桌信息")
public void updateTablePlan(@PathVariable(value = "id") Integer id, public void updateTablePlan(@PathVariable(value = "id") Integer id,
@ -138,10 +115,7 @@ public class TablePlanController {
tablePlanService.updateTablePlan(id, updateTablePlan); tablePlanService.updateTablePlan(id, updateTablePlan);
} }
/**
*
* @param id ID
*/
@RequestMapping(value = "/tablePlan/{id}", method = RequestMethod.DELETE) @RequestMapping(value = "/tablePlan/{id}", method = RequestMethod.DELETE)
@Log(actionName = "删除餐桌信息") @Log(actionName = "删除餐桌信息")
public void deleteTablePlan(@PathVariable(value = "id") Integer id) { public void deleteTablePlan(@PathVariable(value = "id") Integer id) {
@ -149,11 +123,7 @@ public class TablePlanController {
tablePlanService.delete(id); tablePlanService.delete(id);
} }
/**
*
* @param id ID
* @param locked truefalse
*/
@RequestMapping(value = "/tablePlan/{id}/stop", method = RequestMethod.PUT) @RequestMapping(value = "/tablePlan/{id}/stop", method = RequestMethod.PUT)
@Log(actionName = "暂停配送") @Log(actionName = "暂停配送")
public void stop(@PathVariable(value = "id") Integer id, public void stop(@PathVariable(value = "id") Integer id,
@ -168,9 +138,7 @@ public class TablePlanController {
mybatisDao.update(tablePlan); mybatisDao.update(tablePlan);
} }
/**
*
*/
@RequestMapping(value = "/tablePlan/createPlanOrder", method = RequestMethod.PUT) @RequestMapping(value = "/tablePlan/createPlanOrder", method = RequestMethod.PUT)
@Log(actionName = "手工调用") @Log(actionName = "手工调用")
public void createPlanOrder() { public void createPlanOrder() {

@ -23,77 +23,49 @@ public class TbTablePlanExample extends BaseMybatisExample {
// 多个Criteria之间是逻辑或OR的关系 // 多个Criteria之间是逻辑或OR的关系
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
/**
* oredCriteria
*/
public TbTablePlanExample() { public TbTablePlanExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<Criteria>();
} }
/**
*
* @param orderByClause "column_name ASC" "column_name DESC"
*/
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause; this.orderByClause = orderByClause;
} }
/**
*
* @return
*/
public String getOrderByClause() { public String getOrderByClause() {
return orderByClause; return orderByClause;
} }
/**
*
* @param distinct truefalse
*/
public void setDistinct(boolean distinct) { public void setDistinct(boolean distinct) {
this.distinct = distinct; this.distinct = distinct;
} }
/**
*
* @return truefalse
*/
public boolean isDistinct() { public boolean isDistinct() {
return distinct; return distinct;
} }
/**
*
* @return CriteriaCriteria
*/
public List<Criteria> getOredCriteria() { public List<Criteria> getOredCriteria() {
return oredCriteria; return oredCriteria;
} }
/**
* oredCriteriaOR
* @param criteria
*/
public void or(Criteria criteria) { public void or(Criteria criteria) {
oredCriteria.add(criteria); oredCriteria.add(criteria);
} }
/**
* oredCriteria
* 便
* @return
*/
public Criteria or() { public Criteria or() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria); oredCriteria.add(criteria);
return criteria; return criteria;
} }
/**
* oredCriteria
* 便
* @return
*/
public Criteria createCriteria() { public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) { if (oredCriteria.size() == 0) {
@ -102,69 +74,47 @@ public class TbTablePlanExample extends BaseMybatisExample {
return criteria; return criteria;
} }
/**
*
* @return
*/
protected Criteria createCriteriaInternal() { protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(); Criteria criteria = new Criteria();
return criteria; return criteria;
} }
/**
* TbTablePlanExample
*/
public void clear() { public void clear() {
oredCriteria.clear(); oredCriteria.clear();
orderByClause = null; orderByClause = null;
distinct = false; distinct = false;
} }
/**
*
*
*/
protected abstract static class GeneratedCriteria { protected abstract static class GeneratedCriteria {
// 存储具体的查询条件每个Criterion对象代表一个条件 // 存储具体的查询条件每个Criterion对象代表一个条件
protected List<Criterion> criteria; protected List<Criterion> criteria;
/**
* criteria
*/
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<Criterion>();
} }
/**
*
* @return truefalse
*/
public boolean isValid() { public boolean isValid() {
return criteria.size() > 0; return criteria.size() > 0;
} }
/**
*
* @return CriterionCriterion
*/
public List<Criterion> getAllCriteria() { public List<Criterion> getAllCriteria() {
return criteria; return criteria;
} }
/**
*
* @return CriterionCriterion
*/
public List<Criterion> getCriteria() { public List<Criterion> getCriteria() {
return criteria; return criteria;
} }
/**
* "column_name is null"
* @param condition
*/
protected void addCriterion(String condition) { protected void addCriterion(String condition) {
if (condition == null) { if (condition == null) {
throw new RuntimeException("Value for condition cannot be null"); throw new RuntimeException("Value for condition cannot be null");
@ -172,12 +122,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
criteria.add(new Criterion(condition)); criteria.add(new Criterion(condition));
} }
/**
* "column_name = value"
* @param condition
* @param value
* @param property
*/
protected void addCriterion(String condition, Object value, String property) { protected void addCriterion(String condition, Object value, String property) {
if (value == null) { if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null"); throw new RuntimeException("Value for " + property + " cannot be null");
@ -185,13 +130,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
criteria.add(new Criterion(condition)); criteria.add(new Criterion(condition));
} }
/**
* "column_name between value1 and value2"
* @param condition
* @param value1
* @param value2
* @param property
*/
protected void addCriterion(String condition, Object value1, Object value2, String property) { protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) { if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null"); throw new RuntimeException("Between values for " + property + " cannot be null");
@ -199,13 +138,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
criteria.add(new Criterion(condition)); criteria.add(new Criterion(condition));
} }
/**
*
* JavaDateJDBCDate
* @param condition
* @param value
* @param property
*/
protected void addCriterionForJDBCDate(String condition, Date value, String property) { protected void addCriterionForJDBCDate(String condition, Date value, String property) {
if (value == null) { if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null"); throw new RuntimeException("Value for " + property + " cannot be null");
@ -213,13 +146,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
addCriterion(condition, new java.sql.Date(value.getTime()), property); addCriterion(condition, new java.sql.Date(value.getTime()), property);
} }
/**
*
* JavaDateJDBCDate
* @param condition
* @param values
* @param property
*/
protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) { protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
if (values == null || values.size() == 0) { if (values == null || values.size() == 0) {
throw new RuntimeException("Value list for " + property + " cannot be null or empty"); throw new RuntimeException("Value list for " + property + " cannot be null or empty");
@ -232,14 +159,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
addCriterion(condition, dateList, property); addCriterion(condition, dateList, property);
} }
/**
*
* JavaDateJDBCDate
* @param condition
* @param value1
* @param value2
* @param property
*/
protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
if (value1 == null || value2 == null) { if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null"); throw new RuntimeException("Between values for " + property + " cannot be null");
@ -249,10 +169,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
// 以下是针对TbTablePlan实体的各个字段生成的具体查询条件方法例如针对id字段的查询条件 // 以下是针对TbTablePlan实体的各个字段生成的具体查询条件方法例如针对id字段的查询条件
/**
* "ID is null"
* @return 便
*/
public Criteria andIdIsNull() { public Criteria andIdIsNull() {
addCriterion("ID is null"); addCriterion("ID is null");
return (Criteria) this; return (Criteria) this;
@ -264,14 +181,10 @@ public class TbTablePlanExample extends BaseMybatisExample {
} }
/**
* GeneratedCriteria
*/
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
/**
*
*/
protected Criteria() { protected Criteria() {
super(); super();
} }
@ -280,9 +193,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
} }
} }
/**
*
*/
public static class Criterion { public static class Criterion {
// 查询条件字符串,例如 "column_name = value" 中的 "column_name =" // 查询条件字符串,例如 "column_name = value" 中的 "column_name ="
@ -311,10 +222,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
// 以下是获取各个属性值的方法 // 以下是获取各个属性值的方法
/**
*
* @return
*/
public String getCondition() { public String getCondition() {
return condition; return condition;
} }
@ -325,10 +233,7 @@ public class TbTablePlanExample extends BaseMybatisExample {
// 以下是不同参数的构造函数用于创建Criterion对象 // 以下是不同参数的构造函数用于创建Criterion对象
/**
*
* @param condition
*/
protected Criterion(String condition) { protected Criterion(String condition) {
super(); super();
this.condition = condition; this.condition = condition;

@ -17,71 +17,43 @@ import lombok.Data;
@Data @Data
public class CreateTablePlan implements Serializable { public class CreateTablePlan implements Serializable {
/**
* // 创建餐桌计划的ID
* ID
*
*/
private Integer cdPlanId; private Integer cdPlanId;
/**
* 0 1 // 审核状态
*
*
*/
private Integer auditStatus; private Integer auditStatus;
/**
* 0 1 // 是否停止
*
*
*/
private Integer isStop; private Integer isStop;
/**
* // 创建餐桌计划的会员ID
* ID
* 便
*/
private Integer cdMemberId; private Integer cdMemberId;
/**
* // 优惠券号码
*
*
*/
private String couponNumber; private String couponNumber;
/**
* // 收货人电话
*
*
*/
private String consigneePhone; private String consigneePhone;
/**
* // 收货人姓名
*
*/
private String consigneeName; private String consigneeName;
/**
* // 收货人地址
*
*/
private String consigneeAddress; private String consigneeAddress;
/**
* // 创建餐桌计划的ID列表
*
* 使 ID
*/
private List<Integer> cdPlanIds; private List<Integer> cdPlanIds;
/**
* TbTablePlan // 餐桌计划列表
*
*
*/
private List<TbTablePlan> tablePlans; private List<TbTablePlan> tablePlans;
} }

@ -18,55 +18,43 @@ import org.hibernate.validator.constraints.NotBlank;
*/ */
@Data @Data
public class UpdateTablePlan implements Serializable { public class UpdateTablePlan implements Serializable {
/**
* // 计划ID
*/
private Integer cdPlanId; private Integer cdPlanId;
/**
* 01 // 审核状态
*
*/
private Integer auditStatus; private Integer auditStatus;
/**
* 01 // 是否停用
*
*/
private Integer isStop; private Integer isStop;
/**
* // 会员ID
*/
private Integer cdMemberId; private Integer cdMemberId;
/**
* // 优惠券编号
*/
private String couponNumber; private String couponNumber;
/**
* // 收货人电话
*/
private String consigneePhone; private String consigneePhone;
/**
* // 收货人姓名
*/
private String consigneeName; private String consigneeName;
/**
* // 收货人地址
*/
private String consigneeAddress; private String consigneeAddress;
/**
* // 开始时间
*/
private Date beginTime; private Date beginTime;
/**
* // 发送星期
*/
private String sendWeekDay; private String sendWeekDay;
} }

@ -21,11 +21,7 @@ public class CategoryController {
@Autowired @Autowired
private CategoryService categoryService; private CategoryService categoryService;
/**
* GET"/wx/category"
*
* @return CategoryModel
*/
@RequestMapping(value = "/category", method = RequestMethod.GET) @RequestMapping(value = "/category", method = RequestMethod.GET)
// 将返回的对象直接转换为JSON格式的数据返回给客户端 // 将返回的对象直接转换为JSON格式的数据返回给客户端
@ResponseBody @ResponseBody

@ -23,58 +23,44 @@ public class Category extends BaseMybatisModel {
// 父类别ID用于表示类别之间的层级关系 // 父类别ID用于表示类别之间的层级关系
private Integer parentId; private Integer parentId;
/**
* ID // 获取类别ID
* @return ID
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
* ID // 设置类别ID
* @param id ID
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
* // 获取类别名称
* @return
*/
public String getName() { public String getName() {
return name; return name;
} }
/**
* // 设置类别名称
* @param name
*/
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
/**
* ID // 获取父类别ID
* @return ID
*/
public Integer getParentId() { public Integer getParentId() {
return parentId; return parentId;
} }
/**
* ID // 设置父类别ID
* @param parentId ID
*/
public void setParentId(Integer parentId) { public void setParentId(Integer parentId) {
this.parentId = parentId; this.parentId = parentId;
} }
/**
* toString便 // 重写toString方法用于输出Category对象的字符串表示
* @return IDID
*/
@Override @Override
public String toString() { public String toString() {
// 使用StringBuilder来构建字符串提高性能 // 使用StringBuilder来构建字符串提高性能

@ -17,56 +17,34 @@ public enum ProductQueryFilter {
// 查询条件,可能用于构建更复杂的 SQL 查询,初始值可为 null // 查询条件,可能用于构建更复杂的 SQL 查询,初始值可为 null
private String condition; private String condition;
/**
* null
* @param desc
* @param fieldName
*/
ProductQueryFilter(String desc, String fieldName) { ProductQueryFilter(String desc, String fieldName) {
this(desc, fieldName, null); this(desc, fieldName, null);
} }
/**
*
* @param desc
* @param fieldName
* @param condition
*/
ProductQueryFilter(String desc, String fieldName, String condition) { ProductQueryFilter(String desc, String fieldName, String condition) {
this.desc = desc; this.desc = desc;
this.fieldName = fieldName; this.fieldName = fieldName;
this.condition = condition; this.condition = condition;
} }
/**
*
* @return
*/
public String getDesc() { public String getDesc() {
return this.desc; return this.desc;
} }
/**
*
* @return
*/
public String getFieldName() { public String getFieldName() {
return this.fieldName; return this.fieldName;
} }
/**
*
* @return
*/
public String getCondition() { public String getCondition() {
return this.condition; return this.condition;
} }
/**
* ProductQueryFilter
* @param desc
* @return null
*/
public static ProductQueryFilter enumOf(String desc) { public static ProductQueryFilter enumOf(String desc) {
// 获取所有的 ProductQueryFilter 枚举实例 // 获取所有的 ProductQueryFilter 枚举实例
ProductQueryFilter[] filters = ProductQueryFilter.values(); ProductQueryFilter[] filters = ProductQueryFilter.values();

@ -26,10 +26,7 @@ public class CategoryServiceImpl implements CategoryService {
@Autowired @Autowired
MybatisDao mybatisDao; MybatisDao mybatisDao;
/**
* CategoryModel
* @return CategoryModel
*/
public List<CategoryModel> getAllProductCategory() { public List<CategoryModel> getAllProductCategory() {
// 调用 MyBatis 的 SQLSessionTemplate 执行查询,获取所有产品类别的 Category 实体列表 // 调用 MyBatis 的 SQLSessionTemplate 执行查询,获取所有产品类别的 Category 实体列表
List<Category> categoryList = mybatisDao.getSqlSessionTemplate().selectList(ProductCategoryMapper.ProductCategoryMapperNameSpace + "getProductCategoryList"); List<Category> categoryList = mybatisDao.getSqlSessionTemplate().selectList(ProductCategoryMapper.ProductCategoryMapperNameSpace + "getProductCategoryList");

@ -28,13 +28,7 @@ public class ProductServiceImpl implements ProductService {
@Autowired @Autowired
MybatisDao mybatisDao; MybatisDao mybatisDao;
/**
*
* @param productQuery
* @param limit
* @param offset
* @return
*/
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public Page<ProductModel> getProductList(ProductQuery productQuery, Integer limit, Integer offset) { public Page<ProductModel> getProductList(ProductQuery productQuery, Integer limit, Integer offset) {
@ -62,11 +56,7 @@ public class ProductServiceImpl implements ProductService {
return pageModel; return pageModel;
} }
/**
* ID
* @param id ID
* @return ProductModel null
*/
@Override @Override
public ProductModel getDetailById(Integer id) { public ProductModel getDetailById(Integer id) {
// 调用 MyBatis 的查询方法,根据产品 ID 获取产品详细信息列表 // 调用 MyBatis 的查询方法,根据产品 ID 获取产品详细信息列表
@ -122,11 +112,7 @@ public class ProductServiceImpl implements ProductService {
return null; return null;
} }
/**
* ID
* @param itemIds ID
* @return ID
*/
@Override @Override
public List<ProductModel> getProducts(List<Integer> itemIds) { public List<ProductModel> getProducts(List<Integer> itemIds) {
// 如果产品 ID 列表为空 // 如果产品 ID 列表为空

Loading…
Cancel
Save