Authored by LUOXC

Merge branch 'test6.9.9' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.9

... ... @@ -111,6 +111,36 @@ public class SecondhandProductServiceImpl implements SecondhandProductService {
infos.add(new SkupImageInfo(ImageUrlAssist.getImageAbsoluteUrl(item.getImageUrl(), "goodsimg"), ""))
);
}
StringBuilder boxInfo = new StringBuilder();
StringBuilder qualityInfo = new StringBuilder();
if (org.apache.commons.lang3.StringUtils.isNotBlank(secondhandInfo.getFlawId())) {
List<SecondhandFlaw> flaws = secondhandFlawMapper.selectByIds(secondhandInfo.getFlawId());
for (SecondhandFlaw flaw : flaws) {
// 其他问题,文字不展示
if (flaw.getId() == 200) {
continue;
}
if (flaw.getType() == 1) {
boxInfo.append(",").append(flaw.getName());
}
if (flaw.getType() == 2) {
qualityInfo.append(",").append(flaw.getName());
}
}
if(org.apache.commons.lang3.StringUtils.isNotBlank(secondhandInfo.getFlawAttr())) {
qualityInfo.append(",").append(secondhandInfo.getFlawAttr());
}
if (boxInfo.length() > 0) {
resp.setShoeBoxDesc(boxInfo.substring(1));
}
if (qualityInfo.length() > 0) {
resp.setShoeQualityDesc(qualityInfo.substring(1));
} else {
resp.setShoeQualityDesc("该商品没有明显瑕疵");
}
}
resp.setImageInfoList(infos);
return resp;
}
... ...
... ... @@ -159,14 +159,15 @@ public class CertificationServiceImpl implements ICertificationService {
* @param uid
*/
private void checkIsLimited(int uid){
long times = 0;
try {
long times = cacheService.incrementPhotoCheckCount(DateUtil.getDateDayFormat(), uid);
if (times > certTimesLimit) {
logger.error("checkIsLimited: certification times limited. uid is {}", uid);
throw new UfoServiceException(400, "认证次数过多");
}
times = cacheService.incrementPhotoCheckCount(DateUtil.getDateDayFormat(), uid);
}catch (Exception e){
logger.error("checkIsLimited: get limit times error. uid is {}", uid, e);
}
if (times > certTimesLimit) {
logger.error("checkIsLimited: certification times limited. uid is {}", uid);
throw new UfoServiceException(400, "认证次数过多");
}
}
}
\ No newline at end of file
... ...