Authored by wangshusheng

toString

... ... @@ -7,12 +7,12 @@ import org.slf4j.helpers.MessageFormatter;
*/
public enum ShareOrdersKeyEnum {
ORDER_LIST("unions:share:orderList:","type:{}:status:{}:page:{}:limit:{}",3600,"订单列表"),
ORDER_INFO("unions:share:orderInfo:","key:{}:orderCode:{}",3600,"订单详情"),
USER_SETTLEMENT("unions:share:userSettlement:","type:{}",3600,"用户提现未提现总计"),
SETTLEMENT_LIST("unions:share:settlementList:","key:{}:page:{}:limit:{}",3600,"提现列表"),
UNION_TYPE("unions:share:unionType:","key:{}",3600,"用户登录时获取对应的渠道号"),
RECENTLY_ORDER_LIMIT_TEN("unions:share:recentlyOrderLimitTen:","key:{}",3600,"用户前台获取个人推广近期订单(10个)");
ORDER_LIST("yh:unions:share:orderList:","type:{}:status:{}:page:{}:limit:{}",600,"订单列表"),
ORDER_INFO("yh:unions:share:orderInfo:","key:{}:orderCode:{}",600,"订单详情"),
USER_SETTLEMENT("yh:unions:share:userSettlement:","type:{}",600,"用户提现未提现总计"),
SETTLEMENT_LIST("yh:unions:share:settlementList:","key:{}:page:{}:limit:{}",600,"提现列表"),
UNION_TYPE("yh:unions:share:unionType:","key:{}",600,"用户登录时获取对应的渠道号"),
RECENTLY_ORDER_LIMIT_TEN("yh:unions:share:recentlyOrderLimitTen:","key:{}",600,"用户前台获取个人推广近期订单(10个)");
private String preKey;
... ...
... ... @@ -182,7 +182,7 @@ public class RedisHashCache {
this.hashOperations.put(redisKeyBuilder, hashKey, v);
this.yHRedisTemplate.longExpire(redisKeyBuilder, timeout, unit);
} catch (Exception e) {
logger.warn("RedisHashCache get failed!!! cacheKey is: {},obj is: {},hashkey is {},value is {}", cacheKey,obj, hashKey,value);
logger.warn("RedisHashCache put failed!!! cacheKey is: {},obj is: {},hashkey is {},value is {}", cacheKey,obj, hashKey,value);
}
}
... ...
... ... @@ -142,4 +142,24 @@ public class UnionShareOrders {
public void setAmountStr(String amountStr) {
this.amountStr = amountStr;
}
@Override
public String toString() {
return "UnionShareOrders{" +
"id=" + id +
", orderCode='" + orderCode + '\'' +
", settlementCode='" + settlementCode + '\'' +
", promoteUid=" + promoteUid +
", status='" + status + '\'' +
", lastOrderAmount=" + lastOrderAmount +
", lastOrderAmountStr='" + lastOrderAmountStr + '\'' +
", orderTime=" + orderTime +
", orderTimeStr='" + orderTimeStr + '\'' +
", isNew=" + isNew +
", amount=" + amount +
", amountStr='" + amountStr + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
\ No newline at end of file
... ...
... ... @@ -72,4 +72,17 @@ public class UnionShareOrdersProduct {
public void setNum(Byte num) {
this.num = num;
}
@Override
public String toString() {
return "UnionShareOrdersProduct{" +
"id=" + id +
", productSkn=" + productSkn +
", orderCode='" + orderCode + '\'' +
", productName='" + productName + '\'' +
", image='" + image + '\'' +
", price=" + price +
", num=" + num +
'}';
}
}
\ No newline at end of file
... ...
... ... @@ -92,4 +92,19 @@ public class UnionShareSettlement {
public void setUpdateTime(Integer updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "UnionShareSettlement{" +
"id=" + id +
", settlementCode='" + settlementCode + '\'' +
", settlementAmount=" + settlementAmount +
", settlementAmountStr='" + settlementAmountStr + '\'' +
", settlementTime=" + settlementTime +
", settlementTimeStr='" + settlementTimeStr + '\'' +
", promoteUid=" + promoteUid +
", status=" + status +
", updateTime=" + updateTime +
'}';
}
}
\ No newline at end of file
... ...
... ... @@ -70,4 +70,17 @@ public class UnionShareUser {
public void setShareId(String shareId) {
this.shareId = shareId;
}
@Override
public String toString() {
return "UnionShareUser{" +
"id=" + id +
", uid=" + uid +
", unionType='" + unionType + '\'' +
", updateTime=" + updateTime +
", note='" + note + '\'' +
", url='" + url + '\'' +
", shareId='" + shareId + '\'' +
'}';
}
}
\ No newline at end of file
... ...
... ... @@ -233,12 +233,13 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
}
//获取数据库
UnionShareUser unionShareUser = unionShareUserMapper.selectByUid(uid);
//设置返回文案
if (null != unionShareUser){
unionShareUser.setNote("邀请新客购买返点"+configReader.getDouble(NEW_USER_REBATES_RATIO_KEY, 0.1)+",老客"+configReader.getDouble(OLD_USER_REBATES_RATIO_KEY, 0.03));
unionShareUser.setShareId(configReader.getString(UNION_SHAREID, ""));
unionShareUser.setUrl(configReader.getString(UNION_URL, ""));
if(null==unionShareUser){
return unionShareUser;
}
//设置返回文案
unionShareUser.setNote("邀请新客购买返点"+configReader.getDouble(NEW_USER_REBATES_RATIO_KEY, 0.1)+",老客"+configReader.getDouble(OLD_USER_REBATES_RATIO_KEY, 0.03));
unionShareUser.setShareId(configReader.getString(UNION_SHAREID, ""));
unionShareUser.setUrl(configReader.getString(UNION_URL, ""));
//设置缓存
addToRedis(ShareOrdersKeyEnum.UNION_TYPE, uid, unionShareUser, key);
return unionShareUser;
... ...