Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spicing #30

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions 3#Java狙击项目/fbird/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,16 @@
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>



<!-- for spicing up your code with <3 from bn1knb-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.22</version>
<scope>provided</scope>
</dependency>




<!-- Hadoop依赖 -->
<!-- <dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
package lyons.common.model.goods;

import lombok.Data;
import lombok.NoArgsConstructor;
import lyons.common.utils.ModelSetterUtil;

import java.util.Date;

import static lyons.common.utils.ModelSetterUtil.setFieldWithNotNullValue;

@Data
@NoArgsConstructor
public class GCar {

/** 购物车编号 */
Expand All @@ -21,70 +29,29 @@ public class GCar {
/** 创建时间 */
private Date gCarCreateDate;

public GCar(){}
public GCar(int gCarId, String gCarUName, int gCarGId, String gCarGName, double gCarPrice,
int gCarNumber,String gCarGMade, Date gCarCreateDate)
{
super();
this.gCarId = gCarId;
this.gCarUName = gCarUName;
this.setgCarUName(gCarUName);
this.gCarGId = gCarGId;
this.setgCarGName(gCarGName);
this.gCarPrice = gCarPrice;
this.gCarNumber = gCarNumber;
this.gCarGMade = gCarGMade;
this.setgCarGMade(gCarGMade);
this.gCarCreateDate = gCarCreateDate;
}



public int getgCarId() {
return gCarId;
}
public void setgCarId(int gCarId) {
this.gCarId = gCarId;
}
public String getgCarUName() {
return gCarUName;
}

public void setgCarUName(String gCarUName) {
this.gCarUName = gCarUName == null ? null : gCarUName.trim();
}
public int getgCarGId() {
return gCarGId;
}
public void setgCarGId(int gCarGId) {
this.gCarGId = gCarGId;
}
public double getgCarPrice() {
return gCarPrice;
}
public void setgCarPrice(double gCarPrice) {
this.gCarPrice = gCarPrice;
}
public int getgCarNumber() {
return gCarNumber;
}
public void setgCarNumber(int gCarNumber) {
this.gCarNumber = gCarNumber;
}
public String getgCarGMade() {
return gCarGMade;
this.gCarUName = setFieldWithNotNullValue(gCarUName);
}
public void setgCarGMade(String gCarGMade) {
this.gCarGMade = gCarGMade == null ? null : gCarGMade.trim();
}
public Date getgCarCreateDate() {
return gCarCreateDate;
}
public void setgCarCreateDate(Date gCarCreateDate) {
this.gCarCreateDate = gCarCreateDate;
}
public String getgCarGName(){
return gCarGName;
this.gCarGMade = setFieldWithNotNullValue(gCarGMade);
}
public void setgCarGName(String gCarGName)
{
this.gCarGName = gCarGName == null ? null : gCarGName.trim();
this.gCarGName = setFieldWithNotNullValue(gCarGName);
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package lyons.common.model.goods;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

import static lyons.common.utils.ModelSetterUtil.setFieldWithNotNullValue;

/**
* @Description: 订单实体类
* @ClassName: GOrder
* @author: lyons<zhanglei>
* @date: 2017年2月12日 下午4:58:35
* @version: [1.0]
*/
@Data
@NoArgsConstructor
public class GOrder {

/** 订单id */
Expand All @@ -30,7 +37,6 @@ public class GOrder {
/** 配送地址 */
private String gOrderAddress;

public GOrder(){}
public GOrder(int gOrderId, String gOrderUName, int gOrderGId, double gOrderPrice, int gOrderNumber,
Date gOrderCreateDate, String receiver, String gOrderPhone, String gOrderAddress)
{
Expand All @@ -44,59 +50,17 @@ public GOrder(int gOrderId, String gOrderUName, int gOrderGId, double gOrderPric
this.gOrderPhone = gOrderPhone;
this.gOrderAddress = gOrderAddress;
}

public int getgOrderId() {
return gOrderId;
}
public void setgOrderId(int gOrderId) {
this.gOrderId = gOrderId;
}
public String getgOrderUName() {
return gOrderUName;
}

public void setgOrderUName(String gOrderUName) {
this.gOrderUName = gOrderUName == null ? null : gOrderUName.trim();
}
public int getgOrderGId() {
return gOrderGId;
}
public void setgOrderGId(int gOrderGId) {
this.gOrderGId = gOrderGId;
}
public double getgOrderPrice() {
return gOrderPrice;
}
public void setgOrderPrice(double gOrderPrice) {
this.gOrderPrice = gOrderPrice;
}
public int getgOrderNumber() {
return gOrderNumber;
}
public void setgOrderNumber(int gOrderNumber) {
this.gOrderNumber = gOrderNumber;
}
public String getReceiver(){
return receiver;
this.gOrderUName = setFieldWithNotNullValue(gOrderUName);
}
public void setReceiver(String receiver){
this.receiver = receiver == null ? null : receiver.trim();
}
public Date getgOrderCreateDate() {
return gOrderCreateDate;
}
public void setgOrderCreateDate(Date gOrderCreateDate) {
this.gOrderCreateDate = gOrderCreateDate;
}
public String getgOrderPhone() {
return gOrderPhone;
this.receiver = setFieldWithNotNullValue(receiver);
}
public void setgOrderPhone(String gOrderPhone) {
this.gOrderPhone = gOrderPhone == null ? null : gOrderPhone.trim();
}
public String getgOrderAddress() {
return gOrderAddress;
this.gOrderPhone = setFieldWithNotNullValue(gOrderPhone);
}
public void setgOrderAddress(String gOrderAddress) {
this.gOrderAddress = gOrderAddress == null ? null : gOrderAddress.trim();
this.gOrderAddress = setFieldWithNotNullValue(gOrderAddress);
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
package lyons.common.model.goods;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

import static lyons.common.utils.ModelSetterUtil.setFieldWithNotNullValue;

/**
* @Description: 商品实体类
* @ClassName: Goods
* @author: lyons<zhanglei>
* @date: 2017年2月12日 下午4:57:33
* @version: [1.0]
*/

@Data
@NoArgsConstructor
public class Goods {

/** 商品 id */
Expand All @@ -27,9 +35,7 @@ public class Goods {
private Date gCreateDate;
/** 商品 图片路径 */
private String gPic;


public Goods(){}

public Goods(int gId, String gName, String gDescribe, double gPrice, String gMade, Integer gAmount,
Date gCreateDate, String gPic)
{
Expand All @@ -43,54 +49,17 @@ public Goods(int gId, String gName, String gDescribe, double gPrice, String gMad
this.gCreateDate = gCreateDate;
this.gPic = gPic;
}


public int getgId() {
return gId;
}
public void setgId(int gId) {
this.gId = gId;
}
public String getgName() {
return gName;
}
public void setgName(String gName) {
this.gName = gName == null ? null : gName.trim();
}
public String getgDescribe() {
return gDescribe;
this.gName = setFieldWithNotNullValue(gName);
}
public void setgDescribe(String gDescribe) {
this.gDescribe = gDescribe == null ? null : gDescribe.trim();
}
public double getgPrice() {
return gPrice;
}
public void setgPrice(double gPrice) {
this.gPrice = gPrice;
}
public String getgMade() {
return gMade;
this.gDescribe = setFieldWithNotNullValue(gDescribe);
}
public void setgMade(String gMade) {
this.gMade = gMade == null ? null : gMade.trim();
}
public Integer getgAmount() {
return gAmount;
}
public void setgAmount(Integer gAmount) {
this.gAmount = gAmount;
}
public Date getgCreateDate() {
return gCreateDate;
}
public void setgCreateDate(Date gCreateDate) {
this.gCreateDate = gCreateDate;
}
public String getgPic() {
return gPic;
this.gMade = setFieldWithNotNullValue(gMade);
}
public void setgPic(String gPic) {
this.gPic = gPic == null ? null : gPic.trim();
this.gPic = setFieldWithNotNullValue(gPic);
}
}
Loading