我得免单订单状态

This commit is contained in:
wangguocheng
2024-05-17 10:02:39 +08:00
parent 31d3a65c00
commit 6a2efde318
5 changed files with 29 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ import com.chaozhanggui.system.cashierservice.util.N;
import com.chaozhanggui.system.cashierservice.util.RedisUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -383,4 +384,18 @@ public class OrderService {
modityDouble(conponsId);
}
}
public Result mineWinner(Integer userId, Integer page, Integer size) {
PageHelper.startPage(page, size);
List<TbOrderInfo> list = orderInfoMapper.selectWinnerByUserId(userId);
for (TbOrderInfo tbOrderInfo:list){
if (StringUtils.isNotEmpty(tbOrderInfo.getWinnnerNo())){
tbOrderInfo.setIsWinner("true");
}else {
tbOrderInfo.setIsWinner("false");
}
}
PageInfo pageInfo = new PageInfo(list);
return Result.success(CodeEnum.SUCCESS, pageInfo);
}
}