| | |
| | | import com.xzx.gc.common.exception.RestException; |
| | | import com.xzx.gc.entity.AccountInfo; |
| | | import com.xzx.gc.entity.JhyInfo; |
| | | import com.xzx.gc.entity.ScoreGoodsSearch; |
| | | import com.xzx.gc.entity.ScoreDetails; |
| | | import com.xzx.gc.user.dto.AddScoreNumDto; |
| | | import com.xzx.gc.user.dto.ExamineJwyDto; |
| | | import com.xzx.gc.user.dto.JhyApplyDto; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import tk.mybatis.mapper.entity.Example; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | List<AccountInfo> accountInfos = accountMapper.selectByExample(exampleAccount); |
| | | if(CollUtil.isNotEmpty(accountInfos)){ |
| | | AccountInfo accountInfo = accountInfos.get(0); |
| | | // Integer collectScore = Integer.parseInt(accountInfo.getCollectScore()); |
| | | Integer collectScore = Integer.parseInt(accountInfo.getCollectScore()); |
| | | // collectScore = collectScore + model.getScore(); |
| | | accountInfo.setCollectScore(model.getScore().toString()); |
| | | accountMapper.updateByPrimaryKey(accountInfo); |
| | | |
| | | ScoreDetails scoreDetailsRet = new ScoreDetails(); |
| | | scoreDetailsRet.setUserId(model.getUserId()); |
| | | scoreDetailsRet.setType(ScoreDetails.SCORE_TYPE_ADMIN_RECHARGE); |
| | | scoreDetailsRet.setOriginalScore(new BigDecimal(collectScore)); |
| | | scoreDetailsRet.setCurrentScore(new BigDecimal(model.getScore())); |
| | | scoreDetailsRet.setChangeScore(new BigDecimal(model.getScore())); |
| | | scoreDetailsRet.setCreatedTime(new Date()); |
| | | accountMapper.insertScoreDetailsRet(scoreDetailsRet); |
| | | } |
| | | } |
| | | } |