Authored by wangshusheng

修改

... ... @@ -55,11 +55,11 @@ public class CutDownProductPriceRest {
*/
@RequestMapping("/addCutPriceRecord")
@ResponseBody
public Integer addCutPriceRecord(@RequestBody CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO) {
public BigDecimal addCutPriceRecord(@RequestBody CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO) {
logger.info("CutDownProductPriceRest addCutPriceRecord params is{}", cutPriceHelpUserRequestBO);
int num = cutDownPriceService.addCutPriceRecord(cutPriceHelpUserRequestBO);
BigDecimal cutPrice = cutDownPriceService.addCutPriceRecord(cutPriceHelpUserRequestBO);
logger.info("CutDownProductPriceRest addCutPriceRecord success params is{}", cutPriceHelpUserRequestBO);
return num;
return cutPrice;
}
/**
... ...
... ... @@ -22,7 +22,7 @@ public interface ICutDownPriceService {
BigDecimal addHelpUserInfo(CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO);
int addCutPriceRecord(CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO);
BigDecimal addCutPriceRecord(CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO);
PageResponseBo<CutDownPriceActivityProductBo> queryMyCutPriceListByPage(CutDownProductQueryRequest request);
... ...
... ... @@ -365,7 +365,7 @@ public class CutDownPriceServiceImpl implements ICutDownPriceService {
}
@Override
public int addCutPriceRecord(CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO) {
public BigDecimal addCutPriceRecord(CutPriceHelpUserRequestBO cutPriceHelpUserRequestBO) {
Integer activityId = cutPriceHelpUserRequestBO.getActivityId();
Integer productSkn = cutPriceHelpUserRequestBO.getProductSkn();
Integer userId = cutPriceHelpUserRequestBO.getUserId();
... ... @@ -392,14 +392,15 @@ public class CutDownPriceServiceImpl implements ICutDownPriceService {
logger.info(" addCutDownUserRecord, userId is {}, activityId is {}, productSkn is {}", userId, activityId, productSkn);
int num = cutDownPriceUserRecordMapper.addCutDownUserRecord(record);
// 系统帮助砍第一次价
BigDecimal cutPrice = new BigDecimal(0);
try{
logger.info(" system start addHelpUserInfo, userId is {}, activityId is {}, productSkn is {}", userId, activityId, productSkn);
addHelpUserInfo(convertCutDownPriceProductSystemHelpUser(cutPriceHelpUserRequestBO));
cutPrice = addHelpUserInfo(convertCutDownPriceProductSystemHelpUser(cutPriceHelpUserRequestBO));
}catch(Exception e){
logger.warn(" system addHelpUserInfo failed, userId is {}, activityId is {}, productSkn is {}, exception is {}", userId, activityId, productSkn, e);
}
return num;
return cutPrice;
}
private void checkValidActivity(CutDownPriceActivityBo activityBo, Integer activityId) {
... ...