提交代码

new-dev
胡锐 1 year ago committed by Sum1Dream
parent 38de28b46a
commit d7e6636ad6
  1. 7
      hai-cweb/src/main/java/com/cweb/controller/HighUserCardController.java
  2. 2
      hai-order/src/main/java/com/web/controller/TestController.java
  3. 13
      hai-service/src/main/java/com/hai/entity/HighUserCard.java
  4. 3
      hai-service/src/main/java/com/hai/service/impl/HighOilCardRecordServiceImpl.java
  5. 2
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -132,7 +132,12 @@ public class HighUserCardController {
List<HighUserCard> list = highUserCardService.getListByUser(userInfoModel.getHighUser().getId(), type);
for (HighUserCard card : list) {
card.setBalance(new BigDecimal("0"));
if (card.getType().equals(UserCardType.type3.getType())) {
if (card.getType().equals(UserCardType.type2.getType())) {
HighOilCard oilCard = oilCardService.getOilCardByCardNo(card.getCardNo());
if (oilCard != null) {
card.setOilCard(oilCard);
}
} else if (card.getType().equals(UserCardType.type3.getType())) {
HighFleetOilCard fleetOilCard = fleetOilCardService.getFleetOilCardByCardNo(card.getCardNo());
if (fleetOilCard != null) {
card.setBalance(fleetOilCard.getAmount());

File diff suppressed because one or more lines are too long

@ -67,6 +67,19 @@ public class HighUserCard implements Serializable {
*/
private String contactName;
/**
* 油卡
*/
private HighOilCard oilCard;
public HighOilCard getOilCard() {
return oilCard;
}
public void setOilCard(HighOilCard oilCard) {
this.oilCard = oilCard;
}
public BigDecimal getBalance() {
return balance;
}

@ -4,6 +4,7 @@ import com.hai.common.security.UserCenter;
import com.hai.dao.HighOilCardRecordMapper;
import com.hai.entity.HighOilCardRecord;
import com.hai.entity.HighOilCardRecordExample;
import com.hai.enum_type.OilCardRecordSourceTypeEnum;
import com.hai.model.HighUserModel;
import com.hai.model.UserInfoModel;
import com.hai.service.HighOilCardRecordService;
@ -30,6 +31,7 @@ public class HighOilCardRecordServiceImpl implements HighOilCardRecordService {
oilCardRecord.setOpUserId(0L);
oilCardRecord.setOpUserName("无");
if (!oilCardRecord.getSourceType().equals(OilCardRecordSourceTypeEnum.type5.getType())) {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel != null) {
oilCardRecord.setOpUserId(userInfoModel.getSecUser().getId());
@ -40,6 +42,7 @@ public class HighOilCardRecordServiceImpl implements HighOilCardRecordService {
oilCardRecord.setOpUserId(userModel.getHighUser().getId());
oilCardRecord.setOpUserName(userModel.getHighUser().getName());
}
}
oilCardRecord.setCreateTime(new Date());
oilCardRecord.setStatus(1);

@ -369,7 +369,7 @@ public class HighOrderServiceImpl implements HighOrderService {
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
@Transactional(propagation = Propagation.REQUIRED)
public void updateOrder(HighOrder highOrder) {
highOrderMapper.updateByPrimaryKey(highOrder);

Loading…
Cancel
Save