Merge pull request #109 from fengyapengwyy/wyying

修正会员卡的bug~ 优化IoUtil
This commit is contained in:
jinyu 2017-01-16 14:50:53 +08:00 committed by GitHub
commit 3d0a360b27
4 changed files with 26 additions and 5 deletions

View File

@ -155,6 +155,9 @@ public class CouponBaseInfo implements Serializable {
@JSONField(name = "can_give_friend") @JSONField(name = "can_give_friend")
private boolean canGiveFriend; private boolean canGiveFriend;
@JSONField(name = "need_push_on_view")
private Boolean needPushOnView;
private CouponBaseInfo(Builder builder) { private CouponBaseInfo(Builder builder) {
this.logoUrl = builder.logoUrl; this.logoUrl = builder.logoUrl;
this.brandName = builder.brandName; this.brandName = builder.brandName;
@ -183,6 +186,7 @@ public class CouponBaseInfo implements Serializable {
this.limitNum = builder.limitNum; this.limitNum = builder.limitNum;
this.canShare = builder.canShare; this.canShare = builder.canShare;
this.canGiveFriend = builder.canGiveFriend; this.canGiveFriend = builder.canGiveFriend;
this.needPushOnView = builder.needPushOnView;
}; };
public String getLogoUrl() { public String getLogoUrl() {
@ -293,6 +297,10 @@ public class CouponBaseInfo implements Serializable {
return canGiveFriend; return canGiveFriend;
} }
public Boolean getNeedPushOnView() {
return needPushOnView;
}
@Override @Override
public String toString() { public String toString() {
return "logoUrl=" + logoUrl + ", brandName=" + brandName + ", title=" return "logoUrl=" + logoUrl + ", brandName=" + brandName + ", title="
@ -314,7 +322,7 @@ public class CouponBaseInfo implements Serializable {
public void cleanCantUpdateField() { public void cleanCantUpdateField() {
this.brandName = null; this.brandName = null;
this.title = null; // this.title = null;
this.sku = null; this.sku = null;
this.bindOpenId = null; this.bindOpenId = null;
this.useCustomCode = null; this.useCustomCode = null;
@ -440,6 +448,11 @@ public class CouponBaseInfo implements Serializable {
*/ */
private boolean canGiveFriend; private boolean canGiveFriend;
/**
* 用户点击进入卡券时推送事件
*/
private boolean needPushOnView;
/** /**
* 默认永久有效 * 默认永久有效
*/ */
@ -811,6 +824,11 @@ public class CouponBaseInfo implements Serializable {
return this; return this;
} }
public Builder needPushOnView(boolean needPushOnView){
this.needPushOnView = needPushOnView;
return this;
}
/** /**
* 返回卡券的基础信息 * 返回卡券的基础信息
* *

View File

@ -135,7 +135,7 @@ public class MemberUserForm {
} }
public FormBudiler canModify(boolean modify){ public FormBudiler canModify(boolean modify){
this.canModify = canModify; this.canModify = modify;
return this; return this;
} }

View File

@ -57,15 +57,15 @@ public enum CardColor {
/** /**
* <font Color="#cc463d">Color0100</font> * <font Color="#cc463d">Color0100</font>
*/ */
Color0100(204, 70, 61, "#cc463d"), Color100(204, 70, 61, "#cc463d"),
/** /**
* <font Color="#cf3e36">Color0101</font> * <font Color="#cf3e36">Color0101</font>
*/ */
Color0101(207, 62, 54, "#cf3e36"), Color101(207, 62, 54, "#cf3e36"),
/** /**
* <font Color="#5E6671">Color0102</font> * <font Color="#5E6671">Color0102</font>
*/ */
Color0102(94, 102, 113, "#5E6671"); Color102(94, 102, 113, "#5E6671");
private int r; private int r;
private int g; private int g;
private int b; private int b;

View File

@ -87,6 +87,9 @@ public class IOUtil {
public static void close(Closeable stream) { public static void close(Closeable stream) {
try { try {
if(stream == null){
return ;
}
stream.close(); stream.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();